2023-12-27, 16:29
Running kodi-gbm-gles with pipewire (libpipewire 0.3) as audio backend on up-to-date arch linux on a NUC12.
Kodi Media Center 21.0-BETA2 (20.90.821) Git:20231227-0ac3c88709d-dirty
in kodi system audio: selected default pipewire device, best match
pipewire.conf:
default.clock.rate = 96000
default.clock.allowed-rates = [ 44100 48000 88200 96000 ]
wireplumber/main.lua.d/50-alsa-config.lua:
["audio.allowed-rates"] = "44100,48000,88200,96000",
I expected the samplerate to change when selecting a 44100 flac, similar to when having bare alsa as a backend (KODI_AE_SINK=ALSA) and the SPDIF USB (?) device selected.
The kodi.log shows the CActiveAESink trying its best to make it happen:
https://paste.kodi.tv/qoditafiqu
But the samplerate stays at 96000 on the alsa_output device:
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
R 41 1024 96000 963.5us 24.9us 0.09 0.00 0 S32LE 2 96000 alsa_output.usb-miniDSP_miniDSP_Flex-00.analog-stereo
R 51 735 44100 125.3us 690.7us 0.01 0.06 0 F32LE 2 44100 + Kodi
For comparison I tried MPV from a tty with pipewire backend, which does result in the expected change of the samplerate in the hardware:
R 40 256 44100 121.1us 11.0us 0.02 0.00 0 S32LE 2 44100 alsa_output.usb-miniDSP_miniDSP_Flex-00.analog-stereo
R 51 0 44100 47.5us 6.4us 0.01 0.00 0 S16LE 2 44100 + mpv
Having passed PIPEWIRE_DEBUG=4 to kodi, journalctl shows
https://paste.kodi.tv/sedaxadimo
Kodi Media Center 21.0-BETA2 (20.90.821) Git:20231227-0ac3c88709d-dirty
in kodi system audio: selected default pipewire device, best match
pipewire.conf:
default.clock.rate = 96000
default.clock.allowed-rates = [ 44100 48000 88200 96000 ]
wireplumber/main.lua.d/50-alsa-config.lua:
["audio.allowed-rates"] = "44100,48000,88200,96000",
I expected the samplerate to change when selecting a 44100 flac, similar to when having bare alsa as a backend (KODI_AE_SINK=ALSA) and the SPDIF USB (?) device selected.
The kodi.log shows the CActiveAESink trying its best to make it happen:
https://paste.kodi.tv/qoditafiqu
But the samplerate stays at 96000 on the alsa_output device:
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
R 41 1024 96000 963.5us 24.9us 0.09 0.00 0 S32LE 2 96000 alsa_output.usb-miniDSP_miniDSP_Flex-00.analog-stereo
R 51 735 44100 125.3us 690.7us 0.01 0.06 0 F32LE 2 44100 + Kodi
For comparison I tried MPV from a tty with pipewire backend, which does result in the expected change of the samplerate in the hardware:
R 40 256 44100 121.1us 11.0us 0.02 0.00 0 S32LE 2 44100 alsa_output.usb-miniDSP_miniDSP_Flex-00.analog-stereo
R 51 0 44100 47.5us 6.4us 0.01 0.00 0 S16LE 2 44100 + mpv
Having passed PIPEWIRE_DEBUG=4 to kodi, journalctl shows
https://paste.kodi.tv/sedaxadimo