summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-06-05 07:22:26 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-06-05 07:22:26 +0000
commit619d2226bd70738df43b539a7c469796f3fe929f (patch)
tree3417037c30d242faf38831fd4c55408ce0f52185
parentbcb8a884ee256e31d45a46bdeb83423457ac48d2 (diff)
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
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--firmware/sound.c22
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
@@ -800,12 +800,30 @@ int sound_val2phys(int setting, int 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