From a3c649d1995678359c17563c2afcbf3fa3cccd5e Mon Sep 17 00:00:00 2001 From: Todd Broch Date: Fri, 20 May 2011 16:21:34 -0700 Subject: [PATCH] CHROMIUM: ALSA: hda: delay EAPD de-assert for alex system With power savings (CONFIG_SND_HDA_POWER_SAVE) enabled the EAPD GPIO de-asserts prior to proper biasing of the speaker inputs into the external amplifier causing a 'pop'. Delaying EAPD by 25ms provides necessary setup time to avoid the pop. BUG=chrome-os-partner:3971 TEST=manual, see tracker re:#6 for Change-Id: I7f6a57ebf65ef42df47250772df29d383ff4892e Signed-off-by: Todd Broch Reviewed-on: http://gerrit.chromium.org/gerrit/1316 Reviewed-by: Mark Hayter Reviewed-by: Olof Johansson --- sound/pci/hda/patch_realtek.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7810913d07a0..fcb1a7c8c227 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -744,6 +744,13 @@ static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) { if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) return; + + /* delay de-assert of eapd to allow biasing of amp + * inputs to settle avoiding an audible 'pop'. + */ + if (nid == 0x14) && codec->subsystem_id == 0x144dc0a7) + msleep(25); + if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, on ? 2 : 0); -- 2.20.1