Skip to content

Commit

Permalink
ASoC: sgtl5000: Fix SMALL_POP bit definition
Browse files Browse the repository at this point in the history
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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Fabio Estevam authored and ericnelsonaz committed Nov 22, 2014
1 parent fcbb090 commit 983ce7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/sgtl5000.c
Expand Up @@ -1324,8 +1324,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)

/* enable small pop, introduce 400ms delay in turning off */
snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
SGTL5000_SMALL_POP,
SGTL5000_SMALL_POP);
SGTL5000_SMALL_POP, 1);

/* disable short cut detector */
snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/sgtl5000.h
Expand Up @@ -275,7 +275,7 @@
#define SGTL5000_BIAS_CTRL_MASK 0x000e
#define SGTL5000_BIAS_CTRL_SHIFT 1
#define SGTL5000_BIAS_CTRL_WIDTH 3
#define SGTL5000_SMALL_POP 0x0001
#define SGTL5000_SMALL_POP 0

/*
* SGTL5000_CHIP_MIC_CTRL
Expand Down

0 comments on commit 983ce7a

Please sign in to comment.