diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-04-12 23:35:47 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-04-15 12:02:05 -0400 |
commit | 0c7b7873984e04941c9f21fa272638018fdb9a16 (patch) | |
tree | fb6afca45d2bef0a2c91732a39ffc0b965f5c557 /firmware/drivers/audio/wm8758.c | |
parent | fd9e2568908f91b5bcf7378dc28f6ec070d6027a (diff) | |
download | rockbox-0c7b7873984e04941c9f21fa272638018fdb9a16.tar.gz rockbox-0c7b7873984e04941c9f21fa272638018fdb9a16.zip |
Straighten out the mad twisted state of sound.c and related areas.
This is going right in since it's long overdue. If anything is goofed,
drop me a line or just tweak it yourself if you know what's wrong. :-)
Make HW/SW codec interface more uniform when emulating HW functionality
on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to-
DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX"
APIs are all in sound.c with none in DSP code any longer.
Reduce number of settings definitions needed by each codec by providing
defaults for common ones like balance, channels and SW tone controls.
Remove need for separate SIM code and tables and add virtual codec header
for hosted targets.
Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
Diffstat (limited to 'firmware/drivers/audio/wm8758.c')
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index aa78a7710d..3e0c88c55c 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c | |||
@@ -33,22 +33,6 @@ | |||
33 | #include "audiohw.h" | 33 | #include "audiohw.h" |
34 | #include "sound.h" | 34 | #include "sound.h" |
35 | 35 | ||
36 | const struct sound_settings_info audiohw_settings[] = { | ||
37 | [SOUND_VOLUME] = {"dB", 0, 1, -90, 6, -25}, | ||
38 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 0}, | ||
39 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0}, | ||
40 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
41 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | ||
42 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | ||
43 | #ifdef HAVE_RECORDING | ||
44 | [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 63, 16}, | ||
45 | [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 63, 16}, | ||
46 | [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 63, 16}, | ||
47 | #endif | ||
48 | [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
49 | [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
50 | }; | ||
51 | |||
52 | /* shadow registers */ | 36 | /* shadow registers */ |
53 | static unsigned short eq1_reg = EQ1_EQ3DMODE | EQ_GAIN_VALUE(0); | 37 | static unsigned short eq1_reg = EQ1_EQ3DMODE | EQ_GAIN_VALUE(0); |
54 | static unsigned short eq5_reg = EQ_GAIN_VALUE(0); | 38 | static unsigned short eq5_reg = EQ_GAIN_VALUE(0); |
@@ -96,27 +80,6 @@ static void get_volume_params(int db, int *dac, int *amp) | |||
96 | } | 80 | } |
97 | } | 81 | } |
98 | 82 | ||
99 | int sound_val2phys(int setting, int value) | ||
100 | { | ||
101 | int result; | ||
102 | |||
103 | switch(setting) | ||
104 | { | ||
105 | #ifdef HAVE_RECORDING | ||
106 | case SOUND_LEFT_GAIN: | ||
107 | case SOUND_RIGHT_GAIN: | ||
108 | case SOUND_MIC_GAIN: | ||
109 | result = ((value - 16) * 15) / 2; | ||
110 | break; | ||
111 | #endif | ||
112 | default: | ||
113 | result = value; | ||
114 | break; | ||
115 | } | ||
116 | |||
117 | return result; | ||
118 | } | ||
119 | |||
120 | static void audiohw_mute(bool mute) | 83 | static void audiohw_mute(bool mute) |
121 | { | 84 | { |
122 | if (mute) { | 85 | if (mute) { |