Re: using a removable card as the default?

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

 



On Wed, 14 Feb 2007, Michael Lara wrote:

> Hello,
>
> Is it possible to define the removable card as the default in a system with
> a permanent, internal card and a removable (ie, USB) one? I know about
> passing 'index=i' to the driver modules, but I am having a hard time
> figuring out how to use that mechanism when one of the cards is removable. I
> would like to use the following simple rule:
>
> If the removable (usb) card is connected to the system, make it the default.
> Otherwise, use the internal card.
>
> The trouble is that, once the corresponding driver modules have been loaded
> with a given index number:
>
> /sbin/modprobe snd-usb-audio index=0 [for the removable card]
> /sbin/modprobe snd-intel8x0 index=1 [for the internal card]
>
> With this setup, aplay fails to produce sound when the removable card is not
> present since default is not set (there is no card with index 0).

Yup. What you could do is to set up a little hotplug script to change the
id of the onboard card ( or if your systems use /dev/dsp, put in the right
links)

>
> Can I somehow tell alsa (in /etc/asound.conf) that the card with the *lowest
> index* (ie, not necessarily the one with index=0) should be used as 'default'?

have your usb hotplug script unload both cards, and reload the onboard one
with index 0, and vice versa when you plug in the card.

>
> Thanks in advance for any help
>
> Michael
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux