From a5f981c9ff96be92e8892a56fa6e2cc0ad7aadaf Mon Sep 17 00:00:00 2001 From: Dylan Reid Date: Tue, 12 Feb 2013 19:11:47 -0800 Subject: [PATCH] CHROMIUM: ALSA: hda - Hack in a delay when turning codec on. Add a 10msec delay before and after powering on the codec. It might make link more likely to produce audio. BUG=chrome-os-partner:17393 TEST=modified loopback test for 20 hours without losing audio. Change-Id: I62822ae47b8a538c9537be42f8d6b3f3852dbb11 Signed-off-by: Dylan Reid Reviewed-on: https://gerrit.chromium.org/gerrit/43162 Commit-Queue: Trond Wuellner Commit-Queue: Puneet Kumar Reviewed-by: Puneet Kumar (cherry picked from commit 33a8c942738f3bdf4581682dadf6e4a8ff32c3c6) Reviewed-on: https://gerrit.chromium.org/gerrit/43166 --- sound/pci/hda/hda_codec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e0f1038212f81..8d5f1189eea4c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3516,9 +3516,11 @@ static void hda_call_codec_resume(struct hda_codec *codec) * in the resume / power-save sequence */ hda_keep_power_on(codec); + msleep(10); hda_set_power_state(codec, codec->afg ? codec->afg : codec->mfg, AC_PWRST_D0); + msleep(10); restore_pincfgs(codec); /* restore all current pin configs */ restore_shutup_pins(codec); hda_exec_init_verbs(codec); -- 2.39.5