summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2019-05-03 11:05:00 +0300
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2019-05-06 11:59:59 +0300
commit033103301df827c761a8cd305b4f54b1969891fd (patch)
treed56186a668349c92bd66872a8fd399f64f8e6c0a
parent0f453415775a97ea31d73048468e72f86f50f3b1 (diff)
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 <oleksandr.suvorov@toradex.com>
-rw-r--r--sound/soc/codecs/sgtl5000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 3ba071fe33fd..afff4744a3c5 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1285,6 +1285,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);
@@ -1326,9 +1327,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);