ALSA: Difference between revisions
Erazemkokot (talk | contribs) (Use the usermod command instead of manually editing the /etc/group file.) |
m (use addgroup instead of usermod since it's installed by default) |
||
Line 7: | Line 7: | ||
Then you will need to add all your users (including root) to the <code>audio</code> group. | Then you will need to add all your users (including root) to the <code>audio</code> group. | ||
# | # addgroup $USER audio | ||
# | # addgroup root audio | ||
Find the default sound card. | Find the default sound card. |
Revision as of 14:27, 21 April 2020
This page is proposed for moving ... It should be renamed to ALSA. More specific. Indicates that this is the alsa-utils method of configuring sound. (Discuss) |
First you will need to install Alsa packages, the Linux sound driver and volume adjuster.
# apk add alsa-utils alsa-utils-doc alsa-lib alsaconf
Then you will need to add all your users (including root) to the audio
group.
# addgroup $USER audio # addgroup root audio
Find the default sound card.
# alsamixer
The default sound card will show up. Try turning up the volume of Master and the device(s) such as speakers or microphones that you need, and audio should work (F1 - help, M - toggle mute, ...)
If there are no volume controls visible, try hitting F6 on your keyboard and toggling between the sound cards (which all might have the same name in the context menu that pops up except for the numbers next to and before the names).
Once you've found the sound card name that gives you volume controls, set the unique number that showed up in the F6 context menu as your default soundcard.
# nano /usr/share/alsa/alsa.conf
Scroll down until you find the lines that start with defaults.ctl.card
and defaults.pcm.card
and put the number (you found in the F6 context menu of the alsamixer command for the soundcard you want as your default) at the end of those lines separated by a space for each. For example, if the default sound card you want is "1".
defaults.ctl.card 1
defaults.pcm.card 1
Save your nano work by pressing Ctrl+O and confirm the changes by pressing Enter. Then exit nano by pressing Ctrl+X.
Try turning up the volume of Master and the device(s) such as speakers or microphones that you need with the alsamixer
command, and audio should work.
Alsa service is not started on install, you need to start it and to add it on rc.
rc-service alsa start rc-update add alsa
Gstreamer can now catch the device and the audio mixer is working.