Bug 162181

Summary: [snd_emu10k1] [patch] The kernel sound driver module snd_emu10k1.ko hangs when loaded.
Product: Base System Reporter: baileygeoff <baileygeoff>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

Description baileygeoff 2011-10-31 05:00:26 UTC
When you load the emu10k1 sound driver (kldload snd_emu10k1) it prints the   sndstat message "<Creative EMU10K1> port 0xdf80-0xdf9f irq 9 at device 12.0 on pci2" then the system hangs and must be powered down to continue.
The hang usually happens in the middle of the emu_init() function while initializing the envelope engine, yet the problem appears not to be related to this section of code.
The emu10kx driver works on my box but midi has been disabled in this driver.

Fix: 1.  In the "emu_pci_attach()" function, move the "snd_setup_intr()" call before
    the call to "emu_init()".

2.  Disable hardware midi interrupts in function "emu_midiattach()", since the 
    midi2 driver uses software interrupts.

    With Fix-1 above only, the driver continuously sends "dodgy irq" messages
    from the "emu_intr()" function and the system hangs again.
With these two changes (see attached patch), both audio and midi work as expected.

Patch attached with submission follows:
How-To-Repeat: kldload snd_emu10k1
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-10-31 08:17:06 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-multimedia

Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:18 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped