Silvano Seva
77dfeef9e7
Implemented audio decoding functions in CODEC2 module
2022-05-27 21:48:47 +02:00
Silvano Seva
c7fbd98dc9
Stub implementatio of output stream driver for GDx devices
2022-05-27 21:48:47 +02:00
Silvano Seva
fda0fed5e7
Moved constant specifying sample rate for M17 baseband decoding from hwconfig.h files to M17Demodulator class
2022-05-27 21:48:47 +02:00
Silvano Seva
e5b5daba85
Moved state variables of PWM compensator and DC removal filter outside the function bodies to allow keeping their consistency among function calls
2022-05-27 21:48:47 +02:00
Silvano Seva
9139b19aac
Fixed bug in MDx input stream driver causing the SPI clock line towards the DMR chip to be set as analog input when an audio stream from the RF stage was opened
2022-05-27 21:48:47 +02:00
Mathis Schmieder
89c05a7332
Adjusted Module17 mic processing gain; interim-fix for DC offset removal
2022-05-27 21:48:47 +02:00
Silvano Seva
49e5486ea6
Parametric mic gain inside codec2 module
2022-05-27 21:48:47 +02:00
Silvano Seva
b144657257
Moved CODEC2 management to a dedicated module
2022-05-27 21:48:47 +02:00
Silvano Seva
4b8685b853
Changed gain and added an offset at tx RRC stage only for Module 17 to compensate for an hardware bug
2022-05-27 21:48:47 +02:00
Silvano Seva
4a3e31cd03
Fixed bug in M17 demodulator caused by the precedent code refactoring
2022-05-27 21:48:47 +02:00
Silvano Seva
d1b4973cc9
Fixed reset of DC bias on stream stop in Module 17 output stream driver, made parametric the gain of the RRC at modulator side
2022-05-27 21:48:47 +02:00
Silvano Seva
94fdf44954
Biased Module 17 baseband DAC output to Vdd/2 when idle
2022-05-27 21:48:47 +02:00
Silvano Seva
83020d4fa3
Increased priority of CODEC2 thread, this fixes glitches when generating M17 baseband signal
2022-05-27 21:48:47 +02:00
Silvano Seva
628c341712
Small improvements to MDx and Module 17 output stream drivers
2022-05-27 21:48:47 +02:00
Silvano Seva
1bc1316f7d
Fixed bug to Module 17 input stream driver causing the thread waiting on inputStream_getData() to not be woken up when stream was stopped
2022-05-27 21:48:47 +02:00
Silvano Seva
12dc186129
Fixed bug in Module 17 output stream driver causing outputStream_sync() to hang when a stream was opened for the second time
2022-05-27 21:48:47 +02:00
Silvano Seva
eb22e4b4b2
Default VFO channel for Module 17, making it start in M17 operating mode at boot
2022-05-27 21:48:47 +02:00
Silvano Seva
3d169484e9
Improved management of CODEC2 thread in M17 mode handler, now activated only when transmitting. Fixes a confict with RTX and MIC input streams causing the rtx thread to hang when PTT was pressed
2022-05-27 21:48:47 +02:00
Silvano Seva
54a89abcd0
Removed a printf left behind after debugging from M17 demodulator class and slightly cleaned up the code
2022-05-27 21:48:47 +02:00
Silvano Seva
163a2ef06a
Updated Module 17 output stream driver to support also double buffered mode
2022-05-27 21:48:47 +02:00
Silvano Seva
c9a4bfb199
Cleanup and refactoring of M17 modulator class, now using output streams for baseband signal output
2022-05-27 21:48:47 +02:00
Silvano Seva
0df1dc4f7e
Extended output stream API to support also circular double-buffered mode, implemented output stream driver for MDx
2022-05-27 21:48:47 +02:00
Silvano Seva
034f5d9ee9
Removed API for audio stream playback from MDx tone generator
2022-05-27 21:48:47 +02:00
Silvano Seva
5c90c19bea
Data conversion utilities
2022-05-27 21:48:47 +02:00
Silvano Seva
7891288030
Fixed compilation warnings generated by graphics.cpp
2022-05-27 21:48:47 +02:00
Silvano Seva
427c5f50b3
Made M17Demodulator::update() return a boolean indicating when a new decoded frame is ready
2022-05-27 21:48:47 +02:00
Niccolò Izzo
3372da2b64
Set Rx test to 48k
2022-05-27 21:48:47 +02:00
Niccolò Izzo
77aead675a
Improve runtime performance of M17 Demodulator
...
Tweaked the exponential moving average alpha factors to improve the
reactivity of the M17 demodulator.
TG-81
2022-05-27 21:48:47 +02:00
Niccolò Izzo
5ef145cd39
Add fuzzy syncword validation
...
Now syncword match is not exact but can tolerate up to two erroneous
bits.
TG-81
2022-05-27 21:48:47 +02:00
Niccolò Izzo
ca49b306b9
Update constants for M17 demodulation
...
Constants were updated to increase performance based on baseband sample
collected with Module17.
TG-81
2022-05-27 21:48:47 +02:00
Niccolò Izzo
2d8c696a09
Complete M17 demodulator implementation
...
Make quantization work also on DC offset signal
Add samples plot code
Fix bug in buffer wrap around
Fix oob memory access in M17 modulator
Update tests with DC offset signal
Switch to 48KHz sample rate for Module17 and MD380
Add DC biasing script
TG-81
2022-05-27 21:48:46 +02:00
Silvano Seva
10b8b59e21
Added to MDx tone generator API functions allowing user code to temporarily disable generation of 'beep' tones
2022-05-27 21:48:46 +02:00
Niccolò Izzo
f9c23452bc
Add plotting function to graphics library
...
Added plotting function to graphics library which is native C++, so
refactored the graphics source file to allow that, consequently adapted
the hwconfig header files to be included also in C++ sources.
Propagated compile flags also to C++ sources, including asan what was
previously disabled for C++ compilation units.
TG-81
2022-05-27 21:48:46 +02:00
Niccolò Izzo
ae26cca46f
Remove SPS
...
Now M17_SAPLES_PER_SYMBOL is computed dinamically from sample rate.
TG-81
2022-05-27 21:48:46 +02:00
Niccolò Izzo
a091bca35f
M17 Demodulator bugfixes
...
Fixed several bugs in the M17 Demodulator code.
TG-81
2022-05-27 21:48:46 +02:00
Silvano Seva
d2c7be9cc8
Fixed bug affecting LSF reassembling from LICH segments inside M17 frame decoder class
2022-05-27 21:48:46 +02:00
Silvano Seva
35c1f062c6
Implementation of M17 frame encoder
2022-05-27 21:48:46 +02:00
Silvano Seva
82dd0a63f1
Clarification of naming: renamed DATA_SYNC_WORD to STREAM_SYNC_WORD and Audio_puncture to DATA_PUNCTURE
2022-05-27 21:48:46 +02:00
Silvano Seva
25087b0e02
Removed BUF_CIRC from the possible buffer management modes for an input audio stream
2022-05-27 21:48:46 +02:00
Silvano Seva
5fbd39959c
Implementation of M17 frame decoder
2022-05-27 21:48:46 +02:00
Silvano Seva
49bd8ee2f4
Reorganised internal structure of M17LinkSetupFrame class, renamed M17Frame to M17StreamFrame and reorganised its structure
2022-05-27 21:48:46 +02:00
Silvano Seva
c73aa92305
Reorganised M17LinkSetupframe and M17Frame classes, encapsulating structs defining their internal data structure
2022-05-27 21:48:46 +02:00
Silvano Seva
8f63d349a2
Temporarily deactivating M17 demodulator until fully debugged as it makes the radio crash
2022-05-27 21:48:46 +02:00
Niccolò Izzo
7a9bbfcaf2
Demodulator bugfix
...
Fix several bugs in the demodulator code, tipycally sign errors.
2022-05-27 21:48:46 +02:00
Niccolò Izzo
1a9b3c4168
Implement M17 demodulator logic
...
Implemented frame wrapping logic and demodulator loop.
2022-05-27 21:48:46 +02:00
Silvano Seva
963fbdc141
M17 mode handler: calling demodulator update function when in RX mode
2022-05-27 21:48:46 +02:00
Niccolò Izzo
d22948a096
Fix naming error
...
Replaced FM with OPMODE_FM and DMR with OPMODE_DMR.
2022-05-27 21:48:46 +02:00
Niccolò Izzo
5bf4df75ba
Fine tune demodulator to OpenRTX M17 baseband
...
Fine tuned M17 demodulator with code generated from OpenRTX itself.
TG-81
2022-05-27 21:48:46 +02:00
Niccolò Izzo
4b498689f5
Replace RRC filter taps, update M17 testsuite
...
RRC filter taps have been replaced with the ones generated by Wojciech,
a new baseband for the M17 demodulation testsuite has been generated,
using OpenRTX itself and some further minor changes.
TG-81
2022-05-27 21:48:46 +02:00
Niccolò Izzo
3163dd49d7
Add M17 demodulator code and tests
...
Added implementation of the M17 4FSK demodulator, including clock
recovery, phase detection, and quantization algorithms.
A testsuite is also included to do regression testing against a
reference baseband pre-generated and the corresponding reference
bitstream.
A 1% BER is still present due to a fault likely in the RRC filtering,
since the eye diagram of the filtered stream is bad.
TG-81
2022-05-27 21:48:46 +02:00