You are not logged in.

#1 2013-01-22 11:23:08

tanrax
Member
Registered: 2012-08-11
Posts: 31

[SOLVED]Order soundcards.

File ". Asound" I have configured to work with the card 0. And it works.

Here's the order.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: DG [Xonar DG], device 0: Multichannel [Multichannel]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: DG [Xonar DG], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Intel [HDA Intel], device 0: ALC1200 Analog [ALC1200 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Intel [HDA Intel], device 1: ALC1200 Digital [ALC1200 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

But my problem is this: every time you start changing the order. Sometimes the card becomes 2 and other in 1. And of course, does not function in these cases. Play sound is like rolling the dice. That will never order.

How I can force that is always the order that I described above?

Thank you very much in advance.

Last edited by tanrax (2013-01-23 10:45:38)

Offline

#2 2013-01-22 12:04:19

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,219
Website

Re: [SOLVED]Order soundcards.

Use the device names rather than numbers as described in the alsa wiki page on the arch wiki, or more details on wiki.alsa-project.org.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-01-22 14:15:21

digirium
Member
Registered: 2012-11-15
Posts: 51

Re: [SOLVED]Order soundcards.

You might also do something like create a shell script that runs from ~/.xinitrc that creates ~/.asoundrc.

For example:

#!/bin/bash

card=$(aplay -l | awk '/ALC1200 Analog/ { print $2 }' | sed 's/://')

cat <<-EOF >$HOME/.asoundrc
defaults.pcm.card $card
defaults.pcm.device 0
defaults.ctl.card $card
EOF

exit 0

Offline

#4 2013-01-22 19:05:00

ArtSu
Member
Registered: 2010-04-18
Posts: 3

Re: [SOLVED]Order soundcards.

Read =https://wiki.archlinux.org/index.php/Alsa
topic Set the default sound card

Offline

#5 2013-01-23 10:44:27

tanrax
Member
Registered: 2012-08-11
Posts: 31

Re: [SOLVED]Order soundcards.

I think I've gotten scared, because now you do not change the order big_smile. If I go back, I will follow your wonderful advice. Thank you all.

Offline

Board footer

Powered by FluxBB