IEC958 Passthrough broken with Kodi since Pipewire version 0.3.83
- PipeWire version (
pipewire --version
): 1.0.5 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Fedora Linux 40 (Workstation Edition) - Desktop Environment: GNOME
- Kernel version (
uname -r
): 6.8.7-300.fc40.x86_64
Description of Problem:
IEC958 passthrough is broken in Kodi since 0.3.83 (specifically in 771f71f6).
It seems that the change introduced a forced quantum value that seems to cause problems.
I have made a test fix here which seems to solve the problem:
master -> lrusak/pipewire@7296dc43
1.0 -> lrusak/pipewire@0c325371
Maybe there is another way though or maybe I need to fix the Kodi sink.
How Reproducible:
Play a DTS, DTS-MA or TrueHD audio track in Kodi (master or Omega) with passthrough enabled.
Steps to Reproduce:
- Use Kodi (master or Omega) and enable passthrough.
- Play a file with DTS, DTS-MA or TrueHD audio.
- Listen for stutter and audible clicks and XRun (reported by pipewire).
Actual Results:
Stuttering audio and audible clicks.
Expected Results:
Smooth audio playback and my audio receiver correctly reporting IEC958 formats.
Additional Info (as attachments):
not working
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: spa.alsa: using IEC958 Codec:DTS rate:48000
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: spa.alsa: 0x56115c2f31c8: ALSA device open 'hdmi:1,4,AES0=0x2,AES1=0x82,AES2=0x0,AES3=0x2' playback
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: spa.alsa: hdmi:1,4,AES0=0x2,AES1=0x82,AES2=0x0,AES3=0x2 could not find ctl device: No such file or directory
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: spa.alsa: hdmi:1,4p: format:S16_LE access:mmap-interleaved rate:48000 channels:2 buffer frames 32768, period frames 1024, periods 32, frame_size 4 headroom 0 start-delay:0 batch:0 tsched:1
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) max-latency:16384/44100 -> 16384/48000
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.context: 0x56115c222950: busy:0 reason:max quantum changed
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.link: (63.0.0 -> 46.0.0) negotiating -> allocating (ready-ready)
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.link: (63.0.0 -> 46.0.0) allocating -> paused (paused-paused)
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.context: 0x56115c222950: busy:0 reason:link prepared
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.node: (Kodi-63) -> change driver (Kodi-63 -> alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46)
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.context: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) state:suspended new rate:44100/(44100)->48000
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.link: (63.0.0 -> 46.0.0) activated
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.link: (63.0.0 -> 46.0.0) paused -> active (paused-paused)
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.node: (Kodi-63) suspended -> running
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: spa.alsa: 0x56115c2f31c8: follower:0 duration:0->1024 rate:0->48000
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) suspended -> running
Apr 30 21:04:39 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:1024/48000 count:1 time:212978182754 delay:42672 max:42672 (0 suppressed)
Apr 30 21:04:41 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:1024/48000 count:41 time:212980189037 delay:41729 max:63074 (39 suppressed)
Apr 30 21:04:43 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:1024/48000 count:76 time:212982218003 delay:62139 max:63074 (34 suppressed)
Apr 30 21:04:45 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:1024/48000 count:109 time:212984269889 delay:61708 max:63074 (32 suppressed)
Apr 30 21:04:47 nuc8i7hnk pipewire[146649]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:1024/48000 count:142 time:212986303555 delay:61148 max:63074 (32 suppressed)
working
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: spa.alsa: using IEC958 Codec:DTS rate:48000
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: spa.alsa: 0x55b7801ab1d8: ALSA device open 'hdmi:1,4,AES0=0x2,AES1=0x82,AES2=0x0,AES3=0x2' playback
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: spa.alsa: hdmi:1,4,AES0=0x2,AES1=0x82,AES2=0x0,AES3=0x2 could not find ctl device: No such file or directory
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: spa.alsa: hdmi:1,4p: format:S16_LE access:mmap-interleaved rate:48000 channels:2 buffer frames 32768, period frames 1024, periods 32, frame_size 4 headroom 0 start-delay:0 batch:0 tsched:1
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) max-latency:16384/44100 -> 16384/48000
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.context: 0x55b7800da950: busy:0 reason:max quantum changed
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.link: (63.0.0 -> 46.0.0) negotiating -> allocating (ready-ready)
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.link: (63.0.0 -> 46.0.0) allocating -> paused (paused-paused)
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.context: 0x55b7800da950: busy:0 reason:link prepared
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.node: (Kodi-63) -> change driver (Kodi-63 -> alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46)
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.context: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) state:suspended new rate:44100/(44100)->48000
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.link: (63.0.0 -> 46.0.0) activated
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.link: (63.0.0 -> 46.0.0) paused -> active (paused-paused)
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.node: (Kodi-63) suspended -> running
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: spa.alsa: 0x55b7801ab1d8: follower:0 duration:0->512 rate:0->48000
Apr 30 21:02:12 nuc8i7hnk pipewire[142953]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) suspended -> running
Apr 30 21:02:13 nuc8i7hnk pipewire[142953]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4-46) XRun! rate:512/48000 count:3 time:212831280725 delay:181025 max:201240 (1 suppressed)
Edited by Lukas Rusak