https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=Hhaouari&feedformat=atomAlpine Linux - User contributions [en]2024-03-28T15:14:33ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=ALSA&diff=17239ALSA2020-04-21T14:27:23Z<p>Hhaouari: use addgroup instead of usermod since it's installed by default</p>
<hr />
<div>{{Move|ALSA|More specific. Indicates that this is the alsa-utils method of configuring sound.}}<br />
<br />
First you will need to install Alsa packages, the Linux sound driver and volume adjuster.<br />
<br />
# apk add alsa-utils alsa-utils-doc alsa-lib alsaconf<br />
<br />
Then you will need to add all your users (including root) to the <code>audio</code> group.<br />
<br />
# addgroup $USER audio<br />
# addgroup root audio<br />
<br />
Find the default sound card.<br />
<br />
# alsamixer<br />
<br />
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, ...)<br />
<br />
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).<br />
<br />
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.<br />
<br />
# nano /usr/share/alsa/alsa.conf<br />
<br />
Scroll down until you find the lines that start with <code>defaults.ctl.card</code> and <code>defaults.pcm.card</code> 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".<br />
<br />
<code>defaults.ctl.card 1</code><br />
<code>defaults.pcm.card 1</code><br />
<br />
Save your nano work by pressing ''Ctrl+O'' and confirm the changes by pressing ''Enter''. Then exit nano by pressing ''Ctrl+X''.<br />
<br />
Try turning up the volume of Master and the device(s) such as speakers or microphones that you need with the <code>alsamixer</code> command, and audio should work.<br />
<br />
Alsa service is not started on install, you need to start it and to add it on rc.<br />
rc-service alsa start<br />
rc-update add alsa<br />
<br />
Gstreamer can now catch the device and the audio mixer is working.<br />
<br />
[[Category:Installation]]<br />
[[Category:Desktop]]<br />
[[Category:Multimedia]]</div>Hhaouari