[alsa-devel] Changing default card using its name

Pavel Hofman pavel.hofman at ivitera.com
Sun Nov 21 22:10:08 CET 2010


Hi,

Please excuse my ignorance but I have not been able to figure out this 
simple task. Nowadays most PCs have multiple soundcards (onboard plus 
HDMI, often another PCI card). Order of the cards is not stable. How do 
I define in /etc/asound.conf another default card using its name and 
keep the PCMs defined by its corresponding alsa card/pcm config files?

In my case aplay -L:
null
     Discard all samples (playback) or generate zero samples (capture)
front:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     Front speakers
surround40:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
     HDA Intel, STAC92xx Analog
     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia
     HDA NVidia, NVIDIA HDMI
     HDMI Audio Output
front:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI DAC/ADC
     Front speakers
rear:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     Rear speakers
surround40:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     4.0 Surround output to Front and Rear speakers
surround41:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI 2nd DAC
     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CMI8768,DEV=0
     C-Media CMI8768, C-Media PCI DAC/ADC
     IEC958 (S/PDIF) Digital Audio Output

Is it actually possible to have iec958:CARD=CMI8768,DEV=0 as the 
system-wide device iec958? I have not been successful with

defaults.ctl.card "CMI8768"

which IMO would have been the simplest solution.

Thanks a lot for help.

Regards,


Pavel Hofman.




More information about the Alsa-devel mailing list