summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-05-20 22:03:11 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-05-20 22:03:11 +0000
commit080d65f17b86865c9a9aeb9f7ba8d5fa27195051 (patch)
tree046350595875f6bc4389f0a771122a8d65f5611f /firmware
parent14b639d179260b1aa80ccc19cac15dada52f4677 (diff)
downloadrockbox-080d65f17b86865c9a9aeb9f7ba8d5fa27195051.tar.gz
rockbox-080d65f17b86865c9a9aeb9f7ba8d5fa27195051.zip
Fix some warnings regarding AUDIO_NUM_SOURCES being 0 which is the intent with no inputs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13452 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-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 @@
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 */