From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugtrack@alsa-project.org Subject: [ALSA - driver 0000879]: (snd_)opl3sa2 (isa) doesn't work (fails on playback) on 2.6.x kernels Date: Thu, 4 Aug 2005 08:52:36 +0200 Message-ID: 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 2B73E140 for ; Thu, 4 Aug 2005 08:52:36 +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 set as RELATED TO issue 0001296. ====================================================================== ====================================================================== Reported By: iive Assigned To: ====================================================================== Project: ALSA - driver Issue ID: 879 Category: ISA - opl3sa2 Reproducibility: always Severity: block Priority: normal Status: new Distribution: Slackware 10 Kernel Version: all 2.6.x kernel version (current 2.6.10) ====================================================================== Date Submitted: 02-03-2005 03:42 CET Last Modified: 08-04-2005 08:51 CEST ====================================================================== Summary: (snd_)opl3sa2 (isa) doesn't work (fails on playback) on 2.6.x kernels Description: It doesn't work on all 2.6.x kernel I have tried (current 2.6.10) alsaconf doesn't detect the card as PnP, and fails to find it with bruteforce. When module is loaded by hand it shows no error, but on `aplay samle.wav` I got "ALSA /work/install/alsa-driver-1.0.5a/alsa-kernel/core/pcm_lib.c:2172: playback write error (DMA or IRQ trouble?" on boot with 2.4.x kernel, everything magically works (alsaconf, aplay etc..) the bug is reported 4 months ago on http://bugzilla.kernel.org/show_bug.cgi?id=3117 that's why some versions are old (but I had tried alsa-1.0.8 before reposting this bug here) ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0001296 isapnp is incompatible with pnpbios and... ====================================================================== ---------------------------------------------------------------------- jdthood - 04-13-05 21:59 ---------------------------------------------------------------------- Submitter: Is there any way you can do more research into the problem? ---------------------------------------------------------------------- iive - 04-14-05 00:02 ---------------------------------------------------------------------- Tell me what to do and I'll do it. btw have you took a look of the attached file? ---------------------------------------------------------------------- ahaning - 07-09-05 06:38 ---------------------------------------------------------------------- I was able to get alsa to brute-force detect my opl3sa2 card in linux 2.4 and then copy the modules.conf to modprobe.conf and then (after installing the drivers compiled for the currently-installed kernel) I can do 'alsasound start' and I get audio just fine in kernel 2.6(.12.2). HTH. FWIW, here is the modprobe.conf that was generated under kernel 2.6: # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF version 1.0.9rc3 --- 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 dma1=3 dma2=1 irq=9 # --- END: Generated by ALSACONF, do not edit. --- and here is the configuration generated under 2.4 (that works in 2.6, too): # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF version 1.0.9 --- alias char-major-116 snd alias char-major-14 soundcore alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss 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 dma1=0 dma2=1 irq=11 isapnp=0 # --- END: Generated by ALSACONF, do not edit. --- HTH. -Andy (If you need any other information, I'm probably better reached via email: ahaning@gmail.com) ---------------------------------------------------------------------- jdthood - 07-09-05 11:13 ---------------------------------------------------------------------- > btw have you took a look of the attached file? I just looked at it now. I see that it contains a lot of information. jdthood@turmeric:/tmp/isa_opl3sa2$ ls fullog isapnp_after isapnp_before kernel/ lsmod proc/ sys/ ---------------------------------------------------------------------- jdthood - 07-09-05 11:14 ---------------------------------------------------------------------- See also: https://bugzilla.ubuntu.com/show_bug.cgi?id=5456 ---------------------------------------------------------------------- ahaning - 07-28-05 05:17 ---------------------------------------------------------------------- Is there any news on this? I see on LKML that there is a move to remove "obsolete" OSS drivers from the kernel. This could be fairly disasterous for people who don't know how to configure their OPL3SA2 card in 2.6 kernels with the ALSA driver, since alsaconf will not detect those cards correctly on 2.6 kernels. I was told to file a bug report, which I may do eventually, but I figured maybe it would be best to keep everything in one place. And since I'd already posted what I know in this bug, I didn't think it would be worth writing up another bug report. Anyway, just wanting to see what may have been done to get OPL3SA2 cards detected and working well on 2.6 kernels. Thanks. ---------------------------------------------------------------------- iive - 08-02-05 00:02 ---------------------------------------------------------------------- I must say that it is easier to make opl3sa2 work on 2.2.x kernel than to make it work on 2.6.x kernel. Because if you had read the link I had provided you would know that I have used isapnp&pnpdump before and that now it didn't work. Didn't work either the modprobe.conf options you have provided me. In short. I don't care if it is pnp, driver bug, kernel bug. I want it fixed. If some of developers is willing to investigate I could give him ssh access on my box. You have my email. So, it is now kernel-2.6.12.3 and it doesn't work. ---------------------------------------------------------------------- ahaning - 08-02-05 03:05 ---------------------------------------------------------------------- FWIW, I tried 2.6.13-rc4 with ALSA 1.0.9 (driver 1.0.9b) and had no luck (surprise). I tried having alsaconf brute force detect with several cs#### drivers and the opl3sa2 and it configured one of the cs#### drivers. It was wrong, though. I think the problem might have something to do with IRQs/ISA and the way that 2.6 handles them versus previous kernels. However, I'm not a coder or a kernel hacker, so I could be way off here. When alsaconf has managed to configure something (like in one of my previous comments) the IRQs were completely wrong, which I thought was odd. I'd also offer up a login to my notebook if someone would be willing to look into this. It would be the first time I'd done such a thing, though, so you'd probably have to tell me what software you need and how you'd like it set up. If there's anything else I can do, someone please say so. Like iive, I'm getting frustrated that my notebook is over 5 years old and is having driver regression issues. All drivers for this machine should work like a charm. -Andy ---------------------------------------------------------------------- perex - 08-02-05 22:14 ---------------------------------------------------------------------- The alsaconf-isapnp-2.6.patch should fix the alsaconf probing problem. Please, confirm. Also, could you try remove 'options snd-opl3sa2' line from your modprobe.conf and try the command 'modprobe snd-opl3sa2' on fresh system (after boot)? ---------------------------------------------------------------------- perex - 08-02-05 22:16 ---------------------------------------------------------------------- The alsaconf-isapnp-2.6.patch should fix the alsaconf probing problem. Please, confirm. Also, could you try remove 'options snd-opl3sa2' line from your modprobe.conf and try the command 'modprobe snd-opl3sa2' on fresh system (after boot)? ---------------------------------------------------------------------- ahaning - 08-03-05 02:46 ---------------------------------------------------------------------- perex: Thanks for the patch! Unfortunately, I'm unable to get it to work. The patch you attached to this bug appears to be against the CVS tree, which won't even build for me. Furthermore, I've had trouble figuring out how to apply the patch. I've tried 'patch -p1 < ' from the ./alsa-utils/alsaconf directory, as well as 'patch -p0 < ' and -p1 says it can't find the file to patch. -p0 says that it looks like the patch has already been applied. What kernel are you running? I'm still on 2.6.12.2. If possible, a patch against ALSA 1.0.9 would be much appreciated. Thanks! ---------------------------------------------------------------------- perex - 08-03-05 11:42 ---------------------------------------------------------------------- I uploaded new alsaconf script. Hopefully, it will work on your system. ---------------------------------------------------------------------- ahaning - 08-03-05 13:42 ---------------------------------------------------------------------- perex: I copied the attached alsaconf script over my old one and ran it. The first time, without rebooting, it said it found a OPL3SA2 and would write the configuration to /etc/modprobe.conf, but either it didn't or it detected things incorrectly. After rebooting, it won't even detect the OPL3SA2. "No legacy cards found." What version of ALSA and the kernel are you running? If we can try to get at least similar software, it might be easier to debug these issues. Also, what kind of OPL3SA2 are you using? I have one in my Gateway Solo 2500 and I have PNP turned off in the BIOS. Thanks! ---------------------------------------------------------------------- ahaning - 08-03-05 15:17 ---------------------------------------------------------------------- After applying that patch to alsa-utils-1.0.9 and reinstalling alsa-driver-1.0.9b, alsaconf appears to be consistently detecting my card. I don't think the IRQ setting is quite correct and I'm currently only able to access the machine over SSH, so I can't tell whether or not it's working. Here's the modprobe.conf that is generated: # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF version 1.0.9 --- 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 dma1=1 dma2=0 irq=5 # --- END: Generated by ALSACONF, do not edit. --- I don't think it's set to IRQ 5 and dma1 is usally set to 0 and dma2 to 1, but the IO ports look correct. I can load alsamixer and fiddle with the options. mplayer doesn't seem to be able to play (from what I can tell from an SSH window). At least it's a small step. ---------------------------------------------------------------------- perex - 08-04-05 08:51 ---------------------------------------------------------------------- You are trying configure legacy cards. Don't try that (select only detected PnP card in alsaconf). The option opl3sa2 line with manual resources should NOT be present in the generated configuration. Select only detected card (and try to remove the whole ALSACONF block from modprobe.conf). Issue History Date Modified Username Field Change ====================================================================== 02-03-05 03:42 iive New Issue 02-03-05 03:42 iive File Added: isa_opl3sa2.tgz 02-03-05 03:42 iive Distribution => Slackware 10 02-03-05 03:42 iive Kernel Version => all 2.6.x kernel version (current 2.6.10) 04-13-05 21:59 jdthood Note Added: 0004478 04-14-05 00:02 iive Note Added: 0004485 07-09-05 06:26 ahaning Note Added: 0005438 07-09-05 06:38 ahaning Note Edited: 0005438 07-09-05 11:13 jdthood Note Added: 0005439 07-09-05 11:14 jdthood Note Added: 0005440 07-28-05 05:17 ahaning Note Added: 0005577 08-02-05 00:02 iive Note Added: 0005599 08-02-05 03:00 ahaning Note Added: 0005600 08-02-05 03:05 ahaning Note Added: 0005601 08-02-05 03:05 ahaning Note Deleted: 0005600 08-02-05 22:08 perex File Added: alsaconf-isapnp-2.6.patch 08-02-05 22:14 perex Note Added: 0005607 08-02-05 22:16 perex Note Added: 0005608 08-03-05 02:46 ahaning Note Added: 0005610 08-03-05 11:42 perex File Added: alsaconf 08-03-05 11:42 perex Note Added: 0005615 08-03-05 13:42 ahaning Note Added: 0005625 08-03-05 15:17 ahaning Note Added: 0005631 08-04-05 08:51 perex Note Added: 0005641 08-04-05 08:52 perex Relationship added related to 0001296 ====================================================================== ------------------------------------------------------- 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