summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/audio-pp.c6
1 files changed, 5 insertions, 1 deletions
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 @@
23 23
24void audio_set_output_source(int source) 24void audio_set_output_source(int source)
25{ 25{
26#if INPUT_SRC_CAPS != 0
26 if ((unsigned)source >= AUDIO_NUM_SOURCES) 27 if ((unsigned)source >= AUDIO_NUM_SOURCES)
28#endif
27 source = AUDIO_SRC_PLAYBACK; 29 source = AUDIO_SRC_PLAYBACK;
28} /* audio_set_output_source */ 30} /* audio_set_output_source */
29 31
@@ -32,7 +34,7 @@ void audio_set_source(int source, unsigned flags)
32 (void)flags; 34 (void)flags;
33 /* Prevent pops from unneeded switching */ 35 /* Prevent pops from unneeded switching */
34 static int last_source = AUDIO_SRC_PLAYBACK; 36 static int last_source = AUDIO_SRC_PLAYBACK;
35#if CONFIG_TUNER 37#ifdef HAVE_FMRADIO_REC
36 static bool last_recording = false; 38 static bool last_recording = false;
37#endif 39#endif
38 40
@@ -41,11 +43,13 @@ void audio_set_source(int source, unsigned flags)
41 default: /* playback - no recording */ 43 default: /* playback - no recording */
42 source = AUDIO_SRC_PLAYBACK; 44 source = AUDIO_SRC_PLAYBACK;
43 case AUDIO_SRC_PLAYBACK: 45 case AUDIO_SRC_PLAYBACK:
46#ifdef HAVE_RECORDING
44 if (source != last_source) 47 if (source != last_source)
45 { 48 {
46 audiohw_disable_recording(); 49 audiohw_disable_recording();
47 audiohw_set_monitor(false); 50 audiohw_set_monitor(false);
48 } 51 }
52#endif
49 break; 53 break;
50#ifdef HAVE_MIC_REC 54#ifdef HAVE_MIC_REC
51 case AUDIO_SRC_MIC: /* recording only */ 55 case AUDIO_SRC_MIC: /* recording only */