LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-14-2013, 10:48 PM   #1
arnold.kang
LQ Newbie
 
Registered: Mar 2013
Location: Chengdu.China
Distribution: fedora
Posts: 29

Rep: Reputation: Disabled
how to set default sound card in ubuntu


hi all,
i just have two card in my PC, but the default is HDMI, i just want to set another as default. and i know i should edit the alsa_base.conf. but the problem is thease card have the same name!
Code:
cat /proc/asound/modules 
 0 snd_hda_intel
 1 snd_hda_intel
how can i change the name , and set the default sound card. thanks
 
Old 10-15-2013, 12:14 PM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
This is a nice question. Just installed a new card myself. Only have one card but it shows as 2 because of the hdmi capability. So I run into the same problem.

Please post output of;
Code:
aplay -l
This should tell us the cards you are using.
 
Old 10-15-2013, 09:26 PM   #3
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
You should be able to set the default sound card for the current session by running alsamixer, then hit F6 to select the default sound card: http://askubuntu.com/questions/15085...card-with-alsa
If you get permissions problems the use sudo before alsamixer, but I don't think this would be necessary.
Here is an option to permanently set the default sound card by editing the file etc/modprobe.d/alsa-base.conf
http://robertbeal.com/644/change-the...-ubuntu-karmic
Be sure to back up that configuration file before editing it just to be safe.

Last edited by tommcd; 10-15-2013 at 09:27 PM.
 
Old 10-15-2013, 09:27 PM   #4
arnold.kang
LQ Newbie
 
Registered: Mar 2013
Location: Chengdu.China
Distribution: fedora
Posts: 29

Original Poster
Rep: Reputation: Disabled
aplay -l

Quote:
Originally Posted by widget View Post
This is a nice question. Just installed a new card myself. Only have one card but it shows as 2 because of the hdmi capability. So I run into the same problem.

Please post output of;
Code:
aplay -l
This should tell us the cards you are using.
here's the result:
Code:
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 
Old 10-15-2013, 10:13 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Well now you know that you want the "ALC269VC Analog" so you should see that listed on the Alsa Mixer so you can select it.

In my case, with a completely different situation this doesn't work however. If it doesn't in yours I would create a ~/.asoundrc file with contents;
Code:
pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw           
    card 1
}
I have to edit mine occasionally. This is because, at random, when I reboot the system the designation of the devices will reverse and I have to change 1 to 0 or 0 to 1.

I don't think this should be needed in your case. Both options are offered by an integrated device. In my case there is confusion about the hdmi offered by my Radeon card and sound offered by my Audigy card.
 
Old 10-18-2013, 12:36 AM   #6
arnold.kang
LQ Newbie
 
Registered: Mar 2013
Location: Chengdu.China
Distribution: fedora
Posts: 29

Original Poster
Rep: Reputation: Disabled
thanks, but you know, maybe if know how to change the device name , all things will be more simple
 
Old 10-18-2013, 04:04 PM   #7
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Changing the device name would be a bit tough.

If you run,
Code:
lspci
You will get a list (ls) of your pci devices. These are determined by the information in the individual devices that is provided to the bios of your box. Changing that is going to be difficult.

In your case you are working with one device that has 2 functions. They are, sensibly, both indicated in the information provided by that device to the bios. This is needed so that the functions can be controlled separately.

Bios is the interface between your computer and your OS.

While I am confident that changing the names of the "devices" is technically possible it is certainly beyond me. You could mess with the code in the OS and get the name to be different. You are not, by doing that, going to change the information on the device or what bios is seeing. Would probably simply result in no function of the device at all. Changing how the chip identifies itself is a complete mystery to me but would think anyone that had the knowledge and the tools to change it would not be asking on here. That is also the case with the bios.
 
Old 10-20-2013, 06:18 PM   #8
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Rep: Reputation: 40
Quote:
Originally Posted by arnold.kang View Post
hi all,
i just have two card in my PC, but the default is HDMI, i just want to set another as default. and i know i should edit the alsa_base.conf. but the problem is thease card have the same name!
Code:
cat /proc/asound/modules 
 0 snd_hda_intel
 1 snd_hda_intel
how can i change the name , and set the default sound card. thanks
What do you get if you run:

Code:
(Click) (The Speaker Icon on the Indicator bar)
> (Click) Sound Settings 
> (Select) (The Device you want to use) 
> (You can then run the test to see which sound card is activated.) (Click) Test Sound
-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 10-22-2013, 09:13 AM   #9
arnold.kang
LQ Newbie
 
Registered: Mar 2013
Location: Chengdu.China
Distribution: fedora
Posts: 29

Original Poster
Rep: Reputation: Disabled
thanks you guys, i just a little busy thease days, sorry for i cann't replay promptly
 
  


Reply

Tags
alsa, sound card, ubuntu



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
Linux and ALSA default sound card, two methods fail to set firefox/chrome sound. jon_k Linux - Hardware 2 10-03-2013 07:09 AM
Default Sound Card In Ubuntu alan.me Linux - Hardware 7 09-25-2012 10:47 PM
change detected default sound card in ubuntu 10.10 linuxhippy Ubuntu 2 01-22-2011 09:29 PM
[SOLVED] Set default sound card ursusca Gentoo 2 03-22-2010 03:55 PM
how do you change the default sound card in (K)ubuntu? the1wraith Ubuntu 13 07-28-2009 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:59 AM.

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
Open Source Consulting | Domain Registration