From a93ca93a5a4fc2ad450521849ef80880da290f98 Mon Sep 17 00:00:00 2001 From: Inga Date: Thu, 1 Sep 2022 02:27:51 +0200 Subject: [PATCH] Pipewire (audio, camera) --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b30c1f8..5678555 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,50 @@ TODO ### Sound +Based on https://wiki.alpinelinux.org/wiki/PipeWire + ``` -doas apk add pamixer +doas apk add dbus dbus-openrc +doas rc-service dbus start +doas apk add pipewire wireplumber rtkit alsa-utils pipewire-alsa +doas addgroup YOURUSER rtkit +doas addgroup root audio +alsamixer ``` -TODO + +In alsamixer, use F6 to find the target sound card (most likely 0 is HDMI and 1 is ordinary). +Remember its number, and in `/usr/share/alsa/alsa.conf`, +replace `defaults.ctl.card` and `defaults.pcm.card` with the target number. + +In `/usr/local/bin/inga-river`, replace `river $@` with `dbus-run-session -- river $@`, +relogin (Ctrl+Shift+E). + +Then +``` +doas rc-service alsa start +doas rc-update add alsa +/usr/libexec/pipewire-launcher +``` + +Make sure that everything works (with `wpctl status`, `pw-cat -p YOURFILE.flac` +or just opening YouTube in FF). + +Then make pipewire start automatically: in river config, add another startup line: +``` +riverctl spawn "/usr/libexec/pipewire-launcher" +``` + +Control microphone and volume with `alsamixer`. + +Note that the internal microphone does not work and is not detected by pipewire. +Only external microphones work. + +### Webcam + +Should work after following the steps for "Audio". + +Can be tested in https://webrtc.github.io/test-pages + +### Mic in browser + +Does not work???