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-03 12:41:04 +0300
commit6b01f0b022ab56acfe85a0f7f9ce0a9f25b863d4 (patch)
treebf1915767263a135398de08d22bb464b63e7f7fb
parentf6520155d7481d5690352cdb12eb025cec2801ec (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 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);