diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-05-03 11:05:00 +0300 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2020-04-15 01:24:38 +0200 |
commit | 48ad0bd8c7e0208ec3c6f2b35f1672a1f4ba2f77 (patch) | |
tree | 7fa9c02566bed475bc6e233f0939416d4b339557 /sound | |
parent | 2761d848134298133c010130b1f33121cd96145c (diff) |
ASoC: sgtl5000: Fix enabling ZCD for HP and ADC
- change HP_ZCD_EN/ADC_ZCD_EN bits only in CHIP_ANA_CTRL register.
Related to: #48500
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index fcf58ae15f54..b10b5ecc8723 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1164,6 +1164,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) int ret; u16 reg; struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); + unsigned int zcd_mask = SGTL5000_HP_ZCD_EN | SGTL5000_ADC_ZCD_EN; /* power up sgtl5000 */ ret = sgtl5000_set_power_regs(codec); @@ -1195,9 +1196,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) reg = ((sgtl5000->lrclk_strength) << SGTL5000_PAD_I2S_LRCLK_SHIFT | 0x5f); snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, reg); - snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL, - SGTL5000_HP_ZCD_EN | - SGTL5000_ADC_ZCD_EN); + snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_CTRL, + zcd_mask, zcd_mask); snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL, SGTL5000_BIAS_R_MASK, |