Commit 3a2ff73e authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

CS4231 driver
checks the PCM substream pointers to fix oops/panic in the interrupt
handler.
parent 9b465a1f
...@@ -979,21 +979,28 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -979,21 +979,28 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
if (chip->single_dma && chip->hardware != CS4231_HW_INTERWAVE) { if (chip->single_dma && chip->hardware != CS4231_HW_INTERWAVE) {
if (status & CS4231_PLAYBACK_IRQ) { if (status & CS4231_PLAYBACK_IRQ) {
if (chip->mode & CS4231_MODE_PLAY) if (chip->mode & CS4231_MODE_PLAY) {
if (chip->playback_substream)
snd_pcm_period_elapsed(chip->playback_substream); snd_pcm_period_elapsed(chip->playback_substream);
}
if (chip->mode & CS4231_MODE_RECORD) { if (chip->mode & CS4231_MODE_RECORD) {
if (chip->capture_substream) {
snd_cs4231_overrange(chip); snd_cs4231_overrange(chip);
snd_pcm_period_elapsed(chip->capture_substream); snd_pcm_period_elapsed(chip->capture_substream);
} }
} }
}
} else { } else {
if (status & CS4231_PLAYBACK_IRQ) if (status & CS4231_PLAYBACK_IRQ) {
if (chip->playback_substream)
snd_pcm_period_elapsed(chip->playback_substream); snd_pcm_period_elapsed(chip->playback_substream);
if (status & CS4231_RECORD_IRQ) { if (status & CS4231_RECORD_IRQ) {
if (chip->capture_substream) {
snd_cs4231_overrange(chip); snd_cs4231_overrange(chip);
snd_pcm_period_elapsed(chip->capture_substream); snd_pcm_period_elapsed(chip->capture_substream);
} }
} }
}
spin_lock(&chip->reg_lock); spin_lock(&chip->reg_lock);
snd_cs4231_outm(chip, CS4231_IRQ_STATUS, ~CS4231_ALL_IRQS | ~status, 0); snd_cs4231_outm(chip, CS4231_IRQ_STATUS, ~CS4231_ALL_IRQS | ~status, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment