Some checks failed
Check / eval (push) Has been cancelled
Raise priority.session for HDMI/DisplayPort (1100) and USB (1050) ALSA outputs so the default sink follows dock plug/unplug; built-in analog wins again when externals disappear. Rules live in modules/nixos/dock-audio-rules.nix; checks.dock-audio covers the contract. Verified: V2 — flake check --no-build; checks.dock-audio green. V3 pending: HARDWARE-QUEUE #87 real HDMI/USB-dock hotplug.
39 lines
1.3 KiB
Nix
39 lines
1.3 KiB
Nix
# WirePlumber 0.5 ALSA rules: prefer dock / external sinks over built-in
|
||
# analog when they appear (BACKLOG #87). Higher priority.session wins as
|
||
# the default node; when HDMI/USB goes away, the next-highest (usually
|
||
# the laptop speakers/headphones) becomes default again.
|
||
#
|
||
# Pure attrset so checks.dock-audio can unit-test the contract without a
|
||
# full PipeWire stack. Consumed by modules/nixos/default.nix.
|
||
#
|
||
# Priorities stay ≤1500 (WirePlumber docs: sinks default ~600–1000; going
|
||
# much higher can outrank streams / BT in surprising ways).
|
||
{
|
||
"monitor.alsa.rules" = [
|
||
{
|
||
# HDMI / DisplayPort monitor audio (names vary: .hdmi-stereo,
|
||
# .hdmi-surround, HiFi__HDMI1__sink, …).
|
||
matches = [
|
||
{ "node.name" = "~alsa_output\\..*\\.hdmi-.*"; }
|
||
{ "node.name" = "~alsa_output\\..*HDMI.*"; }
|
||
{ "node.name" = "~alsa_output\\..*\\.DisplayPort.*"; }
|
||
{ "node.name" = "~alsa_output\\..*\\.dp-.*"; }
|
||
];
|
||
actions."update-props" = {
|
||
"priority.driver" = 1100;
|
||
"priority.session" = 1100;
|
||
};
|
||
}
|
||
{
|
||
# USB dock / dongle audio (Thunderbolt dock, USB-C audio, …).
|
||
matches = [
|
||
{ "node.name" = "~alsa_output\\.usb-.*"; }
|
||
];
|
||
actions."update-props" = {
|
||
"priority.driver" = 1050;
|
||
"priority.session" = 1050;
|
||
};
|
||
}
|
||
];
|
||
}
|