Bug 12324 - using emu10k1 hardware synth freezes computer
Summary: using emu10k1 hardware synth freezes computer
Status: CLOSED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-29 13:44 UTC by Guillaume Radde
Modified: 2012-05-24 13:40 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.28
Subsystem:
Regression: No
Bisected commit-id:


Attachments
lsmod (4.66 KB, application/octet-stream)
2009-01-08 20:54 UTC, Guillaume Radde
Details

Description Guillaume Radde 2008-12-29 13:44:59 UTC
Latest working kernel version: I remember it was working 3-4 years ago.Don't remember which kernel I was using at that time.

Distribution: ubuntu 8.04,8.10 and opensuse 11.1
Hardware Environment:
x86, soundcard is a soundplaster audigy 2 zs

Software Environment: using asfxload and aconnect

Problem Description:
When I load a soundfont in the sound card and try to play any note from it, the computer freezes after ~1 second.

Steps to reproduce:
-load a soundfont in the soundcard 
$asfxload myfont.sf2
-connect a midi source event to one of the emu10k1 wavetable ports
$aconnect -i (see the list of midi sources)
$aconnect -o (see the list of midi destinations)
$aconnect 20:0 17:0 (connect a midi source to a midi dest)
-have your midi source play any midi event (I use a midi keyboard, but I tried it with a midi software as well)

Computer just freezes (doesn't reply to ping anymore) and doesn't leave any message in /var/log/messages.
Comment 1 Guillaume Radde 2008-12-30 18:16:32 UTC
Same bug happens with a freshly compiled 2.6.28 kernel.
Comment 2 Takashi Iwai 2009-01-06 23:13:59 UTC
What sequencer timer module is being used?
If snd-rtctimer driver is loaded, try to unload / disable it.

The emu10k1 synth itself seems working fine on my test machine, and I don't think it's an audigy2-specific issue.
Comment 3 Guillaume Radde 2009-01-08 20:54:35 UTC
Created attachment 19727 [details]
lsmod
Comment 4 Guillaume Radde 2009-01-08 20:56:03 UTC
snd-rtctimer doesn't seem to be loaded. I attached the output of lsmod. Also, this bug report in ubuntu bugtracker seems to be related:

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/34831
Comment 5 Takashi Iwai 2009-01-13 04:04:40 UTC
Does the hang up occur also when you play MIDI on emu10k1, not from MIDI input?
For example,
   aplaymidi -p $EMUPORT somefile.mid
causes the same lock-up?
Comment 6 Guillaume Radde 2009-01-13 07:25:14 UTC
Yes, I ran the following commands and the computer played a few notes and froze:

guignome@alphonse:~$ asfxload ADC-TranceKit.sf2
guignome@alphonse:~$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'Audigy 2 [Unknown]' [type=kernel]
    0 'Audigy MPU-401 (UART)'
   32 'Audigy MPU-401 #2'
client 17: 'Emu10k1 WaveTable' [type=kernel]
    0 'Emu10k1 Port 0 '
    1 'Emu10k1 Port 1 '
    2 'Emu10k1 Port 2 '
    3 'Emu10k1 Port 3 '
client 20: 'Keystation 49e' [type=kernel]
    0 'Keystation 49e MIDI 1'
guignome@alphonse:~$ aplaymidi --port=17:0 HitTheLights.mid
Comment 7 Takashi Iwai 2009-01-13 07:48:58 UTC
OK, what about other output ports?  For example,
    aplaymidi --port=20:0 HitTheLights.mid
Comment 8 Guillaume Radde 2009-01-13 08:19:51 UTC
I haven't tried that for a while but if I remember correctly, it was giving the exact same result. I will double check on that tonight. Thanks for following up on this bug!
Comment 9 Guillaume Radde 2009-01-13 08:24:48 UTC
Oh wait, you mean routing aplaymidi to something else than the emu10k1 wavetable. I had tried to route aplaymidi to timidity and it was working OK (slow but working). I will try again tonight to make sure.
Comment 10 Guillaume Radde 2009-01-13 18:12:24 UTC
Confirmed.
If I run timidity -iA -Os, and then aplaymidi -p 129:0 myfile.mid (where 129:0 is timidity's port), I can hear my song playing and everything works fine. If I run aplaymidi -p 17:0 (where 17:0 is the emu10k1 wavetable port), the computer hangs up.
Comment 11 Takashi Iwai 2009-01-13 23:20:15 UTC
OK.  One more test: try to play MIDI notes without sequencer queuing.
That is, run a program like vkeybd, connect to emu10k1 wavetable port, and play notes there.

If this causes the lock-up, it means that only the emu10k1 wavetable part (and/or the event-delivering part) is the culprit.  If it doesn't cause the problem, the combination of queue and emu10k1 is the key.
Comment 12 Guillaume Radde 2009-01-14 05:34:01 UTC
Here is what I did:
-Ran vkeybd
-Loaded a soundfont in the card with asfxload
-connected vkeybd output to the emu10k1 wavetable with acconect
-clicked on 3 keys on vkeybd's virtual keyboard. None of the 3 notes played and the computer hung up.
Comment 13 Takashi Iwai 2009-01-14 05:37:21 UTC
OK, then it's very likely emu10k1-specific.
Does this "vkeybd -> emu10k1" hang occurs even if you don't load soundfonts?
Comment 14 Guillaume Radde 2009-01-14 16:09:13 UTC
No, the computer doesn't hang if there is no soundfont loaded in the soundcard.
Here is what I did:
-Ran vkeybd
-connected vkeybd to the emu10k1 wavetable port with aconnect
-played 300 notes with vkeybd

...Nothing happened....

-loaded a font in the soundcard with asfxload
-played a few notes on vkeybd

....Computer hang.....

Note that I tried to load several different soundfonts and the computer hang each time.
Comment 15 Takashi Iwai 2009-01-21 04:01:46 UTC
Thanks.  How much RAM do your machine have?  If it's over 2GB, try to limit to 2GB via boot option.
Comment 16 Guillaume Radde 2009-01-21 05:53:19 UTC
I only have 1GB of RAM.

Note You need to log in before you can comment on or make changes to this bug.