Puppy2 multiple sound cards default is always selected

Please post any bugs you have found
Post Reply
Message
Author
rob
Posts: 50
Joined: Wed 18 May 2005, 12:09

Puppy2 multiple sound cards default is always selected

#1 Post by rob »

In alsa wizard, the first detected sound card is always selected no matter which opition is picked, sound always comes from the same card. Worked up till 1.09

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

Ah, yes, a problem.

So, you are running the alsa wizard and getting a choice of sound cards?
Then the one you choose is ignored at next bootup.
Okay, this is definitely a bug. I've made a note of it and will fix it.

rob
Posts: 50
Joined: Wed 18 May 2005, 12:09

#3 Post by rob »

Its not just at next bootup. It used to work immediately. It doesn't do that now. Also, Ive noticed Java applications don't use any sound cards at all. No noise comes from either card. Again, I tested this under 1.09 and it worked.

User avatar
fluxit
Posts: 326
Joined: Sat 24 Jun 2006, 04:14
Location: Ketchikan, AK USA

#4 Post by fluxit »

Barry,

Has there been any progress on this issue?
I have been trying to get a working alsa configuration here with multiple sound cards on Puppy 2.01 with no real progress. The wizard has a mind of its own(wrong) about what my hardware is, and there seems to be no way of changing it. Below is what I think my sound aliases and such should look like courtesy of /etc/modules.conf:

Code: Select all

alias snd-card-0 snd-sbawe
alias sound-slot-0 snd-sbawe
options snd-sbawe index=0
alias snd-card-1 snd-intel8x0
alias sound-slot-1 snd-intel8x0
options snd-intel8x0 index=1
alias snd-card-2 snd-bt87x
alias sound-slot-2 snd-bt87x
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
This is what I get in the last section of modprobe.conf after a reboot:

Code: Select all

alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0
alias snd-card-1 snd-bt87x
alias sound-slot-1 snd-bt87x
If I place my alias snd-card and alias-sound-slot entries in modprobe.conf(either between the "do not edit" comments, or after them,) after a reboot the result is a redundant mishmash in modprobe.conf

With the corrected entries in modules.conf, they are over-ridden by the incorrect(and conflicting) entries in modprobe.conf.

After many edits, searches and reboots, I am at a loss to solve this.

Thanks,

--Lee

ted142
Posts: 10
Joined: Sat 19 Aug 2006, 02:07
Location: State of Liberty

#5 Post by ted142 »

I have discovered the same problem and I am less savy than fluxit! Using 2.02 hd install with legacy card detected by wizard probe. It is saved via the wizard and I see an entry in the rc.alsa and modprobe.conf. The initial scripts (which blur by rather fast on this old PII) seem to indicate an attempt to load the legacy driver I selected, however a "not detected" blub is legible and then the stock driver is loaded just before the "copy to ram" message.

So...in knoppix, there was issues of drivers loading out of sequence and this begs a familiar. Perhaps by forcing the module or improving the boot script probing? Perhaps a temporary solution is to execute a script which emulates the wizard output just before X is started?

Is there a way to slow down that script which flashes by or a log which I am overlooking which has the details?

Do post any solution...I havn't found one on the forum yet.

User avatar
fluxit
Posts: 326
Joined: Sat 24 Jun 2006, 04:14
Location: Ketchikan, AK USA

#6 Post by fluxit »

This is unlikely to be a solution, but does /etc/rc.d/rc.alsa start or /etc/rc.d/rc.alsa restart do anything for you?

ted142
Posts: 10
Joined: Sat 19 Aug 2006, 02:07
Location: State of Liberty

#7 Post by ted142 »

unfortunately it is not directly a solution. I am, however, beginning to understand what is happening. Restarting rc.alsa yields similar information as the booting script. Your suggestion echoed the subroutine (or whatever they call it these days!) which echoes shuting down... then it starts the sound driver--which still wants to be cs46xx (not the one the wizard assumedly saved after detecting). Following that, it echoes /usr/sbin/alsacti: save_state:1163: No soundcards found. . . amixer then fails and script ends.

So...where does this script get the driver for which it states "Starting sound driver: snd-cs46xx"? If that location could be edited to contain "cs42xx" or whatever the wizard said I have...

any thoughts?

ted142
Posts: 10
Joined: Sat 19 Aug 2006, 02:07
Location: State of Liberty

#8 Post by ted142 »

ok...i noodled around a bit and captured some of the boot screen stuff--here are the parts that intrigue me:

isapnp: Scanning for PnP cards. . .
isapnp: Card 'CS4236B'


later on, this:

APCI: Found IRQ 11 for device 0000:00:0b.0
ALSA
/mnt/hda1/root/sources/sources029/alsa-driver-1.0.11/alsa-kernel/pci/cs46xx/cs46xx_lib.c:3050: create - never read codec ready from AC'97
ALSA
/mnt/hda1/.../cs46xx_lib.c:3051: it is not probably bug, try to use CS4236 driver Sound Fusion CS46xx: probe of 0000:00:0b.0 failed with error -5


when X starts, I run alsa wizard and probe for CS42xx legacy with success. It writes to files and amixer burps about something. There is no "test" sound heard. I then open xine, remove the x from the speaker icon, move the volume bar to the right and play a sample mp3 to confirm success.

rebooting puppy requires me to repeat this venture. If I do not, xine merrily plays the file but there is no sound.

some of that code up there doesn't make sense to me (error -5, for example)

should this post actually start a seperate post under bugs or continue to be related to rob's initial prompting?

ted142
Posts: 10
Joined: Sat 19 Aug 2006, 02:07
Location: State of Liberty

#9 Post by ted142 »

There is a similar problem/solution in a different thread which I will investigate further:

topic is "ALSA fix for legacy sound cards in Puppy 2x"

I may continue my inquiry there after trying some of the suggestions.

User avatar
fluxit
Posts: 326
Joined: Sat 24 Jun 2006, 04:14
Location: Ketchikan, AK USA

#10 Post by fluxit »

It doesn't use the wizard, but for those willing to create their own configuration- I have found a set of aliases and options for alsa that will allow the choice of a particular sound card. I've tested it successfully on Puppy 2.01 and 1.09. The options persist(and work) on both puppies through a reboot here, though the modprobe.conf changes on Puppy 2.01.

This should be inserted into /etc/modprobe.conf(modules.conf on Puppy 1.x) between the

Code: Select all

# --- ALSACONF verion 1.0.8 ---
and

Code: Select all

# --- END: Generated by ALSACONF, do not edit. ---
lines:

Code: Select all

alias snd-card-0 snd-sbawe
alias sound-slot-0 snd-sbawe
options snd-sbawe index=0
alias snd-card-1 snd-intel8x0
alias sound-slot-1 snd-intel8x0
options snd-intel8x0 index=1
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 sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
options snd cards_limit=3
options snd-pcm-oss nonblock_open=1
alias /dev/mixer snd-mixer-oss
alias /dev/mixer1 snd-mixer-oss
alias /dev/mixer2 snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/dsp1 snd-pcm-oss
alias /dev/dsp2 snd-pcm-oss
alias /dev/midi snd-seq-oss
Replace snd-sbawe with the correct module name for the card you wish to be the primary(0.)
Replace snd-intel8x0 with the name you wish to be secondary(1.)
If the wrong module is grabbing a slot you don't want it to populate, and you only have one sound card you wish to use, replace snd-intel8x0 with snd-dummy.

If you wish to use more than one sound card simultaneously, you will also want to create the extra devices for applications such as Skype that only support oss(through alsa's emulation.) The following script will do that job for you:

Code: Select all

#!/bin/bash
cd /dev

for i in `seq 0 5`; do
    mknod mixer${i} c 14 $[ $i * 16 ]
    mknod dsp${i} c 14 $[ $i * 16 + 3 ]
    mknod audio${i} c 14 $[ $i * 16 + 4 ]
    mknod audioctl${i} c 14 $[ $i * 16 + 7 ]
done
chmod a+rw /dev/mixer* /dev/dsp* /dev/audio* /dev/audioctl*
Note: On Puppy 1.x this script will have to be executed with each boot(from /etc/rc.d/rc.local) unless you remaster, as /dev/* is not persistent.
Last edited by fluxit on Wed 23 Aug 2006, 05:11, edited 1 time in total.

User avatar
fluxit
Posts: 326
Joined: Sat 24 Jun 2006, 04:14
Location: Ketchikan, AK USA

#11 Post by fluxit »

ted142,

Is your soundcard not being detected due to the module's use of wrong options(address,irq,dma,etc?) add them to the options line in modprobe.conf for your module like so:

Code: Select all

options snd-sbawe index=0 port=0x220 irq=5 dma8=1 dma16=5
If you are unsure of the syntax, try the command modinfo modulename for your module.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#12 Post by tempestuous »

ted142,
I will take a stab - Puppy might (?) be automatically detecting your sound card, and identifying it according to /lib/modules/2.6.16.7/modules.pcimap. Have a look at this file now in a text editor - lines 219,220,221 define snd-cs46xx as being the correct module for pci:ids 1013:6001, 1013:6003 and 1013:6004.
Find out what pci:id number your card is and then your solution might be as easy as hacking this file so that your pci:id number corresponds with snd-cs4236.

Or better still, comment out these lines completely so that no automatic detection will occur, then there's no chance that the customised options you added to modprobe.conf will be overridden.

... but maybe do some research on the web, too. These pci:ids are not ususally wrong (you didn't mention the details of your hardware) ... maybe snd-cs46xx IS the correct module ... but it requires customised options to load and work properly?

snd-cs4236 is for Cirrus Logic ISA sound cards.
snd-cs46xx is for Cirrus Logic PCI sound cards.

Post Reply