Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-27 Thread Hans de Hartog

Dave Jones wrote:

Yesterday I upgraded udev to 103, but have hit some problems with alsa
configuration of multiple sound cards.

I have an 'on board' Intel 8x0 sound card which I use for VoIP
telephony, and a PCI Creative Audigy which I use to play music.

The Audigy is configured to alsa as sound card 0, while the Intel card
is sound card 1.  This set up has worked perfectly for years.

The udev 103 upgrade recommends removing coldplug. However, the alsa
initialisation script (alsasound) depend on both coldplug and hotplug.

If I remove coldplug from the boot runlevel alsasound fails, leaving
only the Intel sound card initialised.

Even worse is that udev seems to discover the sound cards in the reverse
order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
is /dev/dsp0.   Unfortunately,  Audacious, my music player of choice,
doesn't seem to offer any choice of which dsp to use.

To put it mildly, this is a major pain; I don't want to listen to music
played through the VoIP headset connected to the Intel card.

Is there any way I can persuade udev to generate the /dev entries for my
sound cards in a particular order, so that Audacious can continue to
work with /dev/dsp0?

Thanks in advance for any help or advice you may be able to give.

Cheers, Dave


You can determine the order in which the cards are found by having
the driver of (what you want as) card 0 compiled into the kernel
and configure card 1 in your kernel as a module.
That's not an elegant solution but it works.
Another possibility: in most alsa-aware applications where you refer
to the card number (0 or 1) you can also refer to the name of the card.
You can find the name of the cards with "cat /proc/asound/cards"

Regards,
Hans.
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-27 Thread James Ausmus

On 11/27/06, Dave Jones <[EMAIL PROTECTED]> wrote:

Yesterday I upgraded udev to 103, but have hit some problems with alsa
configuration of multiple sound cards.

I have an 'on board' Intel 8x0 sound card which I use for VoIP
telephony, and a PCI Creative Audigy which I use to play music.

The Audigy is configured to alsa as sound card 0, while the Intel card
is sound card 1.  This set up has worked perfectly for years.

The udev 103 upgrade recommends removing coldplug. However, the alsa
initialisation script (alsasound) depend on both coldplug and hotplug.

If I remove coldplug from the boot runlevel alsasound fails, leaving
only the Intel sound card initialised.



Hmm - I don't have this issue - what version of alsa-utils are you
running? I'm running 1.0.13. I don't even have a /etc/init.d/coldplug
init script on my system - maybe you need to do an emerge -C coldplug?
Maybe if the coldplug script doesn't exist then alsasound won't
complain about it... Just a theory. ;)


Even worse is that udev seems to discover the sound cards in the reverse
order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
is /dev/dsp0.   Unfortunately,  Audacious, my music player of choice,
doesn't seem to offer any choice of which dsp to use.

To put it mildly, this is a major pain; I don't want to listen to music
played through the VoIP headset connected to the Intel card.

Is there any way I can persuade udev to generate the /dev entries for my
sound cards in a particular order, so that Audacious can continue to
work with /dev/dsp0?



Check http://www.reactivated.net/writing_udev_rules.html and the links
at the bottom of
http://gentoo-wiki.com/UDEV


HTH-

James



Thanks in advance for any help or advice you may be able to give.

Cheers, Dave
--
gentoo-user@gentoo.org mailing list



--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-27 Thread Richard Fish

On 11/27/06, Dave Jones <[EMAIL PROTECTED]> wrote:

Even worse is that udev seems to discover the sound cards in the reverse
order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
is /dev/dsp0.   Unfortunately,  Audacious, my music player of choice,
doesn't seem to offer any choice of which dsp to use.


A couple of notes:

1. any application using /dev/dsp* is _not_ using alsa.  It is using
the legacy oss emulation mode of alsa.  Real alsa device names are
things like "hw:0,0", or virtual device names like "default".

2. The only way to set the card order is to load the drivers in the
desired order.  udev unfortunately has no control over which card
becomes "hw:0" vs "hw:1".

3. You can prevent udev from coldplugging drivers automatically by
aliasing the PCI ID of the hardware to "off".

For example, my ipw3945 wireless card will not work when coldplugged
by udev, so I have the following in /etc/modules.d/ipw3945:

alias pci:v8086d4222sv*sd*bc*sc*i* off
alias pci:v8086d4227sv*sd*bc*sc*i* off

This inhibits udev from loading the ipw3945 module when it scans the
PCI bus (ok, technically the pci device entries in /sys).

If you do something similar, adding alias entries to
/etc/modules.d/alsa, you should be able to have the modules loaded in
the correct order when the alsasound script runs.

You can get the list of pci aliases for a module with:

grep  /lib/modules/`uname -r`/modules.alias

Remember to run modules-update after making changes in /etc/modules.d/
for the changes to take effect.

HTH,
-Richard
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-27 Thread Daniel Barkalow
On Mon, 27 Nov 2006, Dave Jones wrote:

> Even worse is that udev seems to discover the sound cards in the reverse
> order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
> is /dev/dsp0.  

You should be able to force them to get the names you want with a couple 
of sufficiently specific udev rules. The whole point of udev is that this 
sort of policy is up to you, rather than being chosen by the system using 
black magic. Look at the manpage for udev and the rules in 
/etc/udev/rules.d/, and write rules for NAME="sound/dsp0" and 
NAME="sound/dsp1" which match the cards you want to have those names.

> Unfortunately,  Audacious, my music player of choice, doesn't seem to 
> offer any choice of which dsp to use.

Assuming you've emerged audacious-plugins the "alsa" USE flag, go to 
Audacious's preferences, Audio, and select "ALSA 1.2.2 output plugin" 
instead of "OSS Output Plugin", to actually use ALSA natively for it 
(which lets ALSA do software mixing, among other benefits).

In any case, under Audio, Output Plugin Preferences for either of these 
plugins will let you select a card arbitrarily.

-Daniel
*This .sig left intentionally blank*
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-27 Thread Jason Weisberger

Dave,

Alsasound init script does not require coldplug.  Remove coldplug, then
recompile your ALSA installation if it complains about it.  Don't forget to
etc-update or dispatch-conf to update the init scripts.  As far as them
loading in reverse order, see the gentoo-wiki for information on forcing
module loading with regard to multiple card setups:
http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29#Post-Installation_Configuration

On 11/28/06, Daniel Barkalow <[EMAIL PROTECTED]> wrote:


On Mon, 27 Nov 2006, Dave Jones wrote:

> Even worse is that udev seems to discover the sound cards in the reverse
> order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
> is /dev/dsp0.

You should be able to force them to get the names you want with a couple
of sufficiently specific udev rules. The whole point of udev is that this
sort of policy is up to you, rather than being chosen by the system using
black magic. Look at the manpage for udev and the rules in
/etc/udev/rules.d/, and write rules for NAME="sound/dsp0" and
NAME="sound/dsp1" which match the cards you want to have those names.

> Unfortunately,  Audacious, my music player of choice, doesn't seem to
> offer any choice of which dsp to use.

Assuming you've emerged audacious-plugins the "alsa" USE flag, go to
Audacious's preferences, Audio, and select "ALSA 1.2.2 output plugin"
instead of "OSS Output Plugin", to actually use ALSA natively for it
(which lets ALSA do software mixing, among other benefits).

In any case, under Audio, Output Plugin Preferences for either of these
plugins will let you select a card arbitrarily.

-Daniel
*This .sig left intentionally blank*
--
gentoo-user@gentoo.org mailing list





--
Jason Weisberger
[EMAIL PROTECTED]


Re: [gentoo-user] udev 103, alsa dual soundcard problem

2006-11-28 Thread Michael Schreckenbauer
Hi,

Am Montag, 27. November 2006 22:55 schrieb Dave Jones:
> Yesterday I upgraded udev to 103, but have hit some problems with alsa
> configuration of multiple sound cards.
> I have an 'on board' Intel 8x0 sound card which I use for VoIP
> telephony, and a PCI Creative Audigy which I use to play music.
> The Audigy is configured to alsa as sound card 0, while the Intel card
> is sound card 1.  This set up has worked perfectly for years.
> The udev 103 upgrade recommends removing coldplug. However, the alsa
> initialisation script (alsasound) depend on both coldplug and hotplug.
> If I remove coldplug from the boot runlevel alsasound fails, leaving
> only the Intel sound card initialised.
> Even worse is that udev seems to discover the sound cards in the reverse
> order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
> is /dev/dsp0.   Unfortunately,  Audacious, my music player of choice,
> doesn't seem to offer any choice of which dsp to use.
> To put it mildly, this is a major pain; I don't want to listen to music
> played through the VoIP headset connected to the Intel card.
> Is there any way I can persuade udev to generate the /dev entries for my
> sound cards in a particular order, so that Audacious can continue to
> work with /dev/dsp0?
> Thanks in advance for any help or advice you may be able to give.

I had this problem some time ago. The solution was to add

options snd-emu10k1 index=0
options snd-intel8x0 index=1

to /etc/modules.d/alsa 

run modules-update and restart alsa (or reboot) after that.

> Cheers, Dave

Regards,
Michael
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] udev 103, alsa dual soundcard problem [solved]

2006-11-28 Thread Dave Jones
Michael Schreckenbauer wrote on 28/11/06 15:44:
>> Yesterday I upgraded udev to 103, but have hit some problems with alsa
>> configuration of multiple sound cards.
>> Even worse is that udev seems to discover the sound cards in the reverse
>> order to coldplug.  My Audigy card becomes /dev/dsp1 and the Intel card
>> is /dev/dsp0.

> I had this problem some time ago. The solution was to add

> options snd-emu10k1 index=0
> options snd-intel8x0 index=1

> to /etc/modules.d/alsa 
> run modules-update and restart alsa (or reboot) after that.

Hi Michael, thanks, this fixed the problem.

Also thanks to everyone who responded to my question.  The answers
taught me how udev works, that's really useful,  can't be bad.

Cheers, Dave
-- 
gentoo-user@gentoo.org mailing list