LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Changing Default Audio Device - I have 2 sound cards (http://www.linuxquestions.org/questions/linux-general-1/changing-default-audio-device-i-have-2-sound-cards-607050/)

Virtuality 12-15-2007 09:25 PM

Changing Default Audio Device - I have 2 sound cards
 
Hi,

I have my headphones in one sound card and 5.1 speakers in the other.

When I run :

Code:

speaker-test -Dplug:surround51 -c6 -twav
It comes through the headphones (onboard sound card).

I want it to come through my speakers but I don't know how to make it.

Same with totem-xine; it plays through onboard and not my one with speakers in it.

Where do I change this?

XMMS plays through speakers because it has the option to change the device.

Also even if the test succeeds how do I make XMMS use 5.1 sound?

Virtuality 12-15-2007 09:34 PM

Well I figured out 5.1 sound, you just make a file on your home directory called '.asoundrc' with:

(I did NOT write this myself, it's from ubuntu forums)

Code:

pcm.dmix51 {
        type dmix
        ipc_key 1024
        ipc_key_add_uid false
        ipc_perm 0666
        slave {
                pcm "hw:1,0"
                channels 6
                period_time 0
                period_size 1024
                buffer_size 8192
                rate 44100
        }
}

ctl.dmix51 {
        type hw
        card 1
}

pcm.stereo {
        type plug
        slave.pcm "dmix51"
        ttable.0.0 1
        ttable.1.1 1
}

pcm.!default {
        type route
        slave.pcm "dmix51"
        slave.channels 6
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1
        ttable.0.4 1
        ttable.1.4 1
        ttable.0.5 1
        ttable.1.5 1
}

pcm.duplicate {
        type plug
        slave.pcm "dmix51"
        slave.channels 6
        route_policy duplicate
}

Then go to XMMS, click plugins and hit CTRL+P just before you select alsa mixer and it works.



But how do I change the default device totem uses?




To think, I don't even have a proper driver for this sound card yet it sounds better than it does on windows...

kzutter 12-15-2007 10:28 PM

I have 2 sound cards, one built-in on my MB and one PCI card.
I only wanted to use the PCI card one, so I disabled the onboard sound in my MB's BIOS.

Unless you need both cards running, this maybe a solution for you, too.


All times are GMT -5. The time now is 05:00 PM.