From 52987656fb3d43192639a7d585feb564c075c864 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 16 Jan 2008 16:09:47 +0100 Subject: [ALSA] hda-intel - Add workarounds for STAC codecs Some machines with STAC codecs seem to have problems (e.g. no audible playback) when the delay in codec-read routine is too short. I still don't figure out which command sequence causes this problem (due to lack of test hardware), but it's known that increasing the delay fixes. So, added a stupid workaround here temporarily... Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/hda_intel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sound/pci/hda/hda_intel.c') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 5f2c3ca863d..fe07bdff60d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -559,8 +559,12 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec) } if (!chip->rirb.cmds) return chip->rirb.res; /* the last value */ - udelay(10); - cond_resched(); + if (codec->bus->needs_damn_long_delay) + msleep(2); /* temporary workaround */ + else { + udelay(10); + cond_resched(); + } } while (time_after_eq(timeout, jiffies)); if (chip->msi) { -- cgit v1.2.3