audio: switch to wireplumber for pipewire configuration
https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
This commit is contained in:
parent
72ee1b7180
commit
7ec1b28c13
|
@ -43,31 +43,19 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
||||||
|
};
|
||||||
|
|
||||||
# Bluetooth configuration for pipewire
|
# Bluetooth configuration using wireplumber
|
||||||
media-session.config.bluez-monitor.rules = mkIf cfg.bluetooth.enable [
|
# https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
|
||||||
{
|
environment.etc = {
|
||||||
# Matches all cards
|
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||||
matches = [{ "device.name" = "~bluez_card.*"; }];
|
bluez_monitor.properties = {
|
||||||
actions = {
|
["bluez5.enable-sbc-xq"] = true,
|
||||||
"update-props" = {
|
["bluez5.enable-msbc"] = true,
|
||||||
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
["bluez5.enable-hw-volume"] = true,
|
||||||
# mSBC is not expected to work on all headset + adapter combinations.
|
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||||
"bluez5.msbc-support" = true;
|
|
||||||
# SBC-XQ is not expected to work on all headset + adapter combinations.
|
|
||||||
"bluez5.sbc-xq-support" = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
{
|
'';
|
||||||
matches = [
|
|
||||||
# Matches all sources
|
|
||||||
{ "node.name" = "~bluez_input.*"; }
|
|
||||||
# Matches all outputs
|
|
||||||
{ "node.name" = "~bluez_output.*"; }
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable bluetooth
|
# Enable bluetooth
|
||||||
|
|
Loading…
Reference in a new issue