diff --git a/firmware/target/arm/audio-pp.c b/firmware/target/arm/audio-pp.c index 82c5545a3f..91670cb015 100644 --- a/firmware/target/arm/audio-pp.c +++ b/firmware/target/arm/audio-pp.c @@ -23,7 +23,9 @@ void audio_set_output_source(int source) { +#if INPUT_SRC_CAPS != 0 if ((unsigned)source >= AUDIO_NUM_SOURCES) +#endif source = AUDIO_SRC_PLAYBACK; } /* audio_set_output_source */ @@ -32,7 +34,7 @@ void audio_set_source(int source, unsigned flags) (void)flags; /* Prevent pops from unneeded switching */ static int last_source = AUDIO_SRC_PLAYBACK; -#if CONFIG_TUNER +#ifdef HAVE_FMRADIO_REC static bool last_recording = false; #endif @@ -41,11 +43,13 @@ void audio_set_source(int source, unsigned flags) default: /* playback - no recording */ source = AUDIO_SRC_PLAYBACK; case AUDIO_SRC_PLAYBACK: +#ifdef HAVE_RECORDING if (source != last_source) { audiohw_disable_recording(); audiohw_set_monitor(false); } +#endif break; #ifdef HAVE_MIC_REC case AUDIO_SRC_MIC: /* recording only */