]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4c81af979272e2cb5fa9fc7f657b97c59b314cf4
tree28090820b11f20776b4c12ff6c9fb1cf2eedee93
parent4fdc8d5056fc8d4a272e0b4c6a4b736fbe8d14f4
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