Page 1 of 1

ALSA: Setting the default sound device

Posted: Fri Oct 19, 2018 9:15 pm
by handy
For those of us that don't use Pulseaudio for whatever reason, we may on occasion find that we don't get sound. Digging into why we don't get sound, we often find that the reason is that the wrong sound card is being chosen. Following is a simple & permanent fix to this problem:


If your system keeps on using the wrong device (HDMI instead of PCH or vica versa, or some other problem), then use one of the following two methods to identify the device's number & then instruct your system to use that number/device:

Run alsamixer - if you have it installed, just enter:

Code: Select all

alsamixer
at the terminal prompt.

In alsamixer hit the F6 function key, then you'll see the devices listed in a little box, with their numbers in front of them.

OR

Enter the following into a terminal:

Code: Select all

cat /proc/asound/cards

Choose the number of the sound device that you want to use.
Then using your text editor of choice, put the following into /etc/asound.conf (You will most likely have to create /etc/asound.conf ).

Code: Select all

defaults.pcm.card 1
defaults.ctl.card 1
Change the number from 1 to 0 , 2 or whatever?

Save the file & play a movie or listen to a tune.

I can imagine that if you had need to change between two sound devices from time to time, you could write a simple script that quickly swapped from one /etc/asound.conf file to another. All it would have to do is change/swap the file extensions from asound.conf.bak to asound.conf & visa versa when desired. ;)


The core information in this page came from the ALSA Project:

https://www.alsa-project.org/main/index.php/Main_Page

For those that need a fix for the same problem & they are running Pulseaudio, this page has a solution:

https://forum.manjaro.org/t/pulseaudio- ... vice/36562

Re: ALSA: Setting the default sound device

Posted: Fri Oct 19, 2018 9:30 pm
by Jerry3904
Have you looked at MX Select Sound, which puts this in GUI form?

Re: ALSA: Setting the default sound device

Posted: Fri Oct 19, 2018 11:30 pm
by KoO
@handy
Good information for those of us who don,t use pulseaudio...

Re: ALSA: Setting the default sound device

Posted: Fri Oct 19, 2018 11:51 pm
by handy
Jerry3904 wrote: Fri Oct 19, 2018 9:30 pm Have you looked at MX Select Sound, which puts this in GUI form?
Jerry I don't use the standard MX setup. So all of those GUI tools don't exist in the system that I use.

I know that there are a LOT of really cool & popular tools that both antiX & MX bring to the table for their respective communities. I'm just bit more CLI & config file oriented (though I'm not a terminal freek). ;)

Re: ALSA: Setting the default sound device

Posted: Fri Oct 19, 2018 11:52 pm
by handy
KoO wrote: Fri Oct 19, 2018 11:30 pm @handy
Good information for those of us who don,t use pulseaudio...
Thanks KoO. :)

Though, as jerry says, there looks to be a GUI way of doing this built into MX/(maybe antiX too?).

Re: ALSA: Setting the default sound device

Posted: Fri Oct 26, 2018 12:19 am
by KoO
------------------Set Default Sound Card AntiX--------------------

Terminal = antiX-cli-cc press enter > Audio/Visual menu > alsa-set-default-card > enter number (Use your arrow keys to move around)

antix Control Centre > Set Default Sound Card > pick your card > click ok

AlsaMixer > F6 or s > pick your card > exit (just to make sure the settings are saved after you pick your card run this command) = sudo alsactl store

Some sound card commands
aplay -l
aplay -L

For sound modules
cat /proc/asound/modules