]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 Mar 2010 07:02:11 +0000 (08:02 +0100)
commitbc156513ee918fe384228b8b76667177abd12f0f
tree566f530439c23f25b448f7e8c6b576bc3f443fdd
parent94fdb486794fd72fe5aefa8b75ec7aa8d3e744a7
ALSA: cmipci: work around invalid PCM pointer

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>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/cmipci.c