From 6b01f0b022ab56acfe85a0f7f9ce0a9f25b863d4 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Fri, 3 May 2019 11:05:00 +0300 Subject: ASoC: sgtl5000: Fix enabling ZCD for HP and ADC - change HP_ZCD_EN/ADC_ZCD_EN bits only in CHIP_ANA_CTRL register. Signed-off-by: Oleksandr Suvorov --- sound/soc/codecs/sgtl5000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 2e86e328c793..7e802ed4d8fb 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1279,6 +1279,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) { int ret; struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); + int zcd_mask = SGTL5000_HP_ZCD_EN | SGTL5000_ADC_ZCD_EN; /* setup i2c data ops */ ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_I2C); @@ -1320,9 +1321,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x015f); - 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_write(codec, SGTL5000_CHIP_MIC_CTRL, 2); -- cgit v1.2.3