diff options
Diffstat (limited to 'firmware/drivers/audio/wm8758.c')
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index 40ead0cdf2..12ca987bd7 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c | |||
@@ -183,19 +183,15 @@ void audiohw_set_lineout_vol(int vol_l, int vol_r) | |||
183 | 183 | ||
184 | void audiohw_enable_lineout(bool enable) | 184 | void audiohw_enable_lineout(bool enable) |
185 | { | 185 | { |
186 | /* Initialize data without lineout enabling. */ | ||
187 | int pwrmgmt3_data = PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN | ||
188 | | PWRMGMT3_DACENR | PWRMGMT3_DACENL; | ||
189 | /* Set lineout (OUT2), if enabled. */ | ||
186 | if (enable) | 190 | if (enable) |
187 | { | 191 | pwrmgmt3_data |= PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN; |
188 | /* include enabling of OUT2 */ | 192 | |
189 | wmcodec_write(PWRMGMT3, PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN | 193 | /* Set register. */ |
190 | | PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN | 194 | wmcodec_write(PWRMGMT3, pwrmgmt3_data); |
191 | | PWRMGMT3_DACENR | PWRMGMT3_DACENL); | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | /* exclude enabling of OUT2 */ | ||
196 | wmcodec_write(PWRMGMT3, PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN | ||
197 | | PWRMGMT3_DACENR | PWRMGMT3_DACENL); | ||
198 | } | ||
199 | } | 195 | } |
200 | 196 | ||
201 | void audiohw_set_bass(int value) | 197 | void audiohw_set_bass(int value) |