aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/memory.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-18 09:30:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-18 09:30:08 -0700
commit7dfb2d4069cc698da925327e8c2106852a0c77a2 (patch)
treea4143d70c25365f21d46be44eda3bbb5eb98bc9f /sound/pci/emu10k1/memory.c
parent6c8bfb7f7d43602c7f76060253bdaa493cd2e8b8 (diff)
parent2ea1ef5789c52dfdff6da81bc0d2eb8b62f73c23 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) ALSA: hda - Fix ALC680 base model capture ASoC: Remove DSP mode support for WM8776 ALSA: hda - Add quirk for Dell Vostro 1220 ALSA: riptide - Fix detection / load of firmware files
Diffstat (limited to 'sound/pci/emu10k1/memory.c')
-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 ffb1ddb8dc2..957a311514c 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;