Commit Graph

264 Commits

Author SHA1 Message Date
Kamal Mostafa 8876f6674a minimodem: rename bfsk_sync_on_data to bfsk_do_rx_sync 2013-06-08 09:27:01 -07:00
Kamal Mostafa d774ad74dd minimodem: handle arbitrary --startbits N
minimodem --startbits N works for rx and tx, where (0 <= N <= 20).

Thanks Martyn (kronalias), for reporting.
2013-03-20 12:08:52 -07:00
Kamal Mostafa 7ab18a268f minimodem: do not call setitimer(new_value=NULL)
Linux kernel warns:

    minimodem calls setitimer() with new_value NULL pointer. Misfeature support
    will be removed

Thanks Robert Hooker, for reporting.
2013-01-25 15:03:54 -08:00
Kamal Mostafa 9d3200ca60 autoreconf 2012-11-03 14:28:47 -07:00
Kamal Mostafa 032d0bb79c minimodem: refine frame position if confidence falls
Allows for more accurate tracking, esp. for no-frame-bits protocols.
Fixes tests/test-80-SAME-datastream.
2012-11-03 14:20:33 -07:00
Kamal Mostafa 1446844d32 minimodem: do not transmit leader tone if no start bits 2012-11-03 14:10:44 -07:00
Kamal Mostafa c2fa2dae93 fsk: fix FSK_DEBUG character decode 2012-11-03 13:26:10 -07:00
Kamal Mostafa 6ad778ce03 minimodem: fix --tx startbits/stopbits handling
Make --tx support specified --startbits and --stopbits; also enables --tx SAME.

Thanks to Jamie Batmanglidj for reporting the issue.
2012-11-01 12:48:40 -07:00
Kamal Mostafa 7fed380d0a callerid: do not use recursive call to reset
Testing by Mike Tedesco shows the recursive databits_decode_callerid()
seems to break on OS X (only); I don't see why it should.  Avoid the
issue by not making a recursive call.
2012-10-16 18:02:21 -07:00
Kamal Mostafa 93bf08f750 callerid: fix parser - do not store noise bytes 2012-10-10 10:05:51 -07:00
Kamal Mostafa 1a60f1c12d update README text 2012-10-05 20:07:23 -07:00
Kamal Mostafa 65493fa12a minimodem: --rx callerid
New "callerid" baudmode supports Bell202 Caller-ID (MDMF or SDMF) prototol.
2012-10-05 19:40:17 -07:00
Kamal Mostafa 49ccd10e1f minimodem: --rx prints all bytes unmolested, unless --print-filter
Now, minimodem prints all received bytes without isprint() filtering,
unless --print-filter is specified.  Allows for binary file transfers
and multibyte characters.
2012-10-05 13:29:30 -07:00
Kamal Mostafa ead6952a58 (portability) simple-tone-generator.c needs stdio.h 2012-10-04 18:13:23 -07:00
Mike Tedesco 577b84d7f2 (portability) use stdlib.h not malloc.h 2012-10-04 18:10:33 -07:00
Mike Tedesco d8f7601b4f (portability) simpleaudio.c needs stdio.h 2012-10-04 18:08:31 -07:00
Kamal Mostafa 761cf00b16 minimodem: handle SIGINT on --rx: close the sa backend and print stats 2012-10-02 14:22:38 -07:00
Kamal Mostafa 2373364d9a minimodem: performance: read samples in larger blocks
For performance, read samples from the simpleaudio backend in larger
blocks when the number of bits per frame ends up being small.
2012-10-01 21:00:28 -07:00
Kamal Mostafa 2af26a4d06 simpleaudio-alsa: allow max latency
Request "maximum possible allowed latency", to help avoid underruns.
2012-10-01 19:06:27 -07:00
Kamal Mostafa 151ee0e004 simpleaudio-alsa: handle underruns better; print '#' 2012-10-01 19:02:39 -07:00
Kamal Mostafa b97aeb0778 simpleaudio-pulse: fix intermittent --tx noise
For some unknown reason setting attr.prebuf=1 causes horrible noise
for some playback sessions, so don't do that.
2012-10-01 14:30:00 -07:00
Kamal Mostafa 6340365e2f simpleaudio-sndfile: fix minimodem tx_interactive
Un-break tx_interactive: minimodem enables tx_interactive whenever the
stream_name is NULL, so go back to using the stream_name as the sndfile
filename.
2012-09-10 20:02:53 -07:00
Kamal Mostafa 9f1695a3b6 minimodem: fix --auto-carrier crash on positive-shift modes 2012-09-09 17:42:53 -07:00
Kamal Mostafa d603fc444d minimodem: --alsa[=plughw:X,Y] 2012-09-09 15:24:35 -07:00
Kamal Mostafa 5ee6a23c42 simpleaudio: backend_device support 2012-09-09 15:24:01 -07:00
Kamal Mostafa c2bb5c6205 simpleaudio-alsa: fix bogus latency, set 200 ms 2012-09-09 15:03:40 -07:00
Kamal Mostafa fabd47ba99 minimodem: less aggressive refine on acquisition 2012-09-05 23:22:27 -07:00
Kamal Mostafa c8dd7ac06b minimodem: fix --rx-one 2012-09-05 09:37:06 -07:00
Kamal Mostafa 3a1469b85e minimodem: fix usage message 2012-09-05 09:36:12 -07:00
Kamal Mostafa 8931ae1311 baudot: use non-Baudot chars for debug output 2012-09-04 15:37:19 -07:00
Kamal Mostafa 30de59026b minimodem: --inverted switches the mark/space freqs 2012-09-04 16:26:10 -07:00
Kamal Mostafa 8731b54bc2 minimodem: refine fsk frame position on carrier acquisition
FSK_ANALYZE_NSTEPS was previously 10.

Now FSK_ANALYZE_NSTEPS_CARRIER_LOCK is 100, and FSK_ANALYZE_NSTEPS is
reduced to 4.

(Also, try_confidence_search_limit = INFINITY on carrier acquisition frame).

Effects: Better initial phase lock on signal in the first
place; sloppier tracking of fast/slow signals; reduced longterm CPU load.
2012-09-03 23:31:16 -07:00
Kamal Mostafa aa1124d6e7 minimodem: fix incorrect try_max_nsamples calculation 2012-09-02 14:25:43 -07:00
Kamal Mostafa fd45b5571c minimodem: restrict try_max_nsamples to 75% of a bit-width
... actually 125% of a bit width before acquiring carrier.
2012-09-02 14:27:04 -07:00
Kamal Mostafa 7b0e47ac4e minimodem: --binary-output 2012-09-01 00:09:32 -07:00
Kamal Mostafa a172268117 minimodem: auto get samplerate from audio files 2012-09-02 18:10:59 -07:00
Kamal Mostafa 0f3338a91b minimodem: match sync_byte in the fsk layer 2012-09-02 12:02:06 -07:00
Kamal Mostafa 9187dd60a7 minimodem: --rx same (NOAA SAME protocol) 2012-09-01 13:34:50 -07:00
Kamal Mostafa 04cc215640 minimodem: --sync-byte {0xXX} 2012-09-01 14:54:32 -07:00
Kamal Mostafa 82c72352ab minimodem: --startbits; deprecate -T 2012-09-01 13:33:49 -07:00
Kamal Mostafa e2a51f093a databits: split out the databits implementations
rename framebits to databits
added databits_binary decoder
2012-08-31 21:39:08 -07:00
Kamal Mostafa a7d1602c9d minimodem: calculate frame_bits_{mask,shift} 2012-08-31 20:42:05 -07:00
Kamal Mostafa cbd048aac6 minimodem: bfsk_nstartsbits variable
- FIXME: doesn't actually implement the proper expect_bits string
 - only useful for testing SAME decoder's hardcoded "dddddddd" expect_bits
2012-08-30 16:02:53 -07:00
Kamal Mostafa 7b34e89433 minimodem: --stopbits replaces --txstopbits; better bps metric
RX metrics account for fractional number of stop bits (e.g 1.5);
RX bps metric slightly more accurate (?).
2012-08-30 15:05:33 -07:00
Kamal Mostafa becf16761e minimodem: fsk confidence thresholds: thresh=1.5, limit=2.3
Note: fsk_confidence_thresh can now be reduced to 1.5 due to track_amplitude.
2012-08-26 15:16:49 -07:00
Kamal Mostafa 3447a994b7 minimodem: track_amplitude signal amplitude drop 2012-08-30 00:07:15 -07:00
Kamal Mostafa 1ed3b8465a fsk: confidence algo #6: "SNR * (1-divergence)"
Disabled all the hardcoded noise limiters.
2012-08-24 22:38:41 -07:00
Kamal Mostafa 0c022aca03 minimodem: --rx-one quits after first no-carrier 2012-08-30 10:17:55 -07:00
Kamal Mostafa b480b841da minimodem: --Xrxnoise=factor adds test noise
Injects random noise to input signal (in memory) before analysis.
2012-08-30 00:00:19 -07:00
Kamal Mostafa 6d749c7771 simpleaudio-alsa: enable ALSA soft-resample 2012-08-29 21:26:47 -07:00
Kamal Mostafa dd6040336d minimodem: stats report ampl={amplitude} 2012-08-25 09:17:05 -07:00
Kamal Mostafa f8434f3c94 simple-tone: fix sin() rounding for S16 shorts
- fix sine wave rounding for shorts
 - short epsilon == 1
 - clamp shorts to mag <= 1.0
2012-08-26 12:34:38 -07:00
Kamal Mostafa 762a3ea788 minimodem: --volume sets tx amplitude 2012-08-25 00:32:11 -07:00
Kamal Mostafa 501ee25c7d fsk: expect_bits_string param, no start/stop bits required
fsk_find_frame() takes expect_bits_string  (e.g. "10dddddddd1"), as a
parameter supplied by the caller allowing for encodings which don't use
any start/stop bits (e.g. just "dddddddd").
2012-08-24 13:20:20 -07:00
Kamal Mostafa 6bb683a90b minimodem: fix broken -l switch 2012-08-23 19:23:33 -07:00
Kamal Mostafa e9263c9c9d fsk: fix noise <= EPSILON handling
Handle noise <= EPSILON better; fixes (im)perfect test cases on i386.
2012-08-19 15:58:08 -07:00
Kamal Mostafa 96ec6450bb minimodem: fix size_t %zu warnings on 32-bit platforms 2012-08-19 14:39:14 -07:00
Kamal Mostafa f81f069d95 minimodem: --limit (2.3) sets fsk_confidence_search_limit
Significant performance enhancements from fsk_confidence_search_limit:
runs far fewer FFT's when --limit (default 2.3) is less than INFINITY.
2012-08-18 21:24:01 -07:00
Kamal Mostafa e1b055cf4f fsk: AVOID_TRANSIENTS noise limiter re-enabled
Algo #5 needs this, just as #3 did.
2012-08-18 19:15:33 -07:00
Kamal Mostafa 076343a9c3 fsk: MIN_MAGNITUDE noise limiter 2012-08-18 19:15:07 -07:00
Kamal Mostafa 725355aa43 fsk: performance: do not bzero fftin 2012-08-18 16:52:07 -07:00
Kamal Mostafa bc30de33a4 minimodem: fix carrier_nsamples
All test cases (except 45.45 RTTY) get rate perfect!
2012-08-18 13:43:45 -07:00
Kamal Mostafa 18b1eb7457 minimodem: default confidence = 2.0 for SNR algo #5 2012-08-18 19:19:22 -07:00
Kamal Mostafa cf9ba20ee0 fsk: confidence algo #5 (SNR)
Computes SNR confidence value, where "signal" is the magnitude of the FSK
driven frequency, and "noise" is the magnitude of the non-driven frequency.

(Also includes unused algo #4 code, which may not compile anymore.)
2012-08-14 22:31:30 -07:00
Kamal Mostafa df80c98e22 minimodem: fsk_frame_overscan replaces FSK_SCAN_LAG 2012-08-16 01:03:54 -07:00
Kamal Mostafa 6ee10626c9 simple-tone: use integer mod not fmod 2012-08-15 16:57:39 -07:00
Kamal Mostafa fbc99e54fb simpleaudio: benchmarks cpu id 2012-08-15 12:00:17 -07:00
Kamal Mostafa 1dff8e726f move src/testcases to ./tests 2012-08-15 11:44:26 -07:00
Kamal Mostafa f6c4697cf9 .gitignore files 2012-08-14 13:29:00 -07:00
Kamal Mostafa 8533fd1550 simpleaudio: fix --benchmarks for sizeof(long)==4 platforms 2012-08-14 08:28:36 -07:00
Kamal Mostafa 67eb9821be update copyright dates 2012-08-13 21:51:53 -07:00
Kamal Mostafa 5fb00dd283 self-test: more test cases 2012-08-13 21:19:08 -07:00
Kamal Mostafa d8ed9bef82 self-test: print the test args 2012-08-13 21:17:38 -07:00
Kamal Mostafa a9c2258706 minimodem: use sine lookup table of 1024, or --lut={tx_sin_table_len} 2012-08-13 21:17:03 -07:00
Kamal Mostafa e2225d6098 simple-tone: sin() lookup tables 2012-08-13 21:09:24 -07:00
Kamal Mostafa d273828f80 minimodem: --float-samples: short arg -F deprecated 2012-08-13 15:55:57 -07:00
Kamal Mostafa bd08b9002c minimodem: --benchmarks: runs internal performance tests 2012-08-13 15:51:04 -07:00
Kamal Mostafa 23ecd6f5a7 simpleaudio: benchmark backend 2012-08-13 15:50:04 -07:00
Kamal Mostafa 9948e7c7dd minimodem: --tx uses S16 samples by default, --float-samples overrides 2012-08-12 15:47:59 -07:00
Kamal Mostafa 6671138471 simpleaudio: S16 format handling for backends 2012-08-12 15:39:04 -07:00
Kamal Mostafa a65a20d274 simpleaudio: generalize r/w buf pointer types 2012-08-12 14:39:23 -07:00
Kamal Mostafa 4d326a8c82 simpleaudio: generalized simpleaudio_open_stream 2012-08-12 14:24:55 -07:00
Kamal Mostafa 5dddc1445a simple-tone: generate S16 format samples 2012-08-11 21:19:30 -07:00
Kamal Mostafa 3053ea78bc simpleaudio: SA_SAMPLE_FORMAT framework 2012-08-11 21:00:37 -07:00
Kamal Mostafa 39bee9adf1 simpleaudio: get_framesize 2012-08-11 20:40:20 -07:00
Kamal Mostafa 07a8ca158b testcases: test-10-verify-perfect 2012-08-11 18:22:43 -07:00
Kamal Mostafa ae6d387d2d self-test: rename testcases 2012-08-11 16:31:05 -07:00
Kamal Mostafa f3a9337f8d self-test: change arg order 2012-08-11 16:25:51 -07:00
Kamal Mostafa 8d90e839d7 minimodem: --samplerate sets the audio sample rate 2012-08-11 10:24:28 -07:00
Kamal Mostafa 22317f54fc simpleaudio: handle any audio sample rate 2012-08-11 10:07:12 -07:00
Kamal Mostafa 500208ba81 simpleaudio-alsa: do not allow soft_resample 2012-08-11 10:28:20 -07:00
Kamal Mostafa b78828ea11 minimodem: usage message fix 2012-08-08 20:18:52 -07:00
Kamal Mostafa 4b926d58bb minimodem: --alsa selects ALSA at runtime
./configure now enables --with-pulseaudio and --with-alsa by default;
either can be disabled.

minimodem --alsa: uses ALSA at runtime instead of the default PulseAudio.
2012-08-08 20:10:55 -07:00
Kamal Mostafa 445156dfa0 minimodem: man page cleanup 2012-08-08 19:58:05 -07:00
Kamal Mostafa d1f8966ff1 simpleaudio-alsa: correct comments 2012-08-08 18:56:01 -07:00
Kamal Mostafa 7cb56487f8 simpleaudio-alsa: do not fiddle with sw params at all 2012-08-08 18:53:24 -07:00
Kamal Mostafa 2baf78cba6 simpleaudio-alsa: use default latency, not minimum 2012-08-08 18:35:11 -07:00
Kamal Mostafa deed39904d simpleaudio-alsa: loop in the sa_ routine; fix xruns 2012-08-08 16:24:44 -07:00
Kamal Mostafa 95d7a87ce1 minimodem: configure --with-alsa for ALSA instead of Pulseaudio 2012-08-08 14:26:39 -07:00
Kamal Mostafa e01ccb1d71 simpleaudio: alsa back-end 2012-08-08 14:25:53 -07:00