summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-08-18 14:08:17 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-26 16:41:34 -0700
commit359789e0a8fb95dca2cf755e16ba8af1a20d41cf (patch)
tree1db5485259940d599fbfd0c990910a0c0ca0e4c0 /sound/core
parentc70da408d154be79d120fdca8aeb567b56f7f370 (diff)
ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)
commit 56385a12d9bb9e173751f74b6c430742018cafc0 upstream. With some hardware combinations, the PCM interrupts are acknowledged before the period boundary from the emu10k1 chip. The midlevel PCM code gets confused and the playback stream is interrupted. It seems that the interrupt processing shift by 2 samples is enough to fix this issue. This default value does not harm other, non-affected hardware. More information: Kernel bugzilla bug#16300 [A copmile warning fixed by tiwai] Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 7ba779d9e2e7..e6d2d974d231 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -972,6 +972,10 @@ static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push)
{
if (substream->runtime->trigger_master != substream)
return 0;
+ /* some drivers might use hw_ptr to recover from the pause -
+ update the hw_ptr now */
+ if (push)
+ snd_pcm_update_hw_ptr(substream);
/* The jiffies check in snd_pcm_update_hw_ptr*() is done by
* a delta betwen the current jiffies, this gives a large enough
* delta, effectively to skip the check once.