You are not logged in.
Hello I am having a problem that ALSA uses the wrong soundcard, does alsa-utils or any others package provide a tool which I can make ALSA use the right soundcard?
Use the Source, Luke!
Offline
try this:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 48000 #many new cards are 48000 only
}
bindings {
0 0
1 1
}
hint {
show on
description "Onboard Soundcard"
}
}
ctl.dmixer {
type hw
card 0
}
change hw:0,0 to your sound device
Offline
I used to use alsaconf, the wiki says it can cause conflicts with udev if you have a pci card though.
Offline
Load your sound drivers in the required order in rc.conf MODULES - the alsa default card will be the one that is loaded first.
Offline
I spent weeks trying to find the best solution to this problem, and it's very simple.
Just put this in your .asoundrc:
defaults.pcm.card 0
defaults.ctl.card 0
Change the number to whatever you want, and you can find them out with "aplay -l". And only use numbers.
Using this method, you can change the default sound card on a per-user basis, after boot time, without having to edit anything as root.
I wrote a script that can do it for you, and handles volume control too:
#!/bin/sh
config=~/.asoundrc
choose () {
echo Choose a card:
aplay -l
read card
echo Choose a control:
amixer -c $card scontrols
read control
echo "#" $control > $config
echo defaults.pcm.card $card >> $config
echo defaults.ctl.card $card >> $config
}
control=(`cat .asoundrc`)
control=${control[1]}
case $1 in
up) amixer -q set $control 5%+ ;;
down) amixer -q set $control 5%- ;;
mute) amixer -q set $control toggle ;;
*) choose ;;
esac
Last edited by Odysseus (2009-04-28 20:58:47)
I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.
Offline
I added sound drivers in rc.conf modules as tomk suggested and so far so good.Seems the easiest method to me.
I was having problems due to dvb-s card and pci sound card.
Cheers tomk
Last edited by jazz452 (2009-06-05 14:56:50)
Offline