]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: intel8x0 - Fix PCM position craziness
authorTakashi Iwai <tiwai@suse.de>
Mon, 15 Jun 2009 10:31:38 +0000 (12:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Jul 2009 23:50:01 +0000 (16:50 -0700)
commit32413699d684aca53b5128be63dfe6c4933ef235
tree98e7cd2d3784eacc95a535d0eb25adb27c83d355
parent2ccfd7fdbf16b4711ba77eb3432fe8751a804dae
ALSA: intel8x0 - Fix PCM position craziness

commit f708eb1d71dc8ffb184da9f0bc53461c6dc10653 upstream.

The PCM pointer callback sometimes returns invalid positions and this
screws up the hw_ptr updater in PCM core.  Especially since now the
jiffies check is optional with xrun_debug, the invalid position is
handled as is, and causes serious sound skips, etc.

This patch simplifies the position-fix strategy in intel8x0 to be more
robust:
- just falls back to the last position if bogus position is detected
- another sanity check for the backward move of the position due to
  a race of register update and the base-index update

This patch is applicable also for 2.6.30.

Tested-by: David Miller <davem@davemloft.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/intel8x0.c