diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-05 03:37:40 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-05 03:37:40 -0500 |
commit | c2503cd3be9eacb1dd06ec5b6fba8bb06aac12a8 (patch) | |
tree | fe2df3f4a1753b9b35c16f1a6f716e0562cf140b /sound/pci/rme9652 | |
parent | f9ffc5d6f0161b66202f2df9ecc42d1be241020d (diff) |
ALSA: hdsp - Ignore MIDI and PCM events in interrupts until initialized
Ignore MIDI and PCM events in the interrupt handler until the device
gets initialized properly. Otherwise you may get kernel panic by the
access to uninitialized devices via hotplugging.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index dc65fe1c9c65..314e73531bd1 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -3740,6 +3740,9 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id) | |||
3740 | midi0status = hdsp_read (hdsp, HDSP_midiStatusIn0) & 0xff; | 3740 | midi0status = hdsp_read (hdsp, HDSP_midiStatusIn0) & 0xff; |
3741 | midi1status = hdsp_read (hdsp, HDSP_midiStatusIn1) & 0xff; | 3741 | midi1status = hdsp_read (hdsp, HDSP_midiStatusIn1) & 0xff; |
3742 | 3742 | ||
3743 | if (!(hdsp->state & HDSP_InitializationComplete)) | ||
3744 | return IRQ_HANDLED; | ||
3745 | |||
3743 | if (audio) { | 3746 | if (audio) { |
3744 | if (hdsp->capture_substream) | 3747 | if (hdsp->capture_substream) |
3745 | snd_pcm_period_elapsed(hdsp->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); | 3748 | snd_pcm_period_elapsed(hdsp->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); |