: reloading opl4 driver isn't allowed - it segfaults
A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=759>
======================================================================
Reported By: martin Assigned To: Clemens Ladisch ====================================================================== Project: ALSA - driver Issue ID: 759 Category: GENERIC - opl4 Reproducibility: always Severity: minor Priority: normal Status: assigned Distribution: Kernel Version: ====================================================================== Date Submitted: 12-30-2004 00:05 CET Last Modified: 01-16-2005 17:33 CET
======================================================================
Summary: reloading opl4 driver isn't allowed - it segfaults
Description:
I'm writing a driver for the miroSOUND PCM12. But I have some trouble with the OPL4 part and I'm afraid it's not related to my hardware/software. The first modprobe works ok and OPL4 behaves correct. Then rmmod'ing the driver and modprobe'ing it again shows a segfault.
The reason for the segfault is snd_opl4_create() which calls snd_opl3_create() where snd_opl3_new() is the reason for the segfault.
I don't see, that a correct unload of opl4 will ever run snd_device_free() for the opl3 part? Any comments? Any OPL4 user out there for cross-checking this with a working OPL4 environment?
======================================================================
----------------------------------------------------------------------
Clemens Ladisch - 01-10-05 17:09
----------------------------------------------------------------------
The OPL3/4 structures are registered with snd_device_new(), so ALSA will automatically free them when the sound card is destroyed.
Reloading works fine on my system (with the snd-opti92x-ad1848 driver).
After unloading, is there anything remaining in /proc/asound/cards or /proc/ioports?
Does the OPL4 initialization in your driver differ from the OPTi driver?
----------------------------------------------------------------------
martin - 01-16-05 17:33
----------------------------------------------------------------------
Thanks for the answer, but actually I've some bigger problems with my OPL4 -- it doesn't respond at all. I hope it's not completely destroyed and I can reanimate it by a Windows installation or so...
The miroSOUND has also an OPTi chip and I've used the same init parts like the snd-opti92x-ad1848 driver. Thanks for confirming opl4 driver correctness. So I have to look for a bug on my side. I was afraid about it. Thanks, Clemens.
I guess we can close the report now.
Issue History
Date Modified Username Field Change
======================================================================
12-30-04 00:05 martin New Issue
01-10-05 17:09 Clemens LadischNote Added: 0003137
01-16-05 17:33 martin Note Added: 0003220
======================================================================
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt