diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index 6eb7cd367e..acc6375a07 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -579,7 +579,8 @@ static int wcd937x_codec_ear_dac_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L, 0x0F, 0x06); - snd_soc_component_update_bits(component, + if (wcd937x->comp1_enable) + snd_soc_component_update_bits(component, WCD937X_DIGITAL_CDC_COMP_CTL_0, 0x02, 0x02); usleep_range(5000, 5010); @@ -597,6 +598,10 @@ static int wcd937x_codec_ear_dac_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L, 0x0F, 0x01); + if (wcd937x->comp1_enable) + snd_soc_component_update_bits(component, + WCD937X_DIGITAL_CDC_COMP_CTL_0, + 0x02, 0x00); break; }; return 0; diff --git a/asoc/codecs/wcd938x/wcd938x.c b/asoc/codecs/wcd938x/wcd938x.c index 376c35db8f..088a673684 100644 --- a/asoc/codecs/wcd938x/wcd938x.c +++ b/asoc/codecs/wcd938x/wcd938x.c @@ -681,8 +681,10 @@ static int wcd938x_codec_ear_dac_event(struct snd_soc_dapm_widget *w, WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x04); snd_soc_component_update_bits(component, WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x01); - snd_soc_component_update_bits(component, - WCD938X_DIGITAL_CDC_COMP_CTL_0, 0x02, 0x02); + if (wcd938x->comp1_enable) + snd_soc_component_update_bits(component, + WCD938X_DIGITAL_CDC_COMP_CTL_0, + 0x02, 0x02); } /* 5 msec delay as per HW requirement */ usleep_range(5000, 5010); @@ -707,8 +709,10 @@ static int wcd938x_codec_ear_dac_event(struct snd_soc_dapm_widget *w, WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x00); snd_soc_component_update_bits(component, WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x00); - snd_soc_component_update_bits(component, - WCD938X_DIGITAL_CDC_COMP_CTL_0, 0x02, 0x00); + if (wcd938x->comp1_enable) + snd_soc_component_update_bits(component, + WCD938X_DIGITAL_CDC_COMP_CTL_0, + 0x02, 0x00); } snd_soc_component_update_bits(component, WCD938X_ANA_EAR_COMPANDER_CTL, 0x80, 0x00);