diff options
author | Jaroslav Kysela <perex@suse.cz> | 2004-05-17 19:20:12 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2004-05-17 19:20:12 +0200 |
commit | 3a2ff73ed2794730dfe71177a21376f069f4874b (patch) | |
tree | 81fdaf733a33ea2f74fa6da1e15a2824bb34bce5 /sound | |
parent | 9b465a1ffaf8b4ea9061f95e261a3de33e27cd19 (diff) | |
download | history-3a2ff73ed2794730dfe71177a21376f069f4874b.tar.gz |
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
CS4231 driver
checks the PCM substream pointers to fix oops/panic in the interrupt
handler.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/cs423x/cs4231_lib.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index 6da418610268b4..5ef81d4ff1d531 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c @@ -979,19 +979,26 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) } if (chip->single_dma && chip->hardware != CS4231_HW_INTERWAVE) { if (status & CS4231_PLAYBACK_IRQ) { - if (chip->mode & CS4231_MODE_PLAY) - snd_pcm_period_elapsed(chip->playback_substream); + if (chip->mode & CS4231_MODE_PLAY) { + if (chip->playback_substream) + snd_pcm_period_elapsed(chip->playback_substream); + } if (chip->mode & CS4231_MODE_RECORD) { - snd_cs4231_overrange(chip); - snd_pcm_period_elapsed(chip->capture_substream); + if (chip->capture_substream) { + snd_cs4231_overrange(chip); + snd_pcm_period_elapsed(chip->capture_substream); + } } } } else { - if (status & CS4231_PLAYBACK_IRQ) - snd_pcm_period_elapsed(chip->playback_substream); + if (status & CS4231_PLAYBACK_IRQ) { + if (chip->playback_substream) + snd_pcm_period_elapsed(chip->playback_substream); if (status & CS4231_RECORD_IRQ) { - snd_cs4231_overrange(chip); - snd_pcm_period_elapsed(chip->capture_substream); + if (chip->capture_substream) { + snd_cs4231_overrange(chip); + snd_pcm_period_elapsed(chip->capture_substream); + } } } |