From cbe9426358674e2bb2680b0de43b6b97b22deb7b Mon Sep 17 00:00:00 2001 From: Aditya Bavanari Date: Wed, 6 May 2020 14:09:09 +0530 Subject: [PATCH] asoc: codecs: Fix volume fluctuation issue in headphone playback HPH PA pull down control is set to force ON instead of auto due of which saturation/noise is observed in headset playback at highest volumes. Set pull down control to Auto to fix this issue. Change-Id: I465588f46b04bbb32d84f76b8b5bedd2ef21bd2a Signed-off-by: Aditya Bavanari --- asoc/codecs/rouleur/rouleur-mbhc.c | 4 ++-- asoc/codecs/rouleur/rouleur.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/asoc/codecs/rouleur/rouleur-mbhc.c b/asoc/codecs/rouleur/rouleur-mbhc.c index b5a1ac52ffb5..f0eea091cba5 100644 --- a/asoc/codecs/rouleur/rouleur-mbhc.c +++ b/asoc/codecs/rouleur/rouleur-mbhc.c @@ -664,10 +664,10 @@ static void rouleur_mbhc_hph_pull_down_ctrl(struct snd_soc_component *component, if (enable) { snd_soc_component_update_bits(component, ROULEUR_ANA_HPHPA_CNP_CTL_2, - 0x30, 0x10); + 0x30, 0x20); snd_soc_component_update_bits(component, ROULEUR_ANA_HPHPA_CNP_CTL_2, - 0x0C, 0x04); + 0x0C, 0x08); } else { snd_soc_component_update_bits(component, ROULEUR_ANA_HPHPA_CNP_CTL_2, diff --git a/asoc/codecs/rouleur/rouleur.c b/asoc/codecs/rouleur/rouleur.c index 418ed6711d04..480e0ce7a522 100644 --- a/asoc/codecs/rouleur/rouleur.c +++ b/asoc/codecs/rouleur/rouleur.c @@ -472,7 +472,7 @@ static int rouleur_codec_hphl_dac_event(struct snd_soc_dapm_widget *w, } snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX0_CTL, - 0x7C, 0x7C); + 0x80, 0x00); snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x04, 0x04); @@ -486,6 +486,9 @@ static int rouleur_codec_hphl_dac_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x04, 0x00); + snd_soc_component_update_bits(component, + ROULEUR_DIG_SWR_CDC_RX0_CTL, + 0x80, 0x80); if (rouleur->comp1_enable) snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_COMP_CTL_0, @@ -544,7 +547,7 @@ static int rouleur_codec_hphr_dac_event(struct snd_soc_dapm_widget *w, } snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX1_CTL, - 0x7C, 0x7C); + 0x80, 0x00); snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x08, 0x08); @@ -557,6 +560,9 @@ static int rouleur_codec_hphr_dac_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x08, 0x00); + snd_soc_component_update_bits(component, + ROULEUR_DIG_SWR_CDC_RX1_CTL, + 0x80, 0x80); if (rouleur->comp2_enable) snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_COMP_CTL_0, @@ -583,7 +589,7 @@ static int rouleur_codec_ear_lo_dac_event(struct snd_soc_dapm_widget *w, rouleur_rx_clk_enable(component); snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX0_CTL, - 0x7C, 0x7C); + 0x80, 0x00); snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x04, 0x04); @@ -599,6 +605,9 @@ static int rouleur_codec_ear_lo_dac_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, ROULEUR_DIG_SWR_CDC_RX_GAIN_CTL, 0x04, 0x00); + snd_soc_component_update_bits(component, + ROULEUR_DIG_SWR_CDC_RX0_CTL, + 0x80, 0x80); break; };