diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/audio/as3514.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/tlv320.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/uda1380.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8731l.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8751.c | 3 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8975.c | 4 | ||||
-rw-r--r-- | firmware/export/as3514.h | 1 | ||||
-rw-r--r-- | firmware/export/audiohw.h | 7 | ||||
-rw-r--r-- | firmware/export/tlv320.h | 1 | ||||
-rw-r--r-- | firmware/export/uda1380.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8731l.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8751.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8758.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8975.h | 1 |
15 files changed, 16 insertions, 25 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 12a72fe0dd..a0a84e51c9 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c | |||
@@ -267,15 +267,13 @@ int audiohw_set_lineout_vol(int vol_l, int vol_r) | |||
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | 269 | ||
270 | int audiohw_mute(int mute) | 270 | void audiohw_mute(int mute) |
271 | { | 271 | { |
272 | if (mute) { | 272 | if (mute) { |
273 | as3514_write_or(HPH_OUT_L, (1 << 7)); | 273 | as3514_write_or(HPH_OUT_L, (1 << 7)); |
274 | } else { | 274 | } else { |
275 | as3514_write_and(HPH_OUT_L, ~(1 << 7)); | 275 | as3514_write_and(HPH_OUT_L, ~(1 << 7)); |
276 | } | 276 | } |
277 | |||
278 | return 0; | ||
279 | } | 277 | } |
280 | 278 | ||
281 | /* Nice shutdown of WM8758 codec */ | 279 | /* Nice shutdown of WM8758 codec */ |
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c index 85d12602b2..2e43baaf8f 100644 --- a/firmware/drivers/audio/tlv320.c +++ b/firmware/drivers/audio/tlv320.c | |||
@@ -219,10 +219,10 @@ void audiohw_set_recvol(int left, int right, int type) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | /** | 221 | /** |
222 | * Mute (mute=true) or enable sound (mute=false) | 222 | * Mute (mute=1) or enable sound (mute=0) |
223 | * | 223 | * |
224 | */ | 224 | */ |
225 | void audiohw_mute(bool mute) | 225 | void audiohw_mute(int mute) |
226 | { | 226 | { |
227 | unsigned value_dap = tlv320_regs[REG_DAP]; | 227 | unsigned value_dap = tlv320_regs[REG_DAP]; |
228 | unsigned value_l, value_r; | 228 | unsigned value_l, value_r; |
diff --git a/firmware/drivers/audio/uda1380.c b/firmware/drivers/audio/uda1380.c index 5c807de70b..ab0ff81352 100644 --- a/firmware/drivers/audio/uda1380.c +++ b/firmware/drivers/audio/uda1380.c | |||
@@ -163,7 +163,7 @@ void audiohw_set_treble(int value) | |||
163 | * Mute (mute=1) or enable sound (mute=0) | 163 | * Mute (mute=1) or enable sound (mute=0) |
164 | * | 164 | * |
165 | */ | 165 | */ |
166 | int audiohw_mute(int mute) | 166 | void audiohw_mute(int mute) |
167 | { | 167 | { |
168 | unsigned int value = uda1380_regs[REG_MUTE]; | 168 | unsigned int value = uda1380_regs[REG_MUTE]; |
169 | 169 | ||
@@ -172,7 +172,7 @@ int audiohw_mute(int mute) | |||
172 | else | 172 | else |
173 | value = value & ~MUTE_MASTER; | 173 | value = value & ~MUTE_MASTER; |
174 | 174 | ||
175 | return uda1380_write_reg(REG_MUTE, value); | 175 | uda1380_write_reg(REG_MUTE, value); |
176 | } | 176 | } |
177 | 177 | ||
178 | /* Returns 0 if successful or -1 if some register failed */ | 178 | /* Returns 0 if successful or -1 if some register failed */ |
diff --git a/firmware/drivers/audio/wm8731l.c b/firmware/drivers/audio/wm8731l.c index 4c4f7cb1e7..c87c7d0125 100644 --- a/firmware/drivers/audio/wm8731l.c +++ b/firmware/drivers/audio/wm8731l.c | |||
@@ -82,7 +82,7 @@ int tenthdb2mixer(int db) | |||
82 | return -db * 2 / 5; | 82 | return -db * 2 / 5; |
83 | } | 83 | } |
84 | 84 | ||
85 | int audiohw_mute(int mute) | 85 | void audiohw_mute(int mute) |
86 | { | 86 | { |
87 | if (mute) | 87 | if (mute) |
88 | { | 88 | { |
@@ -92,8 +92,6 @@ int audiohw_mute(int mute) | |||
92 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ | 92 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ |
93 | wmcodec_write(DACCTRL, 0x0); | 93 | wmcodec_write(DACCTRL, 0x0); |
94 | } | 94 | } |
95 | |||
96 | return 0; | ||
97 | } | 95 | } |
98 | 96 | ||
99 | /** From ipodLinux **/ | 97 | /** From ipodLinux **/ |
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index 533bb7063a..346b4239a4 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c | |||
@@ -168,12 +168,11 @@ void audiohw_set_treble(int value) | |||
168 | TREBCTRL_TREB(tone_tenthdb2hw(value))); | 168 | TREBCTRL_TREB(tone_tenthdb2hw(value))); |
169 | } | 169 | } |
170 | 170 | ||
171 | int audiohw_mute(int mute) | 171 | void audiohw_mute(int mute) |
172 | { | 172 | { |
173 | /* Mute: Set DACMU = 1 to soft-mute the audio DACs. */ | 173 | /* Mute: Set DACMU = 1 to soft-mute the audio DACs. */ |
174 | /* Unmute: Set DACMU = 0 to soft-un-mute the audio DACs. */ | 174 | /* Unmute: Set DACMU = 0 to soft-un-mute the audio DACs. */ |
175 | wmcodec_write(DACCTRL, mute ? DACCTRL_DACMU : 0); | 175 | wmcodec_write(DACCTRL, mute ? DACCTRL_DACMU : 0); |
176 | return 0; | ||
177 | } | 176 | } |
178 | 177 | ||
179 | /* Nice shutdown of WM8751 codec */ | 178 | /* Nice shutdown of WM8751 codec */ |
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index b73257ce51..bf3ec4c1de 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c | |||
@@ -151,7 +151,7 @@ void audiohw_set_treble(int value) | |||
151 | (void)value; | 151 | (void)value; |
152 | } | 152 | } |
153 | 153 | ||
154 | int audiohw_mute(int mute) | 154 | void audiohw_mute(int mute) |
155 | { | 155 | { |
156 | if (mute) | 156 | if (mute) |
157 | { | 157 | { |
@@ -161,8 +161,6 @@ int audiohw_mute(int mute) | |||
161 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ | 161 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ |
162 | wmcodec_write(DACCTRL, 0x0); | 162 | wmcodec_write(DACCTRL, 0x0); |
163 | } | 163 | } |
164 | |||
165 | return 0; | ||
166 | } | 164 | } |
167 | 165 | ||
168 | /* Nice shutdown of WM8758 codec */ | 166 | /* Nice shutdown of WM8758 codec */ |
diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c index 9adba907a7..5f90ff0a38 100644 --- a/firmware/drivers/audio/wm8975.c +++ b/firmware/drivers/audio/wm8975.c | |||
@@ -190,7 +190,7 @@ void audiohw_set_treble(int value) | |||
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | int audiohw_mute(int mute) | 193 | void audiohw_mute(int mute) |
194 | { | 194 | { |
195 | if (mute) | 195 | if (mute) |
196 | { | 196 | { |
@@ -200,8 +200,6 @@ int audiohw_mute(int mute) | |||
200 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ | 200 | /* Set DACMU = 0 to soft-un-mute the audio DACs. */ |
201 | wmcodec_write(DACCTRL, 0x0); | 201 | wmcodec_write(DACCTRL, 0x0); |
202 | } | 202 | } |
203 | |||
204 | return 0; | ||
205 | } | 203 | } |
206 | 204 | ||
207 | /* Nice shutdown of WM8975 codec */ | 205 | /* Nice shutdown of WM8975 codec */ |
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h index 5f37fd7fcf..98656c701d 100644 --- a/firmware/export/as3514.h +++ b/firmware/export/as3514.h | |||
@@ -29,7 +29,6 @@ extern int audiohw_init(void); | |||
29 | extern void audiohw_enable_output(bool enable); | 29 | extern void audiohw_enable_output(bool enable); |
30 | extern int audiohw_set_master_vol(int vol_l, int vol_r); | 30 | extern int audiohw_set_master_vol(int vol_l, int vol_r); |
31 | extern int audiohw_set_lineout_vol(int vol_l, int vol_r); | 31 | extern int audiohw_set_lineout_vol(int vol_l, int vol_r); |
32 | extern int audiohw_mute(int mute); | ||
33 | extern void audiohw_close(void); | 32 | extern void audiohw_close(void); |
34 | extern void audiohw_set_sample_rate(int sampling_control); | 33 | extern void audiohw_set_sample_rate(int sampling_control); |
35 | 34 | ||
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 65a2466dfc..b266868be2 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h | |||
@@ -89,4 +89,11 @@ struct sound_settings_info { | |||
89 | * its audio settings. Keep in mind that the order must be correct! */ | 89 | * its audio settings. Keep in mind that the order must be correct! */ |
90 | extern const struct sound_settings_info audiohw_settings[]; | 90 | extern const struct sound_settings_info audiohw_settings[]; |
91 | 91 | ||
92 | /* All usable functions implemented by a audio codec drivers. Most of | ||
93 | * the function in sound settings are only called, when in audio codecs | ||
94 | * .h file suitable defines are added. | ||
95 | */ | ||
96 | |||
97 | void audiohw_mute(int mute); | ||
98 | |||
92 | #endif /* _AUDIOHW_H_ */ | 99 | #endif /* _AUDIOHW_H_ */ |
diff --git a/firmware/export/tlv320.h b/firmware/export/tlv320.h index ebb126ddf5..15ac794cca 100644 --- a/firmware/export/tlv320.h +++ b/firmware/export/tlv320.h | |||
@@ -42,7 +42,6 @@ extern void audiohw_set_frequency(unsigned fsel); | |||
42 | extern void audiohw_enable_output(bool enable); | 42 | extern void audiohw_enable_output(bool enable); |
43 | extern void audiohw_set_headphone_vol(int vol_l, int vol_r); | 43 | extern void audiohw_set_headphone_vol(int vol_l, int vol_r); |
44 | extern void audiohw_set_recvol(int left, int right, int type); | 44 | extern void audiohw_set_recvol(int left, int right, int type); |
45 | extern void audiohw_mute(bool mute); | ||
46 | extern void audiohw_close(void); | 45 | extern void audiohw_close(void); |
47 | extern void audiohw_enable_recording(bool source_mic); | 46 | extern void audiohw_enable_recording(bool source_mic); |
48 | extern void audiohw_disable_recording(void); | 47 | extern void audiohw_disable_recording(void); |
diff --git a/firmware/export/uda1380.h b/firmware/export/uda1380.h index c1fb6421ff..fd1b838b04 100644 --- a/firmware/export/uda1380.h +++ b/firmware/export/uda1380.h | |||
@@ -34,7 +34,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); | |||
34 | extern int audiohw_set_mixer_vol(int channel1, int channel2); | 34 | extern int audiohw_set_mixer_vol(int channel1, int channel2); |
35 | extern void audiohw_set_bass(int value); | 35 | extern void audiohw_set_bass(int value); |
36 | extern void audiohw_set_treble(int value); | 36 | extern void audiohw_set_treble(int value); |
37 | extern int audiohw_mute(int mute); | ||
38 | extern void audiohw_close(void); | 37 | extern void audiohw_close(void); |
39 | /** | 38 | /** |
40 | * Sets frequency settings for DAC and ADC relative to MCLK | 39 | * Sets frequency settings for DAC and ADC relative to MCLK |
diff --git a/firmware/export/wm8731l.h b/firmware/export/wm8731l.h index 5ef6d694e5..74e41a73d7 100644 --- a/firmware/export/wm8731l.h +++ b/firmware/export/wm8731l.h | |||
@@ -34,7 +34,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); | |||
34 | extern int audiohw_set_mixer_vol(int channel1, int channel2); | 34 | extern int audiohw_set_mixer_vol(int channel1, int channel2); |
35 | extern void audiohw_set_bass(int value); | 35 | extern void audiohw_set_bass(int value); |
36 | extern void audiohw_set_treble(int value); | 36 | extern void audiohw_set_treble(int value); |
37 | extern int audiohw_mute(int mute); | ||
38 | extern void audiohw_close(void); | 37 | extern void audiohw_close(void); |
39 | extern void audiohw_set_nsorder(int order); | 38 | extern void audiohw_set_nsorder(int order); |
40 | extern void audiohw_set_sample_rate(int sampling_control); | 39 | extern void audiohw_set_sample_rate(int sampling_control); |
diff --git a/firmware/export/wm8751.h b/firmware/export/wm8751.h index efeaa3609d..89d2c6b21c 100644 --- a/firmware/export/wm8751.h +++ b/firmware/export/wm8751.h | |||
@@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); | 35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); |
36 | extern void audiohw_set_bass(int value); | 36 | extern void audiohw_set_bass(int value); |
37 | extern void audiohw_set_treble(int value); | 37 | extern void audiohw_set_treble(int value); |
38 | extern int audiohw_mute(int mute); | ||
39 | extern void audiohw_close(void); | 38 | extern void audiohw_close(void); |
40 | extern void audiohw_set_frequency(int fsel); | 39 | extern void audiohw_set_frequency(int fsel); |
41 | 40 | ||
diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index 5715f100da..e86af87f51 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h | |||
@@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); | 35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); |
36 | extern void audiohw_set_bass(int value); | 36 | extern void audiohw_set_bass(int value); |
37 | extern void audiohw_set_treble(int value); | 37 | extern void audiohw_set_treble(int value); |
38 | extern int audiohw_mute(int mute); | ||
39 | extern void audiohw_close(void); | 38 | extern void audiohw_close(void); |
40 | extern void audiohw_set_nsorder(int order); | 39 | extern void audiohw_set_nsorder(int order); |
41 | extern void audiohw_set_sample_rate(int sampling_control); | 40 | extern void audiohw_set_sample_rate(int sampling_control); |
diff --git a/firmware/export/wm8975.h b/firmware/export/wm8975.h index c00303a6a8..609e05c622 100644 --- a/firmware/export/wm8975.h +++ b/firmware/export/wm8975.h | |||
@@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); | 35 | extern int audiohw_set_mixer_vol(int channel1, int channel2); |
36 | extern void audiohw_set_bass(int value); | 36 | extern void audiohw_set_bass(int value); |
37 | extern void audiohw_set_treble(int value); | 37 | extern void audiohw_set_treble(int value); |
38 | extern int audiohw_mute(int mute); | ||
39 | extern void audiohw_close(void); | 38 | extern void audiohw_close(void); |
40 | extern void audiohw_set_nsorder(int order); | 39 | extern void audiohw_set_nsorder(int order); |
41 | extern void audiohw_set_sample_rate(int sampling_control); | 40 | extern void audiohw_set_sample_rate(int sampling_control); |