Merge pull request 'audio: switch to wireplumber for pipewire configuration' (#92) from feature/audio-wireplumber into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/92 Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
This commit is contained in:
commit
a4cf1bcd53
|
@ -43,32 +43,19 @@ in
|
|||
};
|
||||
};
|
||||
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
||||
};
|
||||
|
||||
# Bluetooth configuration for pipewire
|
||||
media-session.config.bluez-monitor.rules = mkIf cfg.bluetooth.enable [
|
||||
{
|
||||
# Matches all cards
|
||||
matches = [{ "device.name" = "~bluez_card.*"; }];
|
||||
actions = {
|
||||
"update-props" = {
|
||||
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
# mSBC is not expected to work on all headset + adapter combinations.
|
||||
"bluez5.msbc-support" = true;
|
||||
};
|
||||
};
|
||||
# Bluetooth configuration using wireplumber
|
||||
# https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
|
||||
environment.etc = mkIf cfg.bluetooth.enable {
|
||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
["bluez5.enable-msbc"] = true,
|
||||
["bluez5.enable-hw-volume"] = true,
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
# Matches all sources
|
||||
{ "node.name" = "~bluez_input.*"; }
|
||||
# Matches all outputs
|
||||
{ "node.name" = "~bluez_output.*"; }
|
||||
];
|
||||
actions = {
|
||||
"node.pause-on-idle" = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable bluetooth
|
||||
|
|
Loading…
Reference in a new issue