diff --git a/README b/README index bfa61e3..cf396aa 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Digital Speech Decoder 1.6.0 +Digital Speech Decoder 1.6.0 with P25 & DMR Filter Copyright (C) 2010 DSD Author GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0) @@ -455,10 +455,12 @@ Decoder options -fp Decode only ProVoice* -fr Decode only DMR/MOTOTRBO -fx Decode only X2-TDMA + -l Disable Filters (not recommended) -ma Auto-select modulation optimizations (default) -mc Use only C4FM modulation optimizations -mg Use only GFSK modulation optimizations -mq Use only QPSK modulation optimizations + -pu Unmute Encrypted P25 -u Unvoiced speech quality (default=3) -xx Expect non-inverted X2-TDMA signal -xr Expect inverted DMR/MOTOTRBO signal diff --git a/dsd.h b/dsd.h index 2373a3a..f2ff8ea 100644 --- a/dsd.h +++ b/dsd.h @@ -93,6 +93,8 @@ typedef struct int msize; int playfiles; int delay; + int disable_filters; + int unmute_encrypted_p25; } dsd_opts; typedef struct diff --git a/dsd_main.c b/dsd_main.c index 9a12711..ec28d4c 100644 --- a/dsd_main.c +++ b/dsd_main.c @@ -128,6 +128,8 @@ initOpts (dsd_opts * opts) opts->msize = 15; opts->playfiles = 0; opts->delay = 0; + opts->disable_filters = 0; + opts->unmute_encrypted_p25 = 0; } void @@ -262,10 +264,12 @@ usage () printf (" -fp Decode only ProVoice*\n"); printf (" -fr Decode only DMR/MOTOTRBO\n"); printf (" -fx Decode only X2-TDMA\n"); + printf (" -l Disable Filters (not recommended)\n"); printf (" -ma Auto-select modulation optimizations (default)\n"); printf (" -mc Use only C4FM modulation optimizations\n"); printf (" -mg Use only GFSK modulation optimizations\n"); printf (" -mq Use only QPSK modulation optimizations\n"); + printf (" -pu Unmute Encrypted P25\n"); printf (" -u Unvoiced speech quality (default=3)\n"); printf (" -xx Expect non-inverted X2-TDMA signal\n"); printf (" -xr Expect inverted DMR/MOTOTRBO signal\n"); @@ -335,7 +339,7 @@ main (int argc, char **argv) char versionstr[25]; mbe_printVersion (versionstr); - printf ("Digital Speech Decoder 1.6.0\n"); + printf ("Digital Speech Decoder 1.6.0 with P25 & DMR Filter\n"); printf ("mbelib version %s\n", versionstr); initOpts (&opts); @@ -344,7 +348,7 @@ main (int argc, char **argv) exitflag = 0; signal (SIGINT, sigfun); - while ((c = getopt (argc, argv, "hep:qstv:z:i:o:d:g:nw:B:C:R:f:m:u:x:A:S:M:r")) != -1) + while ((c = getopt (argc, argv, "hep:qstv:z:i:o:d:g:nw:B:C:R:f:m:u:x:A:S:M:r:l")) != -1) { opterr = 0; switch (c) @@ -373,6 +377,10 @@ main (int argc, char **argv) { opts.p25tg = 1; } + else if (optarg[0] == 'u') + { + opts.unmute_encrypted_p25 = 1; + } break; case 'q': opts.errorbars = 0; @@ -649,6 +657,10 @@ main (int argc, char **argv) opts.datascope = 0; state.optind = optind; break; + case 'l': + opts.disable_filters = 1; + printf ("DMR & P25 Filter Disabled\n"); + break; default: usage (); exit (0); diff --git a/dsd_symbol.c b/dsd_symbol.c index b8fd812..81aed25 100644 --- a/dsd_symbol.c +++ b/dsd_symbol.c @@ -80,7 +80,9 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync) } result = read (opts->audio_in_fd, &sample, 2); - { + + if (opts->disable_filters == 0) + { #define NZEROS 60 #define GAIN 7.423339364e+00 @@ -117,7 +119,8 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync) sum += (xcoeffs[i] * xv[i]); sample = sum / GAIN; // filtered sample out - } + } + if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0)) { sample = state->max; diff --git a/p25p1_ldu1.c b/p25p1_ldu1.c index a8a2f2f..fd6abe8 100644 --- a/p25p1_ldu1.c +++ b/p25p1_ldu1.c @@ -77,7 +77,7 @@ processLDU1 (dsd_opts * opts, dsd_state * state) y++; z++; } - if (state->p25kid == 0) + if (state->p25kid == 0 || opts->unmute_encrypted_p25 == 1) { processMbeFrame (opts, state, imbe_fr, NULL, NULL); } diff --git a/p25p1_ldu2.c b/p25p1_ldu2.c index 85ba279..a0f8fbb 100644 --- a/p25p1_ldu2.c +++ b/p25p1_ldu2.c @@ -80,7 +80,7 @@ processLDU2 (dsd_opts * opts, dsd_state * state) y++; z++; } - if (state->p25kid == 0) + if (state->p25kid == 0 || opts->unmute_encrypted_p25 == 1) { processMbeFrame (opts, state, imbe_fr, NULL, NULL); }