aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/memory.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-08-18 14:08:17 +0200
committerTakashi Iwai <tiwai@suse.de>2010-08-18 15:10:59 +0200
commit56385a12d9bb9e173751f74b6c430742018cafc0 (patch)
treea0ccadcd4ab6fe2fa7b7dbde1a8b542b7b105c15 /sound/pci/emu10k1/memory.c
parentALSA: riptide - Fix detection / load of firmware files (diff)
downloadlinux-dev-56385a12d9bb9e173751f74b6c430742018cafc0.tar.xz
linux-dev-56385a12d9bb9e173751f74b6c430742018cafc0.zip
ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)
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> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pci/emu10k1/memory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index ffb1ddb8dc28..957a311514c8 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -310,8 +310,10 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *subst
if (snd_BUG_ON(!hdr))
return NULL;
+ idx = runtime->period_size >= runtime->buffer_size ?
+ (emu->delay_pcm_irq * 2) : 0;
mutex_lock(&hdr->block_mutex);
- blk = search_empty(emu, runtime->dma_bytes);
+ blk = search_empty(emu, runtime->dma_bytes + idx);
if (blk == NULL) {
mutex_unlock(&hdr->block_mutex);
return NULL;