mayfrost-guides/AUDIO.md

53 lines
1.7 KiB
Markdown
Raw Normal View History

2018-05-29 03:00:12 +00:00
# AUDIO
## PURE ALSA
Here is how to get sound on a minimal install without the insanity of pulseaudio:
2018-05-29 03:10:24 +00:00
1. Erase __.asoundrc__ in your home directory and __asound.conf__ in __/etc__.
2018-05-29 03:00:12 +00:00
2018-05-29 03:02:27 +00:00
2. Purge pulseaudio. And when I mean purge, I mean it.
2018-05-29 03:00:12 +00:00
2018-05-29 03:10:24 +00:00
3. Identify your available devices in __/proc/asound/modules__, do:
2018-05-29 03:00:12 +00:00
`$ cat /proc/asound/modules`
2018-05-29 03:10:24 +00:00
Here is an example of what you will see in __/proc/asound/modules__:
2018-07-11 10:39:22 +00:00
```
0 snd_usb_audio
2018-07-11 10:38:54 +00:00
1 snd_hda_intel
```
2018-05-29 03:00:12 +00:00
2018-05-29 03:12:31 +00:00
4. 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.
2018-05-29 03:10:24 +00:00
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:
2018-07-11 10:39:22 +00:00
```
options snd_usb_audio enable=1 index=0
2018-07-11 10:38:54 +00:00
options snd_hda_intel index=1
```
2018-05-29 03:00:12 +00:00
2018-05-29 03:02:27 +00:00
Notice the index.
2018-05-29 03:00:12 +00:00
2018-05-29 03:02:27 +00:00
5. Restart the computer.
2018-05-29 03:00:12 +00:00
2018-05-29 03:10:24 +00:00
### Run Firefox without pulseaudio
1. Install __[apulse](https://github.com/i-rinat/apulse)__.
2018-10-18 01:50:32 +00:00
* Install _"cmake"_, _"libasound2-dev"_ and _"libglib2.0-dev"_.
* 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
```
2018-05-29 03:00:12 +00:00
2018-10-18 01:50:32 +00:00
2. 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.
2018-05-29 03:02:27 +00:00
2018-05-29 03:10:24 +00:00
3. Every time you want to use firefox with this setting issue the command:
2018-05-29 03:02:27 +00:00
`$ apulse firefox`
2018-05-29 03:00:12 +00:00
2018-05-29 03:10:24 +00:00
4. Alternatively save the above in a script or in a .desktop file for automation.