From 619d2226bd70738df43b539a7c469796f3fe929f Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 5 Jun 2007 07:22:26 +0000 Subject: e200: Fix errors from recording addition and a warning that comes up when fixing the errors. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13558 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 2 ++ firmware/sound.c | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index d7bea6f898..5738a34949 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1529,10 +1529,12 @@ bool recording_screen(bool no_source) { switch (global_settings.rec_source) { +#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC) HAVE_LINE_REC_(case AUDIO_SRC_LINEIN:) HAVE_FMRADIO_REC_(case AUDIO_SRC_FMRADIO:) line[i] = 5; break; +#endif case AUDIO_SRC_MIC: line[i] = 4; break; diff --git a/firmware/sound.c b/firmware/sound.c index 0ccf1df260..30b9b6a2d2 100644 --- a/firmware/sound.c +++ b/firmware/sound.c @@ -743,7 +743,7 @@ void sound_set(int setting, int value) sound_set_val(value); } -#ifndef HAVE_AS3514 +#if !defined(HAVE_AS3514) || defined(SIMULATOR) int sound_val2phys(int setting, int value) { #if CONFIG_CODEC == MAS3587F @@ -799,13 +799,31 @@ int sound_val2phys(int setting, int value) result = value; break; } + return result; +#elif defined(HAVE_AS3514) + /* This is here for the sim only and the audio driver has its own */ + int result; + + switch(setting) + { + case SOUND_LEFT_GAIN: + case SOUND_RIGHT_GAIN: + case SOUND_MIC_GAIN: + result = (value - 23) * 15; + break; + + default: + result = value; + break; + } + return result; #else (void)setting; return value; #endif } -#endif /* HAVE_AS3514 */ +#endif /* !defined(HAVE_AS3514) || defined(SIMULATOR) */ #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) #ifndef SIMULATOR -- cgit v1.2.3