diff options
Diffstat (limited to 'firmware/drivers/audio/wm8978.c')
-rw-r--r-- | firmware/drivers/audio/wm8978.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/firmware/drivers/audio/wm8978.c b/firmware/drivers/audio/wm8978.c index eb2e28aa69..e93c33b5ec 100644 --- a/firmware/drivers/audio/wm8978.c +++ b/firmware/drivers/audio/wm8978.c | |||
@@ -346,25 +346,7 @@ void audiohw_set_headphone_vol(int vol_l, int vol_r) | |||
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
349 | void audiohw_close(void) | 349 | static void audiohw_mute(bool mute) |
350 | { | ||
351 | /* 1. Mute all analogue outputs */ | ||
352 | audiohw_mute(true); | ||
353 | audiohw_enable_headphone_jack(false); | ||
354 | |||
355 | /* 2. Disable power management register 1. R1 = 00 */ | ||
356 | wmc_write(WMC_POWER_MANAGEMENT1, 0x000); | ||
357 | |||
358 | /* 3. Disable power management register 2. R2 = 00 */ | ||
359 | wmc_write(WMC_POWER_MANAGEMENT2, 0x000); | ||
360 | |||
361 | /* 4. Disable power management register 3. R3 = 00 */ | ||
362 | wmc_write(WMC_POWER_MANAGEMENT3, 0x000); | ||
363 | |||
364 | /* 5. Remove external power supplies. */ | ||
365 | } | ||
366 | |||
367 | void audiohw_mute(bool mute) | ||
368 | { | 350 | { |
369 | wmc_vol.ahw_mute = mute; | 351 | wmc_vol.ahw_mute = mute; |
370 | 352 | ||
@@ -385,6 +367,24 @@ void audiohw_mute(bool mute) | |||
385 | } | 367 | } |
386 | } | 368 | } |
387 | 369 | ||
370 | void audiohw_close(void) | ||
371 | { | ||
372 | /* 1. Mute all analogue outputs */ | ||
373 | audiohw_mute(true); | ||
374 | audiohw_enable_headphone_jack(false); | ||
375 | |||
376 | /* 2. Disable power management register 1. R1 = 00 */ | ||
377 | wmc_write(WMC_POWER_MANAGEMENT1, 0x000); | ||
378 | |||
379 | /* 3. Disable power management register 2. R2 = 00 */ | ||
380 | wmc_write(WMC_POWER_MANAGEMENT2, 0x000); | ||
381 | |||
382 | /* 4. Disable power management register 3. R3 = 00 */ | ||
383 | wmc_write(WMC_POWER_MANAGEMENT3, 0x000); | ||
384 | |||
385 | /* 5. Remove external power supplies. */ | ||
386 | } | ||
387 | |||
388 | void audiohw_set_frequency(int fsel) | 388 | void audiohw_set_frequency(int fsel) |
389 | { | 389 | { |
390 | /* For 16.9344MHz MCLK, codec as master. */ | 390 | /* For 16.9344MHz MCLK, codec as master. */ |