LinuxQuestions.org
Visit Jeremy's Blog.
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 04-08-2013, 12:28 PM   #1
jamie marchant
LQ Newbie
 
Registered: Nov 2012
Distribution: Fedora 18(64-bit)
Posts: 19

Rep: Reputation: Disabled
Angry Set "defualt" sound card by name.


I have a sound card on my vidio card(only accasable through HMDMI), I also have an onboard VIA souncard(not sure, whats it's calleb but ALSA thinks it's a HDA ATI SB). For some reason I have a bug that sometimes when I boot up the sound card that is #1 is switched(so that all programs try and use the HDMI instead of the onboard). Is there a way to tell ALSA to use my "HDA ATI SB" instead of whatever sound card is #1? Thanks
 
Old 04-08-2013, 01:33 PM   #2
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,219

Rep: Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821
You need to edit your profile to show which distro you use: this is a typical question that depends on that.

Most good distros (Mint, Fuduntu, Fedora, OpenSUSE) have a sound configuration tool:
If there's a speaker icon on the panel, try right clicking on it.
Look in the system, configuration, or preferences section of the menu for sound or volume.
If there's a general configuration tool, run it and look for sound, media, or hardware.
(Beware of the KDE tool, though: that only configures KDE applications, not things like Firefox.)

If you don't have one,
First, find the names of the sound devices with "aplay -l". So I get
**** List of PLAYBACK Hardware Devices ****
card 0: Device [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

Then find the names of the sound modules in the kernel with "cat /proc/asound/modules". I get
$ snd_cmipci
$ snd_usb_audio

To configure, one or other of the following will work.

Method 1 (e.g. Arch)
Create ~/.asoundrc to contain (with appropriate entries) something like the following, then log out and in again:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

Method 2 (e.g. Debian and its derivatives)
Look in /etc/modprobe.d/ for something like alsa-base.conf or alsa.conf
Edit it, setting the index for the module you want to 1
options snd_usb_audio index=1
and that for the one you don't want to -2
options snd_cmipci index=-2
Then reboot.

Last edited by DavidMcCann; 04-08-2013 at 01:34 PM.
 
Old 04-08-2013, 01:51 PM   #3
jamie marchant
LQ Newbie
 
Registered: Nov 2012
Distribution: Fedora 18(64-bit)
Posts: 19

Original Poster
Rep: Reputation: Disabled
I am running Fedora 18(64-bit) XFCE spin. There is no "sound" control pannel sadly. I can't use those numbers due to a bug where they randomly change boot to boot. See my bug report here. Whatever Skype(problly OSS) uses has no problems with my soundcards.
 
Old 04-09-2013, 11:46 AM   #4
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,219

Rep: Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821
That's why I always say "use the distro with its default GUI". But there may be a solution. If you only want to use the one sound device, you can blacklist the module for the other in /etc/modprobe.d/blacklist.conf with a line like
blacklist snd_cmipci
I can't guarantee that this will stop it being numbered, but it's worth a try.
 
Old 04-09-2013, 02:55 PM   #5
jamie marchant
LQ Newbie
 
Registered: Nov 2012
Distribution: Fedora 18(64-bit)
Posts: 19

Original Poster
Rep: Reputation: Disabled
Smile

It worked! Thanks for your help!
 
Old 04-11-2013, 07:15 PM   #6
jamie marchant
LQ Newbie
 
Registered: Nov 2012
Distribution: Fedora 18(64-bit)
Posts: 19

Original Poster
Rep: Reputation: Disabled
Darn, problem is back again, this time my sound card and the mic in my webcame are getting mixed up. I want the webcame mic attached for quick Skype calls, so I can't blacklist it. Skype works beacuase it uses the device name, I will do some research and if I can figure out how to address the card by name instead of number.

UPDATE: I think I fixed it, this page explains what to do:
http://alsa.opensrc.org/FAQ042

UPDATE #2: for anyone reading this you need addintal aurguments(which I don't know) in the /etc/modprobe.conf(or eqvulent) file if you have sorround sound, what I did is numbered my other device, so that the sound card will allways be 0.

UPDATE #3: I just noticed my USB mic is no longer present, darn it seems I will have too look into this some more.

FINAL UPDATE: I should point out the /etc/modprobe.conf is /etc/modeprode.conf/local in fedora, also setting the USB mic in my webcame too 2 fixed the issue.

Also like the artical says some systems use a diffrent file for these oporationts.

Last edited by jamie marchant; 04-20-2013 at 07:33 PM.
 
Old 05-22-2013, 02:16 PM   #7
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,146

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
see here: https://wiki.archlinux.org/index.php...ult_sound_card
there is a feature to fix the order of the devices (index). I'm not really sure about that, but hope...
 
  


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
How to set the font-size for "xterm" terminal-emulator (running "bash" shell) ajaygarg Linux - Desktop 1 03-09-2012 01:38 PM
Total noob having sound card issues. "Unknown device" Furious J Linux - Newbie 3 04-02-2007 11:44 AM
Sound Card not working on "IBM A51 8123-Q2W" pradipta12345 Linux - Hardware 3 05-08-2006 06:29 AM
Suse 10 Laptop Sound Card "No Device Found/No Pipeline" Balarabay1 Suse/Novell 1 03-14-2006 08:18 PM
"C-Media Sound card problem in RedHat 9 with 2.4.20-8 kernel" dmef Linux - Hardware 0 03-21-2004 01:43 AM


All times are GMT -5. The time now is 02:08 PM.

Main Menu
Advertisement
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