Skip to contentSkip to conversation

Hammerfall DSP: Midi-related audio dropouts workaround / question

DISCUSSION M. Nentwig 1 participant 1 message Nov 15, 2002

lore
Share & tools
lore

M. Nentwig

author
#0 lore raw

Hello,

a couple of days I wrote about audio dropouts caused by MIDI data. Now I found a workaround: Unloading the uhci (USB) driver, loading the hammerfall driver, reloading the uhci driver gets rid of the dropouts. Also plugging in a USB device helps. Both USB controller and hdsp share the same interrupt on my laptop.

Before I found this workaround, I spent some time hacking the hdsp driver. I created a new thread, that sleeps ('interruptible_sleep_on(sth)'), until the MIDI interrupt wakes it ('wake_up'(sth)). As long as it's doing no real work (just counting MIDI events for example), everything works fine.
But as soon as I take the MIDI processing out of the interrupt (or remove it completely), the machine locks up. Probably during the interrupt - even the 'magic sysrq key' is dead. And I don't understand this at all. Does the hardware crash, if I don't empty the MIDI FIFO queue in time?
The crash occurs also, when MIDI processing is removed from a vanilla hdsp driver.

Some related observations:
- The dropouts disappear, if I disable MIDI interrupts. But then MIDI in is unreliable, big surprise.
- The dropouts don't get any better, if I don't submit the received data to alsa at the end of the MIDI-in processing.

Regards

Markus

-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html