ALSA: HDA: Lessen CPU usage when waiting for chip to respond
authorDavid Henningsson <david.henningsson@canonical.com>
Fri, 4 May 2012 09:05:55 +0000 (11:05 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 May 2012 08:22:06 +0000 (10:22 +0200)
commit32cf4023e689ad5b3a81a749d8cc99d7f184cb99
tree28090820b11f20776b4c12ff6c9fb1cf2eedee93
parent619a341b78f17fb86d92e89c04612676cd05e26f
ALSA: HDA: Lessen CPU usage when waiting for chip to respond

When an IRQ for some reason gets lost, we wait up to a second using
udelay, which is CPU intensive. This patch improves the situation by
waiting about 30 ms in the CPU intensive mode, then stepping down to
using msleep(2) instead. In essence, we trade some granularity in
exchange for less CPU consumption when the waiting time is a bit longer.

As a result, PulseAudio should no longer be killed by the kernel
for taking up to much RT-prio CPU time. At least not for *this* reason.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tested-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c