summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2019-09-09 14:42:30 +0300
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2019-09-09 14:42:30 +0300
commitbefb3f9ac53a15141c15abaf4a366655115c633e (patch)
tree719088243a8fd1b917947a89a47d80f30b78201c
parent7e270a134532cffab5229e1a280c056ea23b9548 (diff)
ASoC: sgtl5000: Fix of unmute outputs on prob
Backported commit 8337f764b45e122bd17b8c84b7ac26da3086fe26 To enable "zero cross detect" for ADC/HP, change HP_ZCD_EN/ADC_ZCD_EN bits only instead of writing the whole CHIP_ANA_CTRL register. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
-rw-r--r--sound/soc/codecs/sgtl5000.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index f934407..f4c8caa 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1530,6 +1530,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
{
int ret;
struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
+ unsigned 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);
@@ -1579,9 +1580,7 @@ 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);