Manjaro Difference between revisions of "ALSA"

Difference between revisions of "ALSA"

From Manjaro
(added languages and translate tags)
(Improve translation tags.)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
__TOC__
__TOC__
<languages/>
<translate>
<translate>
==Overview==
==Overview== <!--T:1-->
The [https://www.alsa-project.org/wiki/Main_Page Advanced Linux Sound Architecture (ALSA)] provides audio and MIDI functionality to the Linux operating system.  
The [https://www.alsa-project.org/wiki/Main_Page Advanced Linux Sound Architecture (ALSA)] provides audio and MIDI functionality to the Linux operating system.  


==Use ALSA on with Applications requiring PulseAudio==
==Use ALSA on with Applications requiring PulseAudio== <!--T:2-->
Using applications which require PuleAudio on systems which only have ALSA installed can be accomplished through the use of '''apulse''' which is a pulse emulator for ALSA.
Using applications which require PuleAudio on systems which only have ALSA installed can be accomplished through the use of '''apulse''' which is a pulse emulator for ALSA.


===Install apulse===
===Install apulse=== <!--T:3-->
Install '''apulse''' from the [[Arch_User_Repository|AUR]] using a your preferred package manager or the command:
Install '''apulse''' from the [[Arch_User_Repository|AUR]] using a your preferred package manager or the command:
{{UserCmd|command=pamac build apulse}}
{{UserCmd|command=pamac build apulse}}


<!--T:4-->
It is built from source so it may take some time to install.  Once it is done, create a basic config file using the command:
It is built from source so it may take some time to install.  Once it is done, create a basic config file using the command:
{{UserCmd|command=cp /usr/share/apulse/asoundrc.sample ~/.asoundrc}}
{{UserCmd|command=cp /usr/share/apulse/asoundrc.sample ~/.asoundrc}}


===Using apulse===
===Using apulse=== <!--T:5-->
Using apulse is a simple typing '''apulse <program>''' in a terminal.  For example:
Using apulse is a simple typing '''apulse <program>''' in a terminal.  For example:
{{UserCmd|command=apulse /usr/lib/firefox/firefox}}
{{UserCmd|command=apulse /usr/lib/firefox/firefox}}


<!--T:6-->
If all is working, you should now have sound in Firefox without needing pulseaudio
If all is working, you should now have sound in Firefox without needing pulseaudio


==Selecting the Primary Audio Device==
==Selecting the Primary Audio Device== <!--T:7-->
If your system keeps on using the wrong device (HDMI instead of PCH or vica versa for example), you can force ALSA to use the correct device.  Start by getting a list of your audio devices with the command:
If your system keeps on using the wrong device (HDMI instead of PCH or vica versa for example), you can force ALSA to use the correct device.  Start by getting a list of your audio devices with the command:
{{UserCmd|command=cat /proc/asound/cards}}
{{UserCmd|command=cat /proc/asound/cards}}


Note the number of the sound device that you want to make the primary. Then using a [[Viewing_and_editing_configuration_files|text editor]], put the following into '''/etc/asound.conf''' (You may need to create '''/etc/asound.conf''' if it doesn't already exist).
<!--T:8-->
Note the number of the sound device that you want to make the primary. Then using a [[Viewing_and_editing_configuration_files|text editor]], put the following into '''/etc/asound.conf''' (You may need to create '''/etc/asound.conf''' if it doesn't already exist).</translate>
{{UserCmd|command=sudo nano /etc/asound.conf}}
{{UserCmd|command=sudo nano /etc/asound.conf}}


<!--T:9-->
{{File||file=/etc/asound.conf|
{{File||file=/etc/asound.conf|
content=<pre>defaults.pcm.card 1
content=<pre>defaults.pcm.card 1
defaults.ctl.card 1</pre>}}
defaults.ctl.card 1</pre>}}
 
<translate>
<!--T:10-->
Replace 1 in the above example with the number you noted down above.
Replace 1 in the above example with the number you noted down above.


==See also==
==See also== <!--T:11-->
* [https://github.com/i-rinat/apulse The official apulse site]
* [https://github.com/i-rinat/apulse The official apulse site]
* [https://forum.manjaro.org/t/how-to-run-pulseaudio-only-apps-on-an-alsa-only-system/34235 apulse Forum Topic]
* [https://forum.manjaro.org/t/how-to-run-pulseaudio-only-apps-on-an-alsa-only-system/34235 apulse Forum Topic]
 
</translate>
[[Category:Contents Page{{#translation:}}]]
[[Category:Contents Page{{#translation:}}]]
[[Category:Audio{{#translation:}}]]
[[Category:Audio{{#translation:}}]]
</translate>

Latest revision as of 12:13, 22 May 2024

Other languages:
English • ‎Türkçe • ‎русский • ‎فارسی

Overview

The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.

Use ALSA on with Applications requiring PulseAudio

Using applications which require PuleAudio on systems which only have ALSA installed can be accomplished through the use of apulse which is a pulse emulator for ALSA.

Install apulse

Install apulse from the AUR using a your preferred package manager or the command:

user $ pamac build apulse COPY TO CLIPBOARD


It is built from source so it may take some time to install. Once it is done, create a basic config file using the command:

user $ cp /usr/share/apulse/asoundrc.sample ~/.asoundrc COPY TO CLIPBOARD


Using apulse

Using apulse is a simple typing apulse <program> in a terminal. For example:

user $ apulse /usr/lib/firefox/firefox COPY TO CLIPBOARD


If all is working, you should now have sound in Firefox without needing pulseaudio

Selecting the Primary Audio Device

If your system keeps on using the wrong device (HDMI instead of PCH or vica versa for example), you can force ALSA to use the correct device. Start by getting a list of your audio devices with the command:

user $ cat /proc/asound/cards COPY TO CLIPBOARD


Note the number of the sound device that you want to make the primary. Then using a text editor, put the following into /etc/asound.conf (You may need to create /etc/asound.conf if it doesn't already exist).

user $ sudo nano /etc/asound.conf COPY TO CLIPBOARD


/etc/asound.conf
defaults.pcm.card 1
defaults.ctl.card 1

Replace 1 in the above example with the number you noted down above.

See also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.