aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/oxygen/oxygen_pcm.c')
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index c262049961e1..3b5ca70c9d4d 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -487,10 +487,14 @@ static int oxygen_hw_free(struct snd_pcm_substream *substream)
487{ 487{
488 struct oxygen *chip = snd_pcm_substream_chip(substream); 488 struct oxygen *chip = snd_pcm_substream_chip(substream);
489 unsigned int channel = oxygen_substream_channel(substream); 489 unsigned int channel = oxygen_substream_channel(substream);
490 unsigned int channel_mask = 1 << channel;
490 491
491 spin_lock_irq(&chip->reg_lock); 492 spin_lock_irq(&chip->reg_lock);
492 chip->interrupt_mask &= ~(1 << channel); 493 chip->interrupt_mask &= ~channel_mask;
493 oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask); 494 oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask);
495
496 oxygen_set_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
497 oxygen_clear_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
494 spin_unlock_irq(&chip->reg_lock); 498 spin_unlock_irq(&chip->reg_lock);
495 499
496 return snd_pcm_lib_free_pages(substream); 500 return snd_pcm_lib_free_pages(substream);