summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>2016-06-02 00:42:51 +0530
committerYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>2016-07-30 05:11:11 +0530
commit70db8581f49a3f2cea367d98f42fb7eb08b57700 (patch)
treeb0480b3b7755fb814bf5d95f252cd95d9b4cc266
parent7eb20e5733b82473d2d1e9e59aa42989e73f3c70 (diff)
ASoC: wcd9335: don't check for HPHL and HPHR for mono headset
when mono headset is connected, either of the HPHL or HPHR channel is enabled. So don't check for both if cable is mono headset, otherwise RX chain is left muted and hence audio is not heard from headset. CRs-Fixed: 1018104 Change-Id: I464c785eba28f02993042d220e5744025e2f9346 Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
-rwxr-xr-xsound/soc/codecs/wcd9335.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index 6d75693e5c4d..04e9b5c97932 100755
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -3970,13 +3970,16 @@ static int tasha_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
set_bit(HPH_PA_DELAY, &tasha->status_mask);
break;
case SND_SOC_DAPM_POST_PMU:
- if ((snd_soc_read(codec, WCD9335_ANA_HPH) & 0xC0) != 0xC0)
- /*
- * If PA_EN is not set (potentially in ANC case) then
- * do nothing for POST_PMU and let left channel handle
- * everything.
- */
- break;
+ if (!(strcmp(w->name, "ANC HPHR PA"))) {
+ if ((snd_soc_read(codec, WCD9335_ANA_HPH) & 0xC0)
+ != 0xC0)
+ /*
+ * If PA_EN is not set (potentially in ANC case)
+ * then do nothing for POST_PMU and let left
+ * channel handle everything.
+ */
+ break;
+ }
/*
* 7ms sleep is required after PA is enabled as per
* HW requirement
@@ -4061,13 +4064,16 @@ static int tasha_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
set_bit(HPH_PA_DELAY, &tasha->status_mask);
break;
case SND_SOC_DAPM_POST_PMU:
- if ((snd_soc_read(codec, WCD9335_ANA_HPH) & 0xC0) != 0xC0)
- /*
- * If PA_EN is not set (potentially in ANC case) then
- * do nothing for POST_PMU and let right channel handle
- * everything.
- */
- break;
+ if (!(strcmp(w->name, "ANC HPHL PA"))) {
+ if ((snd_soc_read(codec, WCD9335_ANA_HPH) & 0xC0)
+ != 0xC0)
+ /*
+ * If PA_EN is not set (potentially in ANC case)
+ * then do nothing for POST_PMU and let right
+ * channel handle everything.
+ */
+ break;
+ }
/*
* 7ms sleep is required after PA is enabled as per
* HW requirement