summaryrefslogtreecommitdiffstats
path: root/firmware
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 /firmware
parentbcb8a884ee256e31d45a46bdeb83423457ac48d2 (diff)
downloadrockbox-619d2226bd70738df43b539a7c469796f3fe929f.tar.gz
rockbox-619d2226bd70738df43b539a7c469796f3fe929f.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/sound.c22
1 files changed, 20 insertions, 2 deletions
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