]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: cmipci: work around invalid PCM pointer
authorClemens Ladisch <clemens@ladisch.de>
Wed, 24 Mar 2010 06:10:54 +0000 (07:10 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:26 +0000 (16:01 -0700)
commit05b94852667ef2a3b82fb7befe341049644859c6
treea5dc18fd394e85ed46177e325581744b7d7181e6
parentabeb14b4b0db8d303e407705a42bafafef65180e
ALSA: cmipci: work around invalid PCM pointer

commit 1c583063a5c769fe2ec604752e383972c69e6d9b upstream.

When the CMI8738 FRAME2 register is read, the chip sometimes (probably
when wrapping around) returns an invalid value that would be outside the
programmed DMA buffer. This leads to an inconsistent PCM pointer that is
likely to result in an underrun.

To work around this, read the register multiple times until we get a
valid value; the error state seems to be very short-lived.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Matija Nalis <mnalis-alsadev@voyager.hr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/cmipci.c