Removed speaker 'POP' on squelch opening and when starting TX with squelch open

This commit is contained in:
Silvano Seva 2021-03-16 08:37:57 +01:00
parent c1abeefd67
commit 2bde981222
1 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include <interfaces/platform.h> #include <interfaces/platform.h>
#include <interfaces/delays.h>
#include <interfaces/radio.h> #include <interfaces/radio.h>
#include <string.h> #include <string.h>
#include <rtx.h> #include <rtx.h>
@ -64,6 +65,7 @@ void _afCtrlSpeaker(bool enable)
{ {
#if defined(PLATFORM_MD3x0) || defined(PLATFORM_MDUV380) #if defined(PLATFORM_MD3x0) || defined(PLATFORM_MDUV380)
gpio_setPin(AUDIO_AMP_EN); gpio_setPin(AUDIO_AMP_EN);
delayMs(10);
gpio_clearPin(SPK_MUTE); gpio_clearPin(SPK_MUTE);
#ifdef PLATFORM_MD3x0 #ifdef PLATFORM_MD3x0
gpio_setPin(FM_MUTE); gpio_setPin(FM_MUTE);
@ -75,8 +77,8 @@ void _afCtrlSpeaker(bool enable)
else else
{ {
#if defined(PLATFORM_MD3x0) || defined(PLATFORM_MDUV380) #if defined(PLATFORM_MD3x0) || defined(PLATFORM_MDUV380)
gpio_clearPin(AUDIO_AMP_EN);
gpio_setPin(SPK_MUTE); gpio_setPin(SPK_MUTE);
gpio_clearPin(AUDIO_AMP_EN);
#ifdef PLATFORM_MD3x0 #ifdef PLATFORM_MD3x0
gpio_clearPin(FM_MUTE); gpio_clearPin(FM_MUTE);
#endif #endif
@ -294,6 +296,7 @@ void rtx_taskFunc()
/* TX logic */ /* TX logic */
if(platform_getPttStatus() && (rtxStatus.opStatus != TX)) if(platform_getPttStatus() && (rtxStatus.opStatus != TX))
{ {
_afCtrlSpeaker(false);
radio_disableRtx(); radio_disableRtx();
_afCtrlMic(true); _afCtrlMic(true);