LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to set default sound card in ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/how-to-set-default-sound-card-in-ubuntu-4175480799/)

arnold.kang 10-14-2013 10:48 PM

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

widget 10-15-2013 12:14 PM

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.

tommcd 10-15-2013 09:26 PM

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.

arnold.kang 10-15-2013 09:27 PM

aplay -l
 
Quote:

Originally Posted by widget (Post 5046239)
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


widget 10-15-2013 10:13 PM

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.

arnold.kang 10-18-2013 12:36 AM

thanks, but you know, maybe if know how to change the device name , all things will be more simple

widget 10-18-2013 04:04 PM

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.

Larry James 10-20-2013 06:18 PM

Quote:

Originally Posted by arnold.kang (Post 5045817)
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

arnold.kang 10-22-2013 09:13 AM

thanks you guys, i just a little busy thease days, sorry for i cann't replay promptly


All times are GMT -5. The time now is 10:45 AM.