From 91c09650077fb9aacd99eb5ebf3e481767b9b2d8 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Tue, 21 Nov 2023 18:46:03 +0100 Subject: [PATCH] Module17: made M17 baseband output have correct DC bias and amplitude Removed an old workaround for an hardware bug of Module17 rev 0.1b limiting the output swing of baseband signal in newer hardware revisions. Contribution by Mathis Schmieder DB9MAT. --- openrtx/include/protocols/M17/M17Modulator.hpp | 5 ----- platform/drivers/audio/audio_Mod17.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/openrtx/include/protocols/M17/M17Modulator.hpp b/openrtx/include/protocols/M17/M17Modulator.hpp index 49d14dcd..090f935c 100644 --- a/openrtx/include/protocols/M17/M17Modulator.hpp +++ b/openrtx/include/protocols/M17/M17Modulator.hpp @@ -106,13 +106,8 @@ private: static constexpr size_t M17_SAMPLES_PER_SYMBOL = M17_TX_SAMPLE_RATE / M17_SYMBOL_RATE; static constexpr size_t M17_FRAME_SAMPLES = M17_FRAME_SYMBOLS * M17_SAMPLES_PER_SYMBOL; - #ifdef PLATFORM_MOD17 - static constexpr float M17_RRC_GAIN = 15000.0f; - static constexpr float M17_RRC_OFFSET = 11500.0f; - #else static constexpr float M17_RRC_GAIN = 23000.0f; static constexpr float M17_RRC_OFFSET = 0.0f; - #endif std::array< int8_t, M17_FRAME_SYMBOLS > symbols; std::unique_ptr< int16_t[] > baseband_buffer; ///< Buffer for baseband audio handling. diff --git a/platform/drivers/audio/audio_Mod17.c b/platform/drivers/audio/audio_Mod17.c index 3710b17e..cef8d429 100644 --- a/platform/drivers/audio/audio_Mod17.c +++ b/platform/drivers/audio/audio_Mod17.c @@ -43,7 +43,7 @@ static const uint8_t pathCompatibilityMatrix[9][9] = const struct audioDevice outputDevices[] = { {NULL, 0, 0, SINK_MCU}, - {&stm32_dac_audio_driver, (const void *) 1365, STM32_DAC_CH1, SINK_RTX}, + {&stm32_dac_audio_driver, (const void *) 2048, STM32_DAC_CH1, SINK_RTX}, {&stm32_dac_audio_driver, 0, STM32_DAC_CH2, SINK_SPK}, };