From a966a967c56f40f99bc69940e6451d5ce92ab7eb Mon Sep 17 00:00:00 2001 From: sam_chen Date: Tue, 2 Apr 2013 10:46:45 +0800 Subject: [PATCH] Audio: headset: Disable bandgap power according to codec bandgap status. Change-Id: Ieefd76b0cc02fd58e240a934fd9f84b309d48c5b Signed-off-by: sam_chen --- sound/soc/msm/asustek_headset.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/msm/asustek_headset.c b/sound/soc/msm/asustek_headset.c index c2c4127db4f..504872fc8d8 100644 --- a/sound/soc/msm/asustek_headset.c +++ b/sound/soc/msm/asustek_headset.c @@ -38,6 +38,7 @@ #include #include #include +#include "../codecs/wcd9310.h" #include "../../../arch/arm/mach-msm/board-8960.h" #include #include @@ -119,9 +120,13 @@ static void set_hs_micbias(int status) 0xC0, 0x00); snd_soc_update_bits(wcd9310_codec, TABLA_A_LDO_H_MODE_1, 0xff, 0x65); - /* Disable Bandgap Reference */ - snd_soc_update_bits(wcd9310_codec, TABLA_A_BIAS_CENTRAL_BG_CTL, - 0x0F, 0x00); + if (tabla_check_bandgap_status(wcd9310_codec) == 0) { + /* Disable Bandgap Reference power */ + printk("%s badgap status: OFF power down bandgap\n", + __func__); + snd_soc_write(wcd9310_codec, + TABLA_A_BIAS_CENTRAL_BG_CTL, 0x50); + } } return;