]> git.karo-electronics.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 22:58:23 +0000 (15:58 -0700)
commit7a1bd86e2609609c9e8d8a4589d75a383cbbbc61
tree3d0091c662ed4be500788d0d304971c87fe51efa
parentf09315f7cd6cfdb98e90e6686116251bb026020b
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