From 1efe02becdb2e15a2a79ec970cc1f2209da995d8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 8 Mar 2022 15:42:11 +0100 Subject: sif: ... --- accounts/gkleen@sif/default.nix | 7 +++++++ .../wireplumber/bluetooth.lua.d/50-bluez-config.lua | 20 ++++++++++++++++++++ .../wireplumber/main.lua.d/51-alsa-disable.lua | 12 ++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua create mode 100644 accounts/gkleen@sif/wireplumber/main.lua.d/51-alsa-disable.lua (limited to 'accounts') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 61a5fdb4..84ac88a7 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -331,6 +331,13 @@ in { ${pkgs.systemd}/bin/systemctl --user try-restart dunst ''; }; + "wireplumber" = { + source = ./wireplumber; + recursive = true; + onChange = '' + ${pkgs.systemd}/bin/systemctl --user try-restart wireplumber + ''; + }; }; fonts.fontconfig.enable = true; diff --git a/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua b/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua new file mode 100644 index 00000000..948b7dfa --- /dev/null +++ b/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua @@ -0,0 +1,20 @@ +rule = { + matches = { + { + { "device.name", "matches", "bluez_card.*" }, + }, + }, + apply_properties = { + ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]", + }, +} + +table.insert(bluez_monitor.rules,rule) + +bluez_monitor.properties = { + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-hw-volume"] = false, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]", + ["bluez5.codecs"] = "[ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]", +} diff --git a/accounts/gkleen@sif/wireplumber/main.lua.d/51-alsa-disable.lua b/accounts/gkleen@sif/wireplumber/main.lua.d/51-alsa-disable.lua new file mode 100644 index 00000000..eafa6184 --- /dev/null +++ b/accounts/gkleen@sif/wireplumber/main.lua.d/51-alsa-disable.lua @@ -0,0 +1,12 @@ +rule = { + matches = { + { + { "device.name", "equals", "alsa_card.pci-0000_01_00.1" }, + }, + }, + apply_properties = { + ["device.disabled"] = true, + }, +} + +table.insert(alsa_monitor.rules,rule) -- cgit v1.2.3