Commit 0718a802 authored by Fabio Estevam's avatar Fabio Estevam Committed by Ben Hutchings

ASoC: sgtl5000: Fix SMALL_POP bit definition

commit c251ea7b upstream.

On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound  to happen
5 seconds after the end of a playback.

The SMALL_POP bit should fix this, but its definition is incorrect:
according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
bit 1.

Fix the definition accordingly and enable the bit as intended per the code
comment.

After applying this change, no loud 'click' sound is heard after playback
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 42fdf7a1
...@@ -1304,8 +1304,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) ...@@ -1304,8 +1304,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
/* enable small pop, introduce 400ms delay in turning off */ /* enable small pop, introduce 400ms delay in turning off */
snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
SGTL5000_SMALL_POP, SGTL5000_SMALL_POP, 1);
SGTL5000_SMALL_POP);
/* disable short cut detector */ /* disable short cut detector */
snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0); snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0);
......
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
#define SGTL5000_BIAS_CTRL_MASK 0x000e #define SGTL5000_BIAS_CTRL_MASK 0x000e
#define SGTL5000_BIAS_CTRL_SHIFT 1 #define SGTL5000_BIAS_CTRL_SHIFT 1
#define SGTL5000_BIAS_CTRL_WIDTH 3 #define SGTL5000_BIAS_CTRL_WIDTH 3
#define SGTL5000_SMALL_POP 0x0001 #define SGTL5000_SMALL_POP 0
/* /*
* SGTL5000_CHIP_MIC_CTRL * SGTL5000_CHIP_MIC_CTRL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment