MIDI getting killed by Jack?
Hi,
I posted this last night on LAU but received no responses. Either it
was of no interest or just no one had anything to say about it.
Is anyone else experiencing this problem? I set up a bunch of
aconnect commands to route my keyboard controller (64:0) to a number of synths on different MIDI interfaces, and also to route the output of Pro Tools (on another computer - 80:0) to pretty much the same places:
aconnect 64:0 64:32
aconnect 64:0 80:1
aconnect 80:0 64:0
aconnect 80:0 64:32
aconnect 80:0 80:1
I also route Pro Tools output back to my keyboard (line 3) in case I want to plug another hardware synth in there, but nothing is hooked up to that right now.
At this point I set up my mixer and play. Everything works and is perfectly fine for long periods of time.
I then start Jack and within a minute or two I lose MIDI connectivity. I can run alsaplayer or other audio apps and I still get audio, but there is no more MIDI connectivity. I look at the synths and they are not receiving MIDI input. (No event lights.)
I then stop Jack and I immediately hear a bunch of MIDI notes get played. These notes were stored from when I wasn't getting connectivity. At this point I have MIDI back for live playing until the next time I start Jack when it happens again.
I do this 4 or 5 times and at this point I cannot get MIDI back at all. I have to completely power down as far as I can tell. I tried rebooting and had no luck the one time I did that.
I don't know what to look at to figure out what could be causing this. Hardware and modules shown below.
In thinking about this overnight it dawned on me that I am only seeing this problem on MIDI generated by my controller hooked to the HDSP MIDI input. I do not see this problem on MIDI generated by Pro Tools hooked to the MidiSport. I will likely rewire what is hooked to what this evening and see if I can say that it is only the HDSP input, or something else.
Thanks,
Mark
64:X - HDSP 9652
80:X - MidiSport 2x2
Wizard root # lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:09.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev
01)
00:0a.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394 Controller
00:0e.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 65)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/
C/VT8235 PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller (rev 50)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 If [Radeon 9000] (rev 01)
01:00.1 Display controller: ATI Technologies Inc Radeon R250 [Radeon 9000] (Secondary) (rev 01)
Wizard root # lsmod
Module Size Used by Not tainted
radeon 102460 1
snd-seq-midi 4096 10 (autoclean) snd-seq-midi-event 3840 0 (autoclean) [snd-seq-midi] snd-usb-audio 45056 2 snd-via82xx 13792 0 snd-ac97-codec 41400 0 [snd-via82xx] snd-mpu401-uart 3680 0 [snd-via82xx] snd-hdsp 34436 3 snd-hwdep 5152 0 [snd-hdsp] snd-rawmidi 14976 0 [snd-seq-midi snd-usb-audio snd-mpu401-uart snd-hdsp] snd-pcm-oss 39588 0 (unused) snd-pcm 64676 0 [snd-usb-audio snd-via82xx snd-hdsp snd-pcm-oss] snd-page-alloc 6708 0 [snd-via82xx snd-hdsp snd-pcm] snd-mixer-oss 13624 0 [snd-pcm-oss] hid 15300 1 snd-seq 39312 0 [snd-seq-midi snd-seq-midi-event] snd-timer 15620 0 [snd-pcm snd-seq] snd-seq-device 4384 0 [snd-seq-midi snd-rawmidi snd-seq] snd 32676 0 [snd-seq-midi snd-seq-midi-event snd-usb-audio snd-via82xx snd-ac97-codec snd-mpu401-uart snd-hdsp snd-hwdep snd-rawmidi snd-pcm-oss snd-pcm snd-mixer-oss snd-seq snd-timer snd-seq-device] sbp2 18112 0 (unused) raw1394 8056 0 (unused) ohci1394 18312 0 (unused) ieee1394 35692 0 [sbp2 raw1394 ohci1394]
Wizard root #
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Hi. Does anyone else experience very slow responses from Alsa-Devel? I sent this email this morning at 9:16AM this morning and it just arrived back here and at my home account at 1:30PM. Most other reflectors I'm on normally have round trip times of just a minute or two. Alsa-devel is always so slow, usually taking hours.
At lunch today I rewired my MIDI input from the keyboard controller to use the MidiSport input instead of the HDSP 9652 input. In this configuration, with only about 15 minutes of testing, I had no problems. I will do more testing this evening, but possibly this data says it's an HDSP 9652 MIDI problem, or the HDSP 9652 MIDI combined with Jack-type audio, and not specifically 'Alsa MIDI'.
With this set of connections:
aconnect 80:0 64:0
aconnect 80:0 64:32
aconnect 80:0 80:0
aconnect 80:0 80:1
aconnect 80:1 64:0
aconnect 80:1 64:32
aconnect 80:1 80:0
aconnect 80:1 80:1
aconnect 80:1 130:0
I had no immediate problems driving zynaddsubfx on 130:0. (I think it was 130:0)
Cheers,
Mark
Quoted 123 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Mark Knecht
Sent: Wednesday, September 10, 2003 9:16 AM
To: Alsa-Devel
Subject: [Alsa-devel] MIDI getting killed by Jack?Hi,
I posted this last night on LAU but received no responses. Either it
was of no interest or just no one had anything to say about it.Is anyone else experiencing this problem? I set up a bunch of
aconnect commands to route my keyboard controller (64:0) to a number of synths on different MIDI interfaces, and also to route the output of Pro Tools (on another computer - 80:0) to pretty much the same places:aconnect 64:0 64:32
aconnect 64:0 80:1
aconnect 80:0 64:0
aconnect 80:0 64:32
aconnect 80:0 80:1I also route Pro Tools output back to my keyboard (line 3) in case I want to plug another hardware synth in there, but nothing is hooked up to that right now.
At this point I set up my mixer and play. Everything works and is perfectly fine for long periods of time.
I then start Jack and within a minute or two I lose MIDI connectivity. I can run alsaplayer or other audio apps and I still get audio, but there is no more MIDI connectivity. I look at the synths and they are not receiving MIDI input. (No event lights.)
I then stop Jack and I immediately hear a bunch of MIDI notes get played. These notes were stored from when I wasn't getting connectivity. At this point I have MIDI back for live playing until the next time I start Jack when it happens again.
I do this 4 or 5 times and at this point I cannot get MIDI back at all. I have to completely power down as far as I can tell. I tried rebooting and had no luck the one time I did that.
I don't know what to look at to figure out what could be causing this. Hardware and modules shown below.
In thinking about this overnight it dawned on me that I am only seeing this problem on MIDI generated by my controller hooked to the HDSP MIDI input. I do not see this problem on MIDI generated by Pro Tools hooked to the MidiSport. I will likely rewire what is hooked to what this evening and see if I can say that it is only the HDSP input, or something else.
Thanks,
Mark64:X - HDSP 9652
80:X - MidiSport 2x2Wizard root # lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:09.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev
01)
00:0a.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394 Controller
00:0e.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 65)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 80) 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/
C/VT8235 PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller (rev 50)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 If [Radeon 9000] (rev 01)
01:00.1 Display controller: ATI Technologies Inc Radeon R250 [Radeon 9000] (Secondary) (rev 01)Wizard root # lsmod
Module Size Used by Not tainted
radeon 102460 1snd-seq-midi 4096 10 (autoclean) snd-seq-midi-event 3840 0 (autoclean) [snd-seq-midi] snd-usb-audio 45056 2 snd-via82xx 13792 0 snd-ac97-codec 41400 0 [snd-via82xx] snd-mpu401-uart 3680 0 [snd-via82xx] snd-hdsp 34436 3 snd-hwdep 5152 0 [snd-hdsp] snd-rawmidi 14976 0 [snd-seq-midi snd-usb-audio snd-mpu401-uart snd-hdsp] snd-pcm-oss 39588 0 (unused) snd-pcm 64676 0 [snd-usb-audio snd-via82xx snd-hdsp snd-pcm-oss] snd-page-alloc 6708 0 [snd-via82xx snd-hdsp snd-pcm] snd-mixer-oss 13624 0 [snd-pcm-oss] hid 15300 1 snd-seq 39312 0 [snd-seq-midi snd-seq-midi-event] snd-timer 15620 0 [snd-pcm snd-seq] snd-seq-device 4384 0 [snd-seq-midi snd-rawmidi snd-seq] snd 32676 0 [snd-seq-midi snd-seq-midi-event snd-usb-audio snd-via82xx snd-ac97-codec snd-mpu401-uart snd-hdsp snd-hwdep snd-rawmidi snd-pcm-oss snd-pcm snd-mixer-oss snd-seq snd-timer snd-seq-device] sbp2 18112 0 (unused) raw1394 8056 0 (unused) ohci1394 18312 0 (unused) ieee1394 35692 0 [sbp2 raw1394 ohci1394]Wizard root #
Quoted 10 lines
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 5 lines · Mark Knecht
Hi. Does anyone else experience very slow responses from Alsa-Devel? I sent this email this morning at 9:16AM this morning and it just arrived back here and at my home account at 1:30PM. Most other reflectors I'm on normally have round trip times of just a minute or two. Alsa-devel is always so slow, usually taking hours.
The "Received" headers of your mails show the following arrival times:
first mail second mail ladisch.de 10 Sep 2003 20:23:30 -0000 10 Sep 2003 20:47:18 -0000 sc8-sf-list2.sourceforge.net 10 Sep 2003 12:56:20 -0700 10 Sep 2003 13:28:43 -0700 sc8-sf-list1.sourceforge.net 10 Sep 2003 09:16:28 -0700 10 Sep 2003 13:13:40 -0700 sc8-sf-mx1.sourceforge.net 10 Sep 2003 09:16:27 -0700 10 Sep 2003 13:13:39 -0700 vivaldi.controlnet.com 10 Sep 2003 09:48:12 -0700 10 Sep 2003 13:45:27 -0700
This translates to the following mail processing durations:
sc8-sf-list2.sourceforge.net 0:27:10 0:18:35 sc8-sf-list1.sourceforge.net 3:39:52 0:15:03 sc8-sf-mx1.sourceforge.net 0:00:01 0:00:01
vivaldi.controlnet.com -0:41:45 -0:31:48
If we assume that all clocks are set correctly, we can conclude:
1) SourceForge's list servers are overloaded at times.
2) Your ISP (controlnet.com) has a time machine. :-)
Quoted 6 lines
At lunch today I rewired my MIDI input from the keyboard controller to use the MidiSport input instead of the HDSP 9652 input. In this configuration, with only about 15 minutes of testing, I had no problems. I will do more testing this evening, but possibly this data says it's an HDSP 9652 MIDI problem, or the HDSP 9652 MIDI combined with Jack-type audio, and not specifically 'Alsa MIDI'.
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read. I don't know why it does this, but you may try to remove/disable lines 3181, 3182, 3188, and 3189 in hdsp.c.
HTH
Clemens
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 4 lines
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read. I don't know why it does this, but you may try to remove/disable lines 3181, 3182, 3188, and 3189 in
hdsp.c.
the hdsp driver is one of the first alsa drivers to use tasklets to handle MIDI without impacting audio latency (that is, we can continue processing audio i/o even while MIDI i/o is pending). once we have launched a tasklet to handle MIDI input, there is no point handling more interrupts that tell us the same thing.
the tasklet stuff relies on the kernel scheduler, but AFAIK, the tasklet effectively runs like the kernel equivalent of a SCHED_FIFO thread. i don't know at what priority, however.
--p
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Paul,
I'm pretty sure that I was not the intended audience for this level of
technical data, but it does raise the question (for me) as to whether this problem might be created by using the 'wrong' (I.e. - undocumented requirements) kernel?
The machine exhibiting the problem is running a pretty much vanilla
Gentoo 2.4.20 kernel with preemptive multitasking and low latency scheduling turned on. This kernel does not have the capabilities patch. The problem occurs when I run Jack as a user.
I have not investigated what happens as root.
However, as I stated in my second message yesterday, none of the above
seems to impact the system if I get my MIDI input through the MidiSport vs. the HDSP 9652, so my presumption is that the first-order problem lies with that driver and not the kernel.
Please let me know specifically if there is anything you would like me to
try.
Thanks,
Mark
Quoted 19 lines
-----Original Message-----
From: Paul Davis [mailto:[email protected]]
Sent: Thursday, September 11, 2003 6:06 AM
To: Clemens Ladisch
Cc: Mark Knecht; Alsa-Devel
Subject: Re: [Alsa-devel] MIDI getting killed by Jack?Quoted 4 lines
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read. I don't know why it does this, but you may try to remove/disable lines 3181, 3182, 3188, and 3189 in
hdsp.c.the hdsp driver is one of the first alsa drivers to use tasklets to handle MIDI without impacting audio latency (that is, we can continue processing audio i/o even while MIDI i/o is pending). once we have launched a tasklet to handle MIDI input, there is no point handling more interrupts that tell us the same thing.
Quoted 7 lines
the tasklet stuff relies on the kernel scheduler, but AFAIK, the tasklet effectively runs like the kernel equivalent of a
SCHED_FIFOthread. i don't know at what priority, however.--p
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 9 lines · Paul Davis
Quoted 2 lines
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read.
the hdsp driver is one of the first alsa drivers to use tasklets to handle MIDI without impacting audio latency (that is, we can continue processing audio i/o even while MIDI i/o is pending). once we have launched a tasklet to handle MIDI input, there is no point handling more interrupts that tell us the same thing.
Quoted 3 lines
the tasklet stuff relies on the kernel scheduler, but AFAIK, the tasklet effectively runs like the kernel equivalent of a
SCHED_FIFOthread. i don't know at what priority, however.
AFAIK tasklets have higher priority than any user thread.
Quoted 1 line
From the error description I diagnose that either MIDI interrupts or
the MIDI tasklet are suppressed while jack is running. It shouldn't be possible to prevent a tasklet from running unless the CPU usage is 100%, so I think it's somehow related to interrupts.
Maybe the hardware doesn't set (or clears) the MIDI bit when too many PCM interrupts occur, but I'm just guessing here.
Regards,
Clemens
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 9 lines
AFAIK tasklets have higher priority than any user thread.
From the error description I diagnose that either MIDI interrupts or the MIDI tasklet are suppressed while jack is running. It shouldn't be possible to prevent a tasklet from running unless the CPU usage is 100%, so I think it's somehow related to interrupts.
Quoted 6 lines
Maybe the hardware doesn't set (or clears) the MIDI bit when too many PCM interrupts occur, but I'm just guessing here.
Regards,
Clemens
Hi,
I wanted to remind people that the version of Alsa that I am using is
0.9.6, but the hdsp 9652 driver is not the one in CVS. It's the one Thomas developed remotely at his place and has been tested on my machine and possibly a few others. I think a patch was supplied to asla-devel but I'm not sure about that. To the best of my knowledge Thomas didn't do any editing on the MIDI side of things, but we didn't talk about that level of detail much.
I just didn't want anyone to be surprised later if it turns out it has
something to do with the audio side of the hdsp 9652 driver.
- Mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 2 lines · Paul Davis
Quoted 2 lines
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read.
... and midi_input_trigger flushes the input FIFO if the interrupt bit isn't set.
Unfortunately, this does not seem to be the bug we're searching for. :)
Regards,
Clemens
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 10 lines
Quoted 2 lines
At lunch today I rewired my MIDI input from the keyboard
controller to use
Quoted 1 line
the MidiSport input instead of the HDSP 9652 input. In this
configuration,
Quoted 4 lines
with only about 15 minutes of testing, I had no problems. I will do more testing this evening, but possibly this data says it's an HDSP 9652 MIDI problem, or the HDSP 9652 MIDI combined with Jack-type audio, and not specifically 'Alsa MIDI'.
Quoted 4 lines
When an interrupt for MIDI input occurs, the hdsp driver disables all further MIDI interrupts until the current input data has been read. I don't know why it does this, but you may try to remove/disable lines 3181, 3182, 3188, and 3189 in
hdsp.c.
Thanks Clemens. I'll take a look at this over the weekend probably, although I wonder about your response to Paul's message on this subject?
Cheers,
Mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf