Commit 4dc379e2 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] hdsp ghost midi device fix

RME HDSP driver
* Prevents the creation of a second midi device for cards with only
  one midi I/O
Signed-off-by: default avatarThomas Charbonnel <thomas@undata.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 009a7479
......@@ -3670,7 +3670,7 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id, struct pt_regs *reg
snd_hdsp_midi_input_read (&hdsp->midi[0]);
}
}
if (midi1 && midi1status) {
if (hdsp->io_type != Multiface && hdsp->io_type != H9632 && midi1 && midi1status) {
if (hdsp->use_midi_tasklet) {
/* we disable interrupts for this input until processing is done */
hdsp->control_register &= ~HDSP_Midi1InterruptEnable;
......@@ -4827,11 +4827,12 @@ static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
return err;
}
if (hdsp->io_type == Digiface || hdsp->io_type == H9652) {
if ((err = snd_hdsp_create_midi(card, hdsp, 1)) < 0) {
snd_printk("Hammerfall-DSP: Error creating second midi interface\n");
return err;
}
}
if ((err = snd_hdsp_create_controls(card, hdsp)) < 0) {
snd_printk("Hammerfall-DSP: Error creating ctl interface\n");
......@@ -4967,6 +4968,8 @@ static int __devinit snd_hdsp_create(snd_card_t *card,
hdsp->midi[1].input = NULL;
hdsp->midi[0].output = NULL;
hdsp->midi[1].output = NULL;
hdsp->midi[0].pending = 0;
hdsp->midi[1].pending = 0;
spin_lock_init(&hdsp->midi[0].lock);
spin_lock_init(&hdsp->midi[1].lock);
hdsp->iobase = NULL;
......
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