[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alsa card activation order



On November 20, 2005 11:02 pm, Heimdall Midgard wrote:
> 2005/11/21, Stephen Cormier <s.cormier@gmx.net>:
> > On November 20, 2005 04:54 pm, Heimdall Midgard wrote:
> > > I can think of two ways to fix the problem. But I want to know
> > > the Debian Way(tm).
> > >
> > > My problem is simple. I have two sound "cards" in my computer.
> > > But I want my onboard sound to be the first sound card recognized
> > > by Alsa in both its /dev/dsp* (OSS emulation) and /dev/snd/pcm*
> > > (Alsa proper) incarnations.
> > >
> > > What files in /etc/ do I need to edit to set the card activation
> > > order of my two sound cards ?
> >
> > If using a 2.6 kernel then in the /etc/modprobe.d/ directory check
> > to see where the alias is set on my install it is the sound file.
> > Edit the file to look similar to this.
> >
> > alias snd-card-0 snd-via82xx
> > options snd-via82xx index=0
> >
> > alias snd-card-1 snd-emu10k1
> > options snd-emu10k1 index=1
> >
> > Changing the drivers to match your install putting the onboard
> > sound module in the lines with 0 in them and your pci card module
> > in the lines with 1. Now when booting modutils will process the
> > file and the drivers should be loaded in the correct order. If
> > using a 2.4 kernel then check in the /etc/modutils/aliases file and
> > see if that is where your sound card is being set. If so then add
> > the couple of lines for the second card and make sure your onboard
> > is set to the 0 then run update-modules to have the new information
> > entered in
> > the /etc/modules.conf for use on next boot if not then check the
> > other files to see where it is located and make the changes there.
>
> Thanks. Your approach seems more elegant than the solution I had in
> mind. But wouldn't any changes I make to, in my case,
> /etc/modprobe.d/alsa-base get in the way of a fresh alsa upgrade?

Yes they would because that file is provided by the alsa-base package 
and you should not be making your changes there.

> I know there's an option to have dpkg not overwrite any changed files
> in /etc. But that would mean I would miss installing any
> policy-mandated changes. 

Yes that is how it would end up working out.

>So I experimented with creating my own
> configuration file and  naming it /etc/modprobe.d/01_My_Module_Hacks:
>
> options         snd-via82xx index=0
> options         snd-ymfpci index=1

> I'm still not sure now where a Debian users is supposed to place
> special module parameters needed to make some kernel modules work
> properly. I'd surely like a pointer to any policy document. As it is
> my configuration looks more and more like a mish-mash of hacks that I
> have to check every time I upgrade.
>

Your experiment is the Debian way of doing it, any local options needing 
to be passed at boot should be put in a file in the /etc/modprobe.d 
directory (when running a 2.6 kernel). You will not have to check every 
time you upgrade as no package should be trying to write to a file it 
knows nothing about. I would guess that you have not run the alsaconf 
yet because the sound file I mentioned should have been created and 
already on your system so you could have put your changes in there and 
they would have been left alone until the next time you ran alsaconf. 

Stephen

-- 
Debian the choice of a GNU generation

GPG Public Key: http://users.eastlink.ca/~stephencormier/publickey.asc

Attachment: pgp36iBgANJG6.pgp
Description: PGP signature


Reply to: