CHROMIUM: ALSA: hda: delay EAPD de-assert for alex system
authorTodd Broch <tbroch@chromium.org>
Fri, 20 May 2011 23:21:34 +0000 (16:21 -0700)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:06:04 +0000 (15:06 -0700)
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 <tbroch@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1316
Reviewed-by: Mark Hayter <mdhayter@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
sound/pci/hda/patch_realtek.c

index 7810913..fcb1a7c 100644 (file)
@@ -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);