pipewire-pulse: formats not restored on sink reconnect
- PipeWire version (
pipewire --version
): 0.3.77 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Gentoo Linux - Desktop Environment: KDE Plasma
- Kernel version (
uname -r
): 6.5.0-rc6-gentoo-dist+
Description of Problem:
When reconnecting a HDMI (or DisplayPort) sink, the Spa:Pod:Object:Param:Props:iec958Codecs
properties is correctly restored. However, the formats setting for the corresponding pulse device are not restored and revert to the default PCM only.
How Reproducible:
Always
Steps to Reproduce:
- Enable e.g. AC3 and DTS formats for some (HDMI) sink using e.g. pavucontrol.
- Observe that setting is applied using
pw-cli e ...
andpactl list sinks
:
pw-cli e alsa_card.pci-0000_04_00.0 Route
Object: size 944, type Spa:Pod:Object:Param:Route (262153), id Spa:Enum:ParamId:Route (13)
Prop: key Spa:Pod:Object:Param:Route:index (1), flags 00000000
Int 0
Prop: key Spa:Pod:Object:Param:Route:direction (2), flags 00000000
Id 1 (Spa:Enum:Direction:Output)
Prop: key Spa:Pod:Object:Param:Route:name (4), flags 00000000
String "hdmi-output-0"
Prop: key Spa:Pod:Object:Param:Route:description (5), flags 00000000
String "HDMI / DisplayPort"
Prop: key Spa:Pod:Object:Param:Route:priority (6), flags 00000000
Int 5900
Prop: key Spa:Pod:Object:Param:Route:available (7), flags 00000000
Id 2 (Spa:Enum:ParamAvailability:yes)
Prop: key Spa:Pod:Object:Param:Route:info (8), flags 00000004
Struct: size 344
Int 7
String "port.type"
String "hdmi"
String "port.availability-group"
String "Legacy 1"
String "device.icon_name"
String "video-display"
String "card.profile.port"
String "0"
String "device.product.name"
String "HKC-TV"
String "route.hw-mute"
String "false"
String "route.hw-volume"
String "false"
Prop: key Spa:Pod:Object:Param:Route:profiles (9), flags 00000000
Array: child.size 4, child.type Spa:Int
Int 1
Int 5
Int 6
Prop: key Spa:Pod:Object:Param:Route:device (3), flags 00000000
Int 4
Prop: key Spa:Pod:Object:Param:Route:props (10), flags 00000000
Object: size 240, type Spa:Pod:Object:Param:Props (262146), id Spa:Enum:ParamId:Route (13)
Prop: key Spa:Pod:Object:Param:Props:mute (65540), flags 00000000
Bool false
Prop: key Spa:Pod:Object:Param:Props:channelVolumes (65544), flags 00000000
Array: child.size 4, child.type Spa:Float
Float 1.000000
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:volumeBase (65545), flags 00000001
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:volumeStep (65546), flags 00000001
Float 0.000015
Prop: key Spa:Pod:Object:Param:Props:channelMap (65547), flags 00000000
Array: child.size 4, child.type Spa:Id
Id 3 (Spa:Enum:AudioChannel:FL)
Id 4 (Spa:Enum:AudioChannel:FR)
Prop: key Spa:Pod:Object:Param:Props:softVolumes (65552), flags 00000000
Array: child.size 4, child.type Spa:Float
Float 1.000000
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:latencyOffsetNsec (65550), flags 00000000
Long 0
Prop: key Spa:Pod:Object:Param:Props:iec958Codecs (65553), flags 00000000
Array: child.size 4, child.type Spa:Id
Id 1 (Spa:Enum:AudioIEC958Codec:PCM)
Id 3 (Spa:Enum:AudioIEC958Codec:AC3)
Id 2 (Spa:Enum:AudioIEC958Codec:DTS)
Prop: key Spa:Pod:Object:Param:Route:devices (11), flags 00000000
Array: child.size 4, child.type Spa:Int
Int 4
Int 5
Int 6
Prop: key Spa:Pod:Object:Param:Route:profile (12), flags 00000000
Int 1
Prop: key Spa:Pod:Object:Param:Route:save (13), flags 00000000
Bool true
Note that Spa:Pod:Object:Param:Props:iec958Codecs
now lists AC3 and DTS.
Sink #802
State: IDLE
Name: alsa_output.pci-0000_04_00.0.hdmi-stereo
Description: DG2 Audio Controller Digital Stereo (HDMI)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_04_00.0.hdmi-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Properties:
alsa.card = "2"
alsa.card_name = "HDA Intel PCH"
alsa.class = "generic"
alsa.device = "3"
alsa.driver_name = "snd_hda_intel"
alsa.id = "HDMI 0"
alsa.long_card_name = "HDA Intel PCH at 0xdf300000 irq 171"
alsa.name = "HKC-TV"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA Intel PCH at 0xdf300000 irq 171"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "hdmi:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "4"
device.api = "alsa"
device.class = "sound"
device.id = "41"
device.profile.description = "Digital Stereo (HDMI)"
device.profile.name = "hdmi-stereo"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "DG2 Audio Controller"
node.name = "alsa_output.pci-0000_04_00.0.hdmi-stereo"
node.nick = "HKC-TV"
node.pause-on-idle = "false"
object.path = "alsa:pcm:2:hdmi:2:playback"
priority.driver = "696"
priority.session = "696"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "34"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "32"
object.serial = "802"
node.max-latency = "16384/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "32"
api.alsa.headroom = "0"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "2"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio2"
device.bus = "pci"
device.bus_path = "pci-0000:04:00.0"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_04_00.0"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4027794"
device.product.id = "0x4f90"
device.product.name = "DG2 Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:04.0/0000:04:00.0/sound/card2"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
device.string = "2"
Ports:
hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 1, available)
Active Port: hdmi-output-0
Formats:
pcm
dts-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
ac3-iec61937, format.rate = "{ \"min\": 32000, \"max\": 192000 }"
And note here also that pactl list sinks
lists AC3 and DTS as enabled for our sink.
- Now power off, or unplug the HDMI device (depending on the device the connection will sometimes remain active if the device is merely in standby).
- Reconnect and turn on the HDMI device.
- Observe that
pw-cli e ...
still shows AC3 and DTS as enabled formats:
pw-cli e alsa_card.pci-0000_04_00.0 Route
Object: size 944, type Spa:Pod:Object:Param:Route (262153), id Spa:Enum:ParamId:Route (13)
Prop: key Spa:Pod:Object:Param:Route:index (1), flags 00000000
Int 0
Prop: key Spa:Pod:Object:Param:Route:direction (2), flags 00000000
Id 1 (Spa:Enum:Direction:Output)
Prop: key Spa:Pod:Object:Param:Route:name (4), flags 00000000
String "hdmi-output-0"
Prop: key Spa:Pod:Object:Param:Route:description (5), flags 00000000
String "HDMI / DisplayPort"
Prop: key Spa:Pod:Object:Param:Route:priority (6), flags 00000000
Int 5900
Prop: key Spa:Pod:Object:Param:Route:available (7), flags 00000000
Id 2 (Spa:Enum:ParamAvailability:yes)
Prop: key Spa:Pod:Object:Param:Route:info (8), flags 00000004
Struct: size 344
Int 7
String "port.type"
String "hdmi"
String "port.availability-group"
String "Legacy 1"
String "device.icon_name"
String "video-display"
String "card.profile.port"
String "0"
String "device.product.name"
String "HKC-TV"
String "route.hw-mute"
String "false"
String "route.hw-volume"
String "false"
Prop: key Spa:Pod:Object:Param:Route:profiles (9), flags 00000000
Array: child.size 4, child.type Spa:Int
Int 1
Int 5
Int 6
Prop: key Spa:Pod:Object:Param:Route:device (3), flags 00000000
Int 4
Prop: key Spa:Pod:Object:Param:Route:props (10), flags 00000000
Object: size 240, type Spa:Pod:Object:Param:Props (262146), id Spa:Enum:ParamId:Route (13)
Prop: key Spa:Pod:Object:Param:Props:mute (65540), flags 00000000
Bool false
Prop: key Spa:Pod:Object:Param:Props:channelVolumes (65544), flags 00000000
Array: child.size 4, child.type Spa:Float
Float 1.000000
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:volumeBase (65545), flags 00000001
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:volumeStep (65546), flags 00000001
Float 0.000015
Prop: key Spa:Pod:Object:Param:Props:channelMap (65547), flags 00000000
Array: child.size 4, child.type Spa:Id
Id 3 (Spa:Enum:AudioChannel:FL)
Id 4 (Spa:Enum:AudioChannel:FR)
Prop: key Spa:Pod:Object:Param:Props:softVolumes (65552), flags 00000000
Array: child.size 4, child.type Spa:Float
Float 1.000000
Float 1.000000
Prop: key Spa:Pod:Object:Param:Props:latencyOffsetNsec (65550), flags 00000000
Long 0
Prop: key Spa:Pod:Object:Param:Props:iec958Codecs (65553), flags 00000000
Array: child.size 4, child.type Spa:Id
Id 1 (Spa:Enum:AudioIEC958Codec:PCM)
Id 3 (Spa:Enum:AudioIEC958Codec:AC3)
Id 2 (Spa:Enum:AudioIEC958Codec:DTS)
Prop: key Spa:Pod:Object:Param:Route:devices (11), flags 00000000
Array: child.size 4, child.type Spa:Int
Int 4
Int 5
Int 6
Prop: key Spa:Pod:Object:Param:Route:profile (12), flags 00000000
Int 1
Prop: key Spa:Pod:Object:Param:Route:save (13), flags 00000000
Bool true
But that AC3 and DTS is now gone from pactl list sinks
:
Sink #859
State: SUSPENDED
Name: alsa_output.pci-0000_04_00.0.hdmi-stereo
Description: DG2 Audio Controller Digital Stereo (HDMI)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_04_00.0.hdmi-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Properties:
alsa.card = "2"
alsa.card_name = "HDA Intel PCH"
alsa.class = "generic"
alsa.device = "3"
alsa.driver_name = "snd_hda_intel"
alsa.id = "HDMI 0"
alsa.long_card_name = "HDA Intel PCH at 0xdf300000 irq 171"
alsa.name = "HKC-TV"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA Intel PCH at 0xdf300000 irq 171"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "hdmi:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "4"
device.api = "alsa"
device.class = "sound"
device.id = "41"
device.profile.description = "Digital Stereo (HDMI)"
device.profile.name = "hdmi-stereo"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "DG2 Audio Controller"
node.name = "alsa_output.pci-0000_04_00.0.hdmi-stereo"
node.nick = "HKC-TV"
node.pause-on-idle = "false"
object.path = "alsa:pcm:2:hdmi:2:playback"
priority.driver = "696"
priority.session = "696"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "34"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "32"
object.serial = "859"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "2"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio2"
device.bus = "pci"
device.bus_path = "pci-0000:04:00.0"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_04_00.0"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4027794"
device.product.id = "0x4f90"
device.product.name = "DG2 Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:04.0/0000:04:00.0/sound/card2"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
device.string = "2"
Ports:
hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability group: Legacy 1, available)
Active Port: hdmi-output-0
Formats:
pcm
Actual Results:
AC3 and DTS are no longer enabled for the pulse sink, as a result pass-through no longer works.
Expected Results:
The settings for the reconnected pulse sink are identical to the pw-cli
properties. As a result pass-through formats are properly restored.
Additional Info (as attachments):
-
pw-dump > pw-dump.log
: pw-dump.log
Possibly related to: #2428