Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#7100 - 2.6.21 Kernel breaks opl3sa2 ISA Sound Card

Attached to Project: Arch Linux
Opened by Rob (RobK) - Tuesday, 08 May 2007, 23:16 GMT
Last edited by Tobias Powalowski (tpowa) - Sunday, 10 June 2007, 09:49 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Medium
Priority Normal
Reported Version 0.8 Voodoo
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I just upgraded from 2.6.20 to 2.6.21 kernel in current. I am using an older laptop with the Yamaha opl3sa2 sound card (ISA based). I have the "opl3sa2" module listed in the MODULES line in my rc.conf.

When I boot, I see the message "Error loading opl3sa2 .... No such device"

Later in the boot up, I also see an error message during the ALSA Sound stage: "alsactrl load state :1326 : No Sound Card Found."

When I do a "lsmod", I do see a new opl3 related modules being loaded --snd_opl3_lib. So it looks like udev is loading some of the needed sound modules.

Is this a bug? Or do I need to make some changes to my rc.conf or my modprobe.conf?

Rob

This task depends upon

Closed by  Tobias Powalowski (tpowa)
Sunday, 10 June 2007, 09:49 GMT
Reason for closing:  Fixed
Comment by Tobias Powalowski (tpowa) - Wednesday, 09 May 2007, 14:06 GMT
probably the new module needs other parameters, isa cards are usually configured with alsaconf.
clean your old modprobe.conf first and rerun alsaconf.
Comment by Rob (RobK) - Wednesday, 09 May 2007, 23:22 GMT
I tried deleting /etc/modprobe.conf and running alsaconf. alsaconf tried to configure the Yamaha opl3sa2 soundcard and said it did but when it tried to set the sound levels, an error message appeared saying that the sound card was not available. (alsaconf did create moprobe.conf and wrote some lines in it for the sound card).

After doing some more tests, I have sure that it is NOT an ALSA configuation problem. For my sound card to work, I need the snd-opl3sa2.ko module. For some reason when modprobe (or udev) tries to insert the module (which does exist in /lib/modules/2.6.21-ARCH/kernel/sound/isa/), it fails with an error message -- No such device. I never had this problem with the 2.6.20 kernel.

FYI -- I deleted the "snd-opl3sa2" module from the MODULES line in rc.conf. When I rebooted, udev tried to load "snd-opl3sa2" but could not. I received the the following error message during the udev stage of boot up:

:Loading udev events
modprobe FATAL : error inserting snd-opl3sa2.ko (/lib/modules/2.6.21-ARCH/kernel/sound/isa/snd-opl3sa2.ko): No such device

Very strange. This sound card device does exist! When I run alsaconf after boot up, alsaconf finds the opl3sa2 sound card and offers to configure it. When you say yes, it does some configuring but later fails when it tries to set the volume levels.

For this sound card to work, you need to set the IRQ location manually. ISA cards are not plug in play. You typically do this in the /etc/modprobe.conf file with an OPTIONS line as follows:

alias snd-card-0 snd-opl3sa2
alias sound-slot-0 snd-opl3sa2
options snd-opl3sa2 fm_port=-1 midi_port=-1 port=0x538 wss_port=0x530

For some reason, udev or modprobe is ignoring this OPTIONS line. (The previous kernel did not). AT least I think that is what the problem is.

Rob

Comment by Rob (RobK) - Thursday, 10 May 2007, 00:08 GMT
I solved part of the problem. I found the way to load the sound module but I still can't play sound files.

The new kernel / modprobe did not like my old existing modprobe.conf (that worked great for the past couple of years under Arch).

My old modprobe.conf was:

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.10 ---
alias snd-card-0 snd-opl3sa2
alias sound-slot-0 snd-opl3sa2
options snd-opl3sa2 fm_port=-1 midi_port=-1 port=0x538 wss_port=0x530
options isapnp=0 dma1=1 dma2=0 irq=5
# --- END: Generated by ALSACONF, do not edit. ---

To get the snd-opl3sa2 sound module to load, I had to change the last line. Now it reads:

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.10 ---
alias snd-card-0 snd-opl3sa2
alias sound-slot-0 snd-opl3sa2
options snd-opl3sa2 fm_port=-1 midi_port=-1 port=0x538 wss_port=0x530
options snd-opl3sa2 isapnp=0 dma1=1 dma2=0 irq=5
# --- END: Generated by ALSACONF, do not edit. ---

By the way, alsaconf does NOT set up this ISA sound card. alsaconf does not create the OPTIONS line. You must do it manually. (do a modinfo sound-card-module to see the options)

Now I don't see any errors when udev loads snd-opl3sa2 module. When I do a lsmod, I see the snd-opl3sa2 module. But when I try to play a WAV file, I get an error:

aplay: pcm_write:1265: write error: Input/output error

Rob

Comment by Rob (RobK) - Thursday, 10 May 2007, 02:28 GMT
I solved the problem. For some really strange reason, the kernel could not access 0x538 to access my sound card. (kernel 2.6.20 could access this address on my sound card).

AFter I booted, I looked at dmesg. In the output of dmesg was an error message:

Could not grab 0x538.

So I fiddled with the addresses in /etc/modprobe.conf. This setup appears to work:

options snd-opl3sa2 isapnp=0 dma1=1 dma2=0 irq=5 fm_port=0x388 midi_port=-1 port=0x388 wss_port=0x530 sb_port=0x220

Comment by Roman Kyrylych (Romashka) - Thursday, 10 May 2007, 07:10 GMT
hm, how about creating a wiki page for those cards that don't work out of the box?
Comment by Rob (RobK) - Thursday, 10 May 2007, 13:46 GMT
alias snd-card-0 snd-opl3sa2
alias sound-slot-0 snd-opl3sa2
options snd-opl3sa2 isapnp=0 dma1=1 dma2=0 irq=5
options snd-opl3sa2 fm_port=-1 midi_port=0x330 port=0x388 wss_port=0x530 sb_port=0x220

After during some more research on the internet and some more experimentation, it would appear that the following lines in my /etc/modprobe.conf work best for this Yamaha opl3sa2 card. Unfortunately, I found that one cannot use alsaconf to set up the opl3sa2 sound card. When you do, alsaconf just crashes Arch linux altogether when it probes the ports of the sound card. (You have to do a cold restart).

For those who may be reading this post, here is a way to set up ISA sound cards (when alsaconf fails):

1) Boot into Windows (yuck!) and go to the Control Panel -- System -- Hardware and look at the properties for the sound card. One of the tabs will show you the make and model of the sound card, the IRQ, DMA and a list of port addresses used. Unfortunately, it will not show you which port is the fm_port, which port is the midi_port etc. But at least you know the addresses of the ports. (if you don't have Windows, you may want to try Bart PE).

2) Then boot into linux and do a "modinfo sound_card_module_name" (eg modinfo snd-opl3sa2) If you don't know the linux module name -- do a search on google (or look in lib/modules/2.6.21-ARCH/kernel/sound/isa ). modinfo will give you all the options for the card (e.g. midi_port for setting the midi_port for the opl3sa2 ISA card).

3) Put the following lines in your modprobe.conf (and delete out comment out all the other sound card lines):

alias snd-card-0 name_of_sound_card_module
alias sound-slot-0 name_of_sound_card_module
options place_all_your_options_here_found_using_modinfo

4) Pray (Optional Step)

5) You may have to play around with the port numbers found in 2) to discover which port is the midi_port etc. Sometimes searching Google will help.

Yes, creating a wiki page would be a great idea. But I would first have to learn the wiki commands etc (something that I have not got around yet).
Comment by Tobias Powalowski (tpowa) - Sunday, 10 June 2007, 09:48 GMT
closing this now it's a configuration problem

Loading...