summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-02 16:33:26 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-02 16:33:26 +0000
commit0e6088fc9cdadbd488da990488944e177a19bfe5 (patch)
treef9492f273ded5089a43d81b8e5c79a6658a87227 /firmware/mpeg.c
parent175747d0ec64afbef48025d9ec0cdc9f573d448d (diff)
Changed .eq file format to simple 'setting: value' model.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2478 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index c6e95dd588..6e2cabe172 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -1757,6 +1757,51 @@ int mpeg_val2phys(int setting, int value)
return result;
}
+int mpeg_phys2val(int setting, int value)
+{
+ int result = 0;
+
+ switch(setting)
+ {
+ case SOUND_VOLUME:
+ result = value / 2;
+ break;
+
+ case SOUND_BALANCE:
+ result = value / 2;
+ break;
+
+ case SOUND_BASS:
+#ifdef HAVE_MAS3587F
+ result = value + 12;
+#else
+ result = value + 15;
+#endif
+ break;
+
+ case SOUND_TREBLE:
+#ifdef HAVE_MAS3587F
+ result = value + 12;
+#else
+ result = value + 15;
+#endif
+ break;
+
+#ifdef HAVE_MAS3587F
+ case SOUND_LOUDNESS:
+ result = value;
+ break;
+
+ case SOUND_SUPERBASS:
+ result = value / 10;
+ break;
+#endif
+ }
+
+ return result;
+}
+
+
void mpeg_sound_channel_config(int configuration)
{
#ifdef SIMULATOR