diff options
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r-- | firmware/drivers/audio/aic3x.c | 10 | ||||
-rw-r--r-- | firmware/drivers/audio/ak4537.c | 15 | ||||
-rw-r--r-- | firmware/drivers/audio/imx233-codec.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/mas35xx.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8731.c | 23 |
5 files changed, 2 insertions, 50 deletions
diff --git a/firmware/drivers/audio/aic3x.c b/firmware/drivers/audio/aic3x.c index 08c4db3f53..60330f1779 100644 --- a/firmware/drivers/audio/aic3x.c +++ b/firmware/drivers/audio/aic3x.c | |||
@@ -33,16 +33,6 @@ | |||
33 | 33 | ||
34 | static char volume_left = 0, volume_right = 0; | 34 | static char volume_left = 0, volume_right = 0; |
35 | 35 | ||
36 | const struct sound_settings_info audiohw_settings[] = { | ||
37 | [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN/10, VOLUME_MAX/10, -25}, | ||
38 | /* HAVE_SW_TONE_CONTROLS */ | ||
39 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | ||
40 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | ||
41 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
42 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | ||
43 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | ||
44 | }; | ||
45 | |||
46 | /* convert tenth of dB volume to master volume register value */ | 36 | /* convert tenth of dB volume to master volume register value */ |
47 | static int vol_tenthdb2hw(int db) | 37 | static int vol_tenthdb2hw(int db) |
48 | { | 38 | { |
diff --git a/firmware/drivers/audio/ak4537.c b/firmware/drivers/audio/ak4537.c index 6f4e85a7fa..1628af8a5c 100644 --- a/firmware/drivers/audio/ak4537.c +++ b/firmware/drivers/audio/ak4537.c | |||
@@ -31,21 +31,6 @@ | |||
31 | #include "audiohw.h" | 31 | #include "audiohw.h" |
32 | #include "sound.h" | 32 | #include "sound.h" |
33 | 33 | ||
34 | const struct sound_settings_info audiohw_settings[] = { | ||
35 | [SOUND_VOLUME] = {"dB", 0, 1,-127, 0, -25}, | ||
36 | /* HAVE_SW_TONE_CONTROLS */ | ||
37 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | ||
38 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | ||
39 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
40 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | ||
41 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | ||
42 | #if defined(HAVE_RECORDING) | ||
43 | [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23}, | ||
44 | [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23}, | ||
45 | [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 0}, | ||
46 | #endif | ||
47 | }; | ||
48 | |||
49 | static unsigned char akc_regs[AKC_NUM_REGS]; | 34 | static unsigned char akc_regs[AKC_NUM_REGS]; |
50 | 35 | ||
51 | static void akc_write(int reg, unsigned val) | 36 | static void akc_write(int reg, unsigned val) |
diff --git a/firmware/drivers/audio/imx233-codec.c b/firmware/drivers/audio/imx233-codec.c index ef4e3ca1d5..f808a73fae 100644 --- a/firmware/drivers/audio/imx233-codec.c +++ b/firmware/drivers/audio/imx233-codec.c | |||
@@ -43,7 +43,7 @@ void audiohw_close(void) | |||
43 | imx233_audioin_close(); | 43 | imx233_audioin_close(); |
44 | } | 44 | } |
45 | 45 | ||
46 | void audiohw_set_headphone_vol(int vol_l, int vol_r) | 46 | void audiohw_set_volume(int vol_l, int vol_r) |
47 | { | 47 | { |
48 | imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5); | 48 | imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5); |
49 | } | 49 | } |
diff --git a/firmware/drivers/audio/mas35xx.c b/firmware/drivers/audio/mas35xx.c index deb9223187..65c582c79c 100644 --- a/firmware/drivers/audio/mas35xx.c +++ b/firmware/drivers/audio/mas35xx.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "system.h" /* MAX MIN macros */ | 26 | #include "system.h" /* MAX MIN macros */ |
27 | #include "audiohw.h" | 27 | #include "sound.h" |
28 | 28 | ||
29 | int channel_configuration = SOUND_CHAN_STEREO; | 29 | int channel_configuration = SOUND_CHAN_STEREO; |
30 | int stereo_width = 100; | 30 | int stereo_width = 100; |
diff --git a/firmware/drivers/audio/wm8731.c b/firmware/drivers/audio/wm8731.c index 3689a28f31..f84edc55da 100644 --- a/firmware/drivers/audio/wm8731.c +++ b/firmware/drivers/audio/wm8731.c | |||
@@ -93,29 +93,6 @@ static void wmc_write_masked(int reg, unsigned bits, unsigned mask) | |||
93 | wmc_write(reg, (wmc_regs[reg] & ~mask) | (bits & mask)); | 93 | wmc_write(reg, (wmc_regs[reg] & ~mask) | (bits & mask)); |
94 | } | 94 | } |
95 | 95 | ||
96 | int sound_val2phys(int setting, int value) | ||
97 | { | ||
98 | int result; | ||
99 | |||
100 | switch(setting) | ||
101 | { | ||
102 | #ifdef HAVE_RECORDING | ||
103 | case SOUND_LEFT_GAIN: | ||
104 | case SOUND_RIGHT_GAIN: | ||
105 | result = (value - 23) * 15; | ||
106 | break; | ||
107 | case SOUND_MIC_GAIN: | ||
108 | result = value * 200; | ||
109 | break; | ||
110 | #endif | ||
111 | default: | ||
112 | result = value; | ||
113 | break; | ||
114 | } | ||
115 | |||
116 | return result; | ||
117 | } | ||
118 | |||
119 | /* convert tenth of dB volume (-730..60) to master volume register value */ | 96 | /* convert tenth of dB volume (-730..60) to master volume register value */ |
120 | static int vol_tenthdb2hw(int db) | 97 | static int vol_tenthdb2hw(int db) |
121 | { | 98 | { |