I needed to automatically switch to HDMI Audio once it was plugged in.
Unfortunately, PipeWire and WirePlumber can only detect one target.
$ pw-cat -p --list-targets
Available targets ("*" denotes default):
* 39: description="Built-in Audio" prio=1000
$ wpctl status
PipeWire 'pipewire-0' [0.3.38, user@fedora, cookie:2305481597]
└─ Clients:
.........................
Audio
├─ Devices:
│ 38. Built-in Audio [alsa:pcm]
│
├─ Sinks:
│ * 39. Built-in Audio [vol: 1.00]
│
├─ Sink endpoints:
│
├─ Sources:
│ * 40. Built-in Audio [vol: 1.00]
│
├─ Source endpoints:
│
└─ Streams:
The solution was to modify /usr/share/wireplumber/main.lua.d/50-alsa-config.lua
and apply the following lines, essentially disabling use-acp
:
apply_properties = {
-- Use ALSA-Card-Profile devices. They use UCM or the profile
-- configuration to configure the device and mixer settings.
-- ["api.alsa.use-acp"] = true,
And now PipeWire and WirePlumber can detect all of the targets.
$ pw-cat -p --list-targets
Available targets ("*" denotes default):
* 39: description="Built-in Audio" prio=1000
41: description="Built-in Audio (HDMI 0)" prio=696
42: description="Built-in Audio (HDMI 1)" prio=632
43: description="Built-in Audio (HDMI 2)" prio=616
44: description="Built-in Audio (HDMI 3)" prio=600
45: description="Built-in Audio (HDMI 4)" prio=584
46: description="Built-in Audio (HDMI 5)" prio=568
47: description="Built-in Audio (HDMI 6)" prio=552
48: description="Built-in Audio (HDMI 7)" prio=536
49: description="Built-in Audio (HDMI 8)" prio=520
50: description="Built-in Audio (HDMI 9)" prio=504
51: description="Built-in Audio (HDMI 10)" prio=488
52: description="Built-in Audio (HDMI 11)" prio=472
$ wpctl status
PipeWire 'pipewire-0' [0.3.38, user@fedora, cookie:2305481597]
└─ Clients:
..................
Audio
├─ Devices:
│ 38. Built-in Audio [alsa:pcm]
│
├─ Sinks:
│ * 39. Built-in Audio [vol: 1.00]
│ 41. Built-in Audio (HDMI 0) [vol: 1.00]
│ 42. Built-in Audio (HDMI 1) [vol: 1.00]
│ 43. Built-in Audio (HDMI 2) [vol: 1.00]
│ 44. Built-in Audio (HDMI 3) [vol: 1.00]
│ 45. Built-in Audio (HDMI 4) [vol: 1.00]
│ 46. Built-in Audio (HDMI 5) [vol: 1.00]
│ 47. Built-in Audio (HDMI 6) [vol: 1.00]
│ 48. Built-in Audio (HDMI 7) [vol: 1.00]
│ 49. Built-in Audio (HDMI 8) [vol: 1.00]
│ 50. Built-in Audio (HDMI 9) [vol: 1.00]
│ 51. Built-in Audio (HDMI 10) [vol: 1.00]
│ 52. Built-in Audio (HDMI 11) [vol: 1.00]
│
├─ Sink endpoints:
│
├─ Sources:
│ * 40. Built-in Audio [vol: 1.00]
│
├─ Source endpoints:
│
└─ Streams: