From: bugtrack@alsa-project.org Subject: [ALSA - utils 0001326]: ISA cards (opl3sa2 in particular) are not detected properly on 2.6 kernels Date: Fri, 12 Aug 2005 15:11:58 +0200 Message-ID: <6c0c5f2b0b10539e0b1bb618278e2d01@bugtrack.alsa-project.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from bugtrack.alsa-project.org (gate.perex.cz [82.113.61.162]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id BA6CC208 for ; Fri, 12 Aug 2005 15:11:58 +0200 (MEST) Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org The following issue has been UPDATED. ====================================================================== ====================================================================== Reported By: ahaning Assigned To: perex ====================================================================== Project: ALSA - utils Issue ID: 1326 Category: alsaconf Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 08-10-2005 03:39 CEST Last Modified: 08-12-2005 15:11 CEST ====================================================================== Summary: ISA cards (opl3sa2 in particular) are not detected properly on 2.6 kernels Description: When brute-force detecting my OPL3SA2 card, the IRQ and DMA1/DMA2 settings are incorrectly detected by alsaconf from alsa-utils. For example, the default BIOS settings are IRQ=11, DMA1=0, DMA2=1, but alsaconf detects IRQ=5, DMA1=1, DMA2=0. No matter the BIOS settings, alsaconf always detects those settings (IRQ=5, DMA1=1, DMA2=0). If I set the BIOS settings to that, then the card will make sound (after touching the mixer while playing audio). According to perex (author of the opl3sa2 driver): "The alsaconf tries to gather free resources (irq/dma/ports) from the /proc filesystem. It might be extended to gather this information also from /sys filesystem." ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0000879 (snd_)opl3sa2 (isa) doesn't work (fails... ====================================================================== ---------------------------------------------------------------------- perex - 08-10-05 13:28 ---------------------------------------------------------------------- I've uploaded a new alsaconf which should do it in the described way. Could you give a try? Note that it non-pnp probing/setup might fail anyway, but the resources should be selected more correctly. ---------------------------------------------------------------------- ahaning - 08-10-05 14:55 ---------------------------------------------------------------------- I tried the above alsaconf. The IRQ (irq=11) is now selected correctly. However, I *think* dma1=5 and dma2=3 are incorrect. I'm starting to doubt this now since I did mess with the BIOS settings recently. I'll check again when I have local access to the machine. Thanks. ---------------------------------------------------------------------- ahaning - 08-11-05 00:24 ---------------------------------------------------------------------- Well, I'm going to guess that last time, my system was in some odd state. Here are the BIOS settings for my card (I had it set them to the defaults): PnP = On I/O = 220H-22FH MPU-401 I/O = 330H - 333H IRQ = 11 DMA 1 = CH0 WAVE 2 DMA = CH1 When I run the above alsaconf and have it bruteforce detect my card, it produces the following /etc/modprobe.conf: # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF version 1.0.9a --- alias snd-card-0 snd-opl3sa2 alias sound-slot-0 snd-opl3sa2 options snd-opl3sa2 fm_port=-1 midi_port=-1 port=0x370 wss_port=0x530 isapnp=0 dma1=1 dma2=0 irq=5 # --- END: Generated by ALSACONF, do not edit. --- Also, when it is doing the detection, I get the following badness in dmesg: pnp: the driver 'opl3sa2' has been registered pnp: the driver 'opl3sa2' has been unregistered kobject_register failed for snd_generic_pm (-17) [] kobject_register+0x44/0x70 [] bus_add_driver+0x57/0xd0 [] snd_generic_device_register+0x24/0xa0 [snd] [] snd_card_set_generic_pm_callback+0x13/0x60 [snd] [] snd_cs4231_create+0x1f5/0x380 [snd_cs4231_lib] [] snd_cs4231_pm_suspend+0x0/0x30 [snd_cs4231_lib] [] snd_cs4231_pm_resume+0x0/0x30 [snd_cs4231_lib] [] snd_opl3sa2_probe+0x227/0x520 [snd_opl3sa2] [] alsa_card_opl3sa2_init+0x8d/0x97 [snd_opl3sa2] [] sys_init_module+0x1f7/0x220 [] syscall_call+0x7/0xb kobject_register failed for snd_generic_pm (-17) [] kobject_register+0x44/0x70 [] bus_add_driver+0x57/0xd0 [] snd_generic_device_register+0x24/0xa0 [snd] [] snd_card_set_generic_pm_callback+0x13/0x60 [snd] [] snd_opl3sa2_probe+0x35b/0x520 [snd_opl3sa2] [] snd_opl3sa2_suspend+0x0/0x50 [snd_opl3sa2] [] snd_opl3sa2_resume+0x0/0x90 [snd_opl3sa2] [] alsa_card_opl3sa2_init+0x8d/0x97 [snd_opl3sa2] [] sys_init_module+0x1f7/0x220 [] syscall_call+0x7/0xb pnp: the driver 'opl3sa2' has been registered Occasionally, I get a lockup when my system goes to reboot. The drives are all un/re-mounted and everything's shut down, but there's an error like the above. HTH and thanks. ---------------------------------------------------------------------- ahaning - 08-12-05 00:00 ---------------------------------------------------------------------- I searched bugzilla.kernel.org today and found a bug < http://bugzilla.kernel.org/show_bug.cgi?id=4561 > that looks like it's related to this bug. I tried the comment to list devices detected by pnp in /sys. Here's what I get: # find */id | xargs cat PNP0c02 PNP0c01 PNP0c02 NMX2210 NMX2220 PNP0a03 PNP0200 PNP0000 PNP0100 PNP0b00 PNP0303 PNP0c04 PNP0800 PNP0f13 PNP0501 PNP0510 PNP0401 # The two NMX lines look promising. I tried the hack to enable the devices before inserting the module with no luck. Anyway, thought I'd mention this. ---------------------------------------------------------------------- ahaning - 08-12-05 03:09 ---------------------------------------------------------------------- Well, I've fiddled with this a bit more. After fixing the dma1 and dma2 entries, I can set the IRQ to 5, 7, or 11 in /etc/modprobe.conf and the OPL3SA2 driver is loaded. Currently, I have the BIOS settings set to the default IRQ=11, DMA1=0, DMA2=1 like before. I've fixed dma1= and dma2= in /etc/modprobe.conf and if irq= is set to 5, 7, or 11, sound works (I just have to touch the PCM mixer while playing...). Here's my /proc/dma entry as alsaconf detects it and after I fix it so sound sort of works. Maybe it's helpful? Detected by alsaconf: # cat /proc/dma 0: CS4231 - 2 1: CS4231 - 1 4: cascade # Fixed by me so things kinda work: # cat /proc/dma 0: CS4231 - 1 1: CS4231 - 2 4: cascade # Here is /sys/module/snd_opl3sa2/parameters/dma1 and /sys/module/snd_opl3sa2/parameters/dma2 before and after: dma1 before: # cat /sys/module/snd_opl3sa2/parameters/dma1 1,65535,65535,65535,65535,65535,65535,65535 dma2 before: # cat /sys/module/snd_opl3sa2/parameters/dma2 0,65535,65535,65535,65535,65535,65535,65535 dma1 after: # cat /sys/module/snd_opl3sa2/parameters/dma1 0,65535,65535,65535,65535,65535,65535,65535 dma2 after: # cat /sys/module/snd_opl3sa2/parameters/dma2 1,65535,65535,65535,65535,65535,65535,65535 Anyway. FWIW. Thanks. ---------------------------------------------------------------------- perex - 08-12-05 09:29 ---------------------------------------------------------------------- The NMX devices are probably not related. Yamaha has YMF prefix. So, the IRQ can be selected without any problem, but the DMA configuration must be forced to one combination otherwise it does not work? ---------------------------------------------------------------------- ahaning - 08-12-05 12:54 ---------------------------------------------------------------------- According to Gateway's site < http://support.gateway.com/s/Mobile/Solo_Series/P2500/p250044.shtml#P46_3484 > my notebook uses a "Neomagic NMA 2" sound card. It also has a Neomagic video card, so it's possible that those two entries are from the video. That said, the OPL3SA2 driver is the only one that has ever worked for me. It appears that the DMAs are the only parts that have to be forced correctly. I tried setting DMA1 to 3 and DMA2 to 0 in the BIOS. They weren't detected correctly, but when I fixed that part in /etc/modprobe.conf, sound worked (after touching the mixer while playing). I can add some /proc or /sys output here later. Issue History Date Modified Username Field Change ====================================================================== 08-10-05 03:39 ahaning New Issue 08-10-05 03:39 ahaning Distribution => Slackware 9.1 (but it's not distribution-specific) 08-10-05 03:39 ahaning Kernel Version => 2.6.12.2 08-10-05 13:26 perex Status new => assigned 08-10-05 13:26 perex Assigned To => perex 08-10-05 13:26 perex File Added: alsaconf 08-10-05 13:28 perex Note Added: 0005747 08-10-05 13:29 perex Project ALSA - driver => ALSA - utils 08-10-05 13:30 perex Relationship added related to 0000879 08-10-05 13:31 perex Category 1_OTHERS => alsaconf 08-10-05 14:55 ahaning Note Added: 0005748 08-11-05 00:24 ahaning Note Added: 0005752 08-11-05 23:59 ahaning Note Added: 0005763 08-12-05 00:00 ahaning Note Edited: 0005763 08-12-05 03:09 ahaning Note Added: 0005764 08-12-05 09:29 perex Note Added: 0005766 08-12-05 12:54 ahaning Note Added: 0005767 08-12-05 15:11 perex Summary ISAPNP cards (opl3sa2 in particular) are not detected properly on 2.6 kernels => ISA cards (opl3sa2 in particular) are not detected properly on 2.6 kernels ====================================================================== ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf