LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-21-2005, 11:13 AM   #1
TVH
LQ Newbie
 
Registered: Nov 2004
Posts: 5

Rep: Reputation: 0
How to choose default sound card?


Hello

I have 3 sound cards, how do I select which one is the default one?

Distro is mandrake 10.1
 
Old 05-22-2005, 01:11 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
I dont know about Mandrake ( you are somewhat in the wrong part of the forum, but PLEASE don't double post), but usually the default card is the one "linked" to /dev/dsp and the default mixer is the one linked to /dev/mixer. So, on my system (I have 2 sound card).
this is my output of ls -l /dev/dsp* :
lrwxrwxrwx 1 root root 9 May 22 12:57 /dev/dsp -> /dev/sound/dsp1
( /dev/mixer is about the same ) :
lrwxrwxrwx 1 root root 17 May 22 14:12 mixer -> /dev/sound/mixer1


It depends on your distro, but usually just relinking the /dev/dsp link and /dev/mixer to other devices will tell your system to use another soundcard. Like, in my case, if I would like to use my second (it is first in fact, "1" mean the second) soundcard :
ln -sf /dev/sound/dsp /dev/dsp
ln -sf /dev/sound/mixer /dev/mixer

This will tell "ALSA" to use the first sound card as default one. Then you might want to ajust Artsd (Kde sound server) or whatever you are using (most modern distro don't use Alsa directly), there is always a cute wizy-wizard thingy to do that (in kde, it is located in Control Center/Sound System. Dont know about Gnome but it shouldn't be hard to find).
 
Old 05-24-2005, 06:08 AM   #3
Cyborg16
LQ Newbie
 
Registered: Feb 2005
Distribution: Debian "Sarge" testing
Posts: 19

Rep: Reputation: 0
Well, on my system /dev/dsp and /dev/mixer aren't links (debian testing). I've got around the problem by blacklisting the driver I don't want to use (because otherwise that -- the onboard sound (snd_intel8x0) -- is the default). I just removed the blacklisting and restarted, and my sound card (snd_emu10k1) wasn't loaded; I got a probing error in dmesg. The module was loaded but no extra device was created (rmmod then modprobe didn't help, but rmmod both drivers then modprobe with emu10k1 first did create both). I guess the error on startup could be due to driver bugs, but any idea how to make dsp and mixer links rather than devices, or load the drivers in the other order? I'm using a self-built 2.6.8 kernel btw, which I will upgrade at some point.
 
Old 05-24-2005, 07:32 PM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Add the index value for each sound card in /etc/modules.conf or /etc/modprobe.conf. An index value of 0 will be the first card and index value of 1 will be the second card.

Lets say we have an intel on-board sound, Audiotrak Prodigy 7.1, and Turtlebeach Santa Cruz. We want the Turtlebeach Santa Cruz to be first card istead of second, the Audiotrak Prodigy 7.1 to be the second card instead third, and intel on-board sound to be the third sound card instead first. The code below is an example with out opening up the computer and moving the cards or changing symbolic links.

# ALSA and OSS
alias char-major-116 snd
alias char-major-14 soundcore

# Turtlebeach Santa Cruz
alias snd-card-0 snd-cs46xx
options snd-cs46xx index=0

# Audiotrak Prodigy 7.1
alias snd-card-1 snd-ice1724
options snd-ice1724 index=1

# intel on-board sound
alias snd-card-2 snd-intel8x0
options snd-intel8x0 index=2

# OSS emulation naming
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
alias sound-slot-2 snd-card-2

# Card 1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

# Card 2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss

# Card 3
alias sound-service-2-0 snd-mixer-oss
alias sound-service-2-1 snd-seq-oss
alias sound-service-2-3 snd-pcm-oss
alias sound-service-2-8 snd-seq-oss
alias sound-service-2-12 snd-pcm-oss

Phew! All you need to do is to restart the alsa script. To do that, login as su or root and type service alsa restart. The default sound device can be change in program's preferences.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
specify default sound card joelescoulie Slackware 2 07-12-2005 03:43 PM
Default sound card Wakeboardbum83 Suse/Novell 3 03-24-2005 12:13 PM
how to choose default sound card kxlx Linux - Newbie 2 01-18-2005 08:27 AM
Make a sound card default. darkarcon2015 Slackware 9 01-07-2005 05:13 PM
Two sound devices, both installed, choose default in Mandrake 9.2? khermans Linux - Software 1 11-16-2003 08:38 AM


All times are GMT -5. The time now is 05:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration