From 993e416148915dc5ba3bcdc8ef2baf5218e89505 Mon Sep 17 00:00:00 2001 From: Josh Washburne Date: Thu, 3 Oct 2024 13:39:00 -0400 Subject: [PATCH] Added audio configs. --- dotfiles/README.md | 29 +++++++++++++++++++ .../10-bluetooth-adjustments.conf | 8 +++++ .../10-pulse-and-wireplumber.conf | 11 +++++++ .../wireplumber.conf.d/51-bluez-config.conf | 7 +++++ 4 files changed, 55 insertions(+) create mode 100644 dotfiles/pipewire/pipewire-pulse.conf.d/10-bluetooth-adjustments.conf create mode 100644 dotfiles/pipewire/pipewire.conf.d/10-pulse-and-wireplumber.conf create mode 100644 dotfiles/wireplumber/wireplumber.conf.d/51-bluez-config.conf diff --git a/dotfiles/README.md b/dotfiles/README.md index 4a69432..cc9502e 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -33,3 +33,32 @@ A couple of the plugins need some Node.JS packages installed first. ``` $ sudo npm install -g tree-sitter tree-sitter-cli typescript typescript-language-server ``` + +## pipewire + +These are used primarily on non-systemd setups. + +### Requirements + +- [pipewire-pulse](https://docs.pipewire.org/page_man_pipewire-pulse_1.html) +- [wireplumber](https://gitlab.freedesktop.org/pipewire/wireplumber) + +### Setup + +``` +$ cp -r pipewire ~/.config/. +``` + +## wireplumber + +Usually you don't need anything specific in the wireplumber setup, but I have custom bluetooth configurations for my headsets. + +### Requirements + +None. + +### Setup + +``` +cp -r wireplumber ~/.config/. +``` diff --git a/dotfiles/pipewire/pipewire-pulse.conf.d/10-bluetooth-adjustments.conf b/dotfiles/pipewire/pipewire-pulse.conf.d/10-bluetooth-adjustments.conf new file mode 100644 index 0000000..e64783d --- /dev/null +++ b/dotfiles/pipewire/pipewire-pulse.conf.d/10-bluetooth-adjustments.conf @@ -0,0 +1,8 @@ +context.exec = [ + # Always keep one sink loaded, even if it's NULL. + { path = "/usr/bin/pactl" args = "load-module module-always-sink" } + # When a new sink/source appears, switch to it automatically. This is what + # allows the bluetooth headphones to have priority over the builtin + # speakers. + { path = "/usr/bin/pactl" args = "load-module module-switch-on-connect" } +] diff --git a/dotfiles/pipewire/pipewire.conf.d/10-pulse-and-wireplumber.conf b/dotfiles/pipewire/pipewire.conf.d/10-pulse-and-wireplumber.conf new file mode 100644 index 0000000..e60ff69 --- /dev/null +++ b/dotfiles/pipewire/pipewire.conf.d/10-pulse-and-wireplumber.conf @@ -0,0 +1,11 @@ +context.exec = [ + # They don't recommend it, but I'm starting both the wireplumber media + # session and the pulseaudio wrapper from here since I'm running a + # non-systemd setup and it works all the time, every time. :) + { path = "/usr/bin/wireplumber" args = "" + condition = [ { exec.session-manager = null } { exec.session-manager = true } ] } + + { path = "/usr/bin/pipewire-pulse" args = "" + condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] } +] + diff --git a/dotfiles/wireplumber/wireplumber.conf.d/51-bluez-config.conf b/dotfiles/wireplumber/wireplumber.conf.d/51-bluez-config.conf new file mode 100644 index 0000000..0382b16 --- /dev/null +++ b/dotfiles/wireplumber/wireplumber.conf.d/51-bluez-config.conf @@ -0,0 +1,7 @@ +monitor.bluez.properties = { + # I used these for my Mpow H7 Pro headphones for the high quality mode. + # Might not need these if I don't use them on this specific machine. + bluez5.enable-sbc-xq = true + bluez5.enable-msbc = true + bluez5.codecs = [sbc sbc_xq] +}