From 9a02176b5a23d305cfb6074ae42ab0d4bb4c05e1 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 22 Sep 2011 11:05:45 +0300 Subject: [PATCH] --- yaml --- r: 270636 b: refs/heads/master c: 3acef6854c440b29f20d7ea0ec5f4707aad23923 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/twl6040.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a4ed9b26f345..fe5f7c3971ed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fadd81b52cf1f0a0f9be240ad56a86d20663b065 +refs/heads/master: 3acef6854c440b29f20d7ea0ec5f4707aad23923 diff --git a/trunk/sound/soc/codecs/twl6040.c b/trunk/sound/soc/codecs/twl6040.c index 81645c632447..0694d65f9de3 100644 --- a/trunk/sound/soc/codecs/twl6040.c +++ b/trunk/sound/soc/codecs/twl6040.c @@ -269,6 +269,17 @@ static void twl6040_init_chip(struct snd_soc_codec *codec) /* No imput selected for microphone amplifiers */ twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18); twl6040_write_reg_cache(codec, TWL6040_REG_MICRCTL, 0x18); + + /* + * We need to lower the default gain values, so the ramp code + * can work correctly for the first playback. + * This reduces the pop noise heard at the first playback. + */ + twl6040_write_reg_cache(codec, TWL6040_REG_HSGAIN, 0xff); + twl6040_write_reg_cache(codec, TWL6040_REG_EARCTL, 0x1e); + twl6040_write_reg_cache(codec, TWL6040_REG_HFLGAIN, 0x1d); + twl6040_write_reg_cache(codec, TWL6040_REG_HFRGAIN, 0x1d); + twl6040_write_reg_cache(codec, TWL6040_REG_LINEGAIN, 0); } static void twl6040_restore_regs(struct snd_soc_codec *codec)