diff --git a/platform/drivers/baseband/HR_C6000_UV3x0.cpp b/platform/drivers/baseband/HR_C6000_UV3x0.cpp index 4fc23c4c..46f5ce04 100644 --- a/platform/drivers/baseband/HR_C6000_UV3x0.cpp +++ b/platform/drivers/baseband/HR_C6000_UV3x0.cpp @@ -205,7 +205,7 @@ void HR_Cx000< M >::startAnalogTx(const TxAudioSource source, const FmConfig cfg if(source == TxAudioSource::LINE_IN) audioCfg |= 0x02; writeReg(M::CONFIG, 0xE2, 0x00); // Mic preamp disabled, anti-pop disabled - writeReg(M::CONFIG, 0xE4, 0x23); // Lineout gain, first and second stage mic gain +// writeReg(M::CONFIG, 0xE4, 0x23); // Lineout gain, first and second stage mic gain writeReg(M::CONFIG, 0xC2, 0x00); // Codec AGC gain writeReg(M::CONFIG, 0xA1, 0x80); // FM_mod, all modes cleared writeReg(M::CONFIG, 0x83, 0xFF); // Clear all interrupt flags diff --git a/platform/drivers/baseband/radio_UV3x0.cpp b/platform/drivers/baseband/radio_UV3x0.cpp index 110197f2..54d2db9a 100644 --- a/platform/drivers/baseband/radio_UV3x0.cpp +++ b/platform/drivers/baseband/radio_UV3x0.cpp @@ -113,8 +113,9 @@ void radio_setOpmode(const enum opmode mode) switch(mode) { case FM: - at1846s.setOpMode(AT1846S_OpMode::FM); - C6000.fmMode(); + at1846s.setOpMode(AT1846S_OpMode::FM); // AT1846S in FM mode + C6000.fmMode(); // HR_C6000 in FM mode + C6000.setInputGain(-3); // Input gain in dB, as per TYT firmware break; case DMR: @@ -123,7 +124,9 @@ void radio_setOpmode(const enum opmode mode) break; case M17: - // TODO + at1846s.setOpMode(AT1846S_OpMode::DMR); // AT1846S in DMR mode, disables RX filter + C6000.fmMode(); // HR_C6000 in FM mode + C6000.setInputGain(+3); // Input gain in dB, found experimentally break; default: diff --git a/platform/targets/MD-UV3x0/platform.c b/platform/targets/MD-UV3x0/platform.c index 7b613d87..d1cd9d64 100644 --- a/platform/targets/MD-UV3x0/platform.c +++ b/platform/targets/MD-UV3x0/platform.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ void platform_init() nvm_init(); /* Initialise non volatile memory manager */ nvm_readCalibData(&calibration); /* Load calibration data */ nvm_loadHwInfo(&hwInfo); /* Load hardware information data */ + toneGen_init(); /* Initialise tone generator */ rtc_init(); /* Initialise RTC */ chSelector_init(); /* Initialise channel selector handler */ audio_init(); /* Initialise audio management module */ @@ -85,6 +87,7 @@ void platform_terminate() adc1_terminate(); nvm_terminate(); rtc_terminate(); + toneGen_terminate(); chSelector_terminate(); audio_terminate();