Bug 162181 - [snd_emu10k1] [patch] The kernel sound driver module snd_emu10k1.ko hangs when loaded.
Summary: [snd_emu10k1] [patch] The kernel sound driver module snd_emu10k1.ko hangs whe...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2011-10-31 05:00 UTC by baileygeoff
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:

file.diff (1.39 KB, patch)
2011-10-31 05:00 UTC, baileygeoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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