• 1 reply
  • Latest Post - ‏2012-03-23T18:25:24Z by SystemAdmin
1 Post

Pinned topic Alsa : How to have a persistent device ordering when multiple cards ?

‏2012-02-10T05:23:12Z |
Hi ,
I want persistent order when multiple cards are installed .On every reboot the order changes.I have two McAsp (Multi channel Audio Serial port and USB audio device).So sometime card 2 is assigned to USB but on some other reboot card 1 is assigned to the USB.So i want card 2 to be permenanetly assigned to USB .
I know it happens due to udev because udev do not load the modules in the same order.

I have built alsa statically in my kernel

I want the solution based on some udev rules file for alsa

So if anybody have the solution please help ?
Updated on 2012-03-23T18:25:24Z at 2012-03-23T18:25:24Z by SystemAdmin
  • SystemAdmin
    2364 Posts

    Re: Alsa : How to have a persistent device ordering when multiple cards ?

    It seems that you have a few approaches to dealing with addressing ALSA devices.

    The default order is determined by the order in which the modules load. If you control that order, then the numbering should be consistent. There are various ways for controlling the load order. The best is probably to create UDEV rules. Here is a HOWTO that provides plenty of detail on that. A dirtier approach I've seen is to blacklist the modules in question using files in /etc/modprobe.d and then add them in the order you want using /etc/modules.

    You can also exert some control over the devices by writing your own .asoundrc. In this you can actually give the devices your own names and call them that way rather than the device order. You can see details on that in this HOWTO.