From: thomas charbonnel <thomas@undata.org>
To: alsa-devel@lists.sourceforge.net
Subject: [PATCH] hdsp ghost midi device fix
Date: Fri, 28 Jan 2005 18:17:39 +0100 [thread overview]
Message-ID: <1106932660.10925.6.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Hi,
The following patch, on top of the patches I submitted yesterday,
prevents a ghost midi device to be created on cards with only one midi
I/O (Multiface and HDSP9632).
It closes the ALSA bug #0000286.
Thomas
ChangeLog:
* Prevents the creation of a second midi device for cards with only
one midi I/O
Signed-off-by: Thomas Charbonnel <thomas@undata.org>
[-- Attachment #2: hdsp_midi_dev_fix.patch --]
[-- Type: text/x-patch, Size: 1198 bytes --]
--- hdsp.c.old 2005-01-28 17:42:27.000000000 +0100
+++ hdsp.c 2005-01-28 18:15:35.000000000 +0100
@@ -3670,7 +3670,7 @@
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,10 +4827,11 @@
return err;
}
-
- if ((err = snd_hdsp_create_midi(card, hdsp, 1)) < 0) {
- snd_printk("Hammerfall-DSP: Error creating second midi interface\n");
- 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) {
@@ -4967,6 +4968,8 @@
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;
next reply other threads:[~2005-01-28 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 17:17 thomas charbonnel [this message]
2005-01-31 13:41 ` [PATCH] hdsp ghost midi device fix Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1106932660.10925.6.camel@localhost \
--to=thomas@undata.org \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.