mayfrost-guides/AUDIO.md

1.8 KiB

AUDIO

PURE ALSA

Here is how to get sound on a minimal install without the insanity of pulseaudio:

  1. Erase .asoundrc in your home directory and asound.conf in /etc.

  2. Purge pulseaudio. And when I mean purge, I mean it.

  3. Identify your available devices in /proc/asound/modules, do:
    $ cat /proc/asound/modules

Here is an example of what you will see in /proc/asound/modules:

0 snd_usb_audio
1 snd_hda_intel  
  1. Select from the above and put them in the order you want in the file /etc/modprobe.d/alsa-base.conf, by assigning an index from -2 to 2, marking the preferred device as the lowest number.

As an example if you have two devices and want the one that says usb because that is your headphone, on /etc/modprobe.d/alsa-base.conf you will put:

options snd_usb_audio enable=1 index=0
options snd_hda_intel index=1  

Notice the index.

  1. Restart the computer.

Run Firefox without pulseaudio

  1. Install apulse.
  • Install "cmake", "libasound2-dev" and "libglib2.0-dev" with your package manager.
  • Download "apulse":
    git clone --depth 1 --single-branch https://github.com/i-rinat/apulse.git
  • Change to that directory:
    cd apulse/src
  • Build:
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
$ make
# sudo make install
  1. On Firefox open about:config and enter "/dev/snd/" under security.sandbox.content.read_path_whitelist and security.sandbox.content.write_path_whitelist;/dev/snd/, IF they exist.

  2. Every time you want to use firefox with this setting issue the command:
    $ apulse firefox
    Alternatively save "apulse firefox" in a script or in a .desktop file for automation.