Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
v21 Ubuntu 24.04 Audio Passthrough
#1
There are several threads here about Ubuntu and Passthrough, some saying it's working, some saying it's not.

I tried to get it running, but no success:
Platform: NanoPc-T6 (Rockchip RK3588, 16GB Ram)
The NanoPC-T6 connects to a Sony AVR which is connected to a LG-TV. Passthrough was working when using different Platform and OS.
OS: Ubuntu 24.04, from Here
Kodi 21.01: self compiled (following this), starting with '--audio-backend=pipewire', in gbw-mode
Pipewire 1.0.7 (upgraded from 1.0.5 which comes with Ubuntu 24)
Wireplumber 0.4.17 (old lua-file-format, with 'apply_properties = {  ["iec958.codecs"] = "[PCM DTS AC3 MPEG MPEG2-AAC EAC3 TRUEHD DTSHD ]",'

There is no PulseAudio running, but Pipewire, Pipewire-Pulse and Wireplumber.

What do I see:
- no option 'Passthrough' in Settings -> System -> Audio
- Log-File: 'm_streamTypes     : No passthrough capabilities'

Here is the link to a debug-log-file: kodi.log

What am I missing?
Thanks for your help!
Reply
#2
Please post the content of your wireplumber configuration.
Reply
#3
Thanks!
Here are my wireplumber config files: (~/.config/wireplumber/main.lua.d):

50-alsa-config.lua

51-alsa.lua

60-alsa-rockchip.lua
Reply
#4
Hmm, I can't see any obvious problems with that configurations.

If you search your node with pw-cli ls | grep -i -C 10 'alsa_output.platform-hdmi0-sound.playback.0.0' and then us the id to look it up with pw-cli i <Node>, does it show iec958.codecs?

Example with my setup: https://paste.kodi.tv/erefamudag
Reply
#5
Well just as a data point, I am starting Kodi using this:

flatpak run tv.kodi.Kodi --audio-backend=alsa &

Actually that is in a script that does a couple other things first but for what you're concerned about, that's how I start it.  By forcing the audio to alsa, passthrough works for me.  Without using alsa I was not able to get it to work (and that's been true since pulseaudio came out), but then again I am the type that if I know a way that works I am not going to waste my time trying to get the way that is supposed to work (but doesn't) to work.  Let the people who really love Linux have the "fun" of doing that, and when they figure out how to make it actually just work, they can let us all know (and maybe I'll try it again in the next Kodi version).
Reply
#6
Thanks for your help!

Yes, I can see  '    iec958.codecs = "[PCM DTS AC3 MPEG MPEG2-AAC EAC3 TRUEHD DTSHD ]"  '
compared to what I see in your log:  iec958.codecs = "[ "PCM", "DTS", "AC3", "EAC3", "TrueHD", "DTS-HD" ]".

I changed the spelling back (eg DTSHD to DTS-HD) as this was the syntax for pipewire 1.25!

No idea, why mine reads '[PCM DTS ..] and yours reads '["PCM", "DTS" ...] .... maybe caused by a different pipewire version?

The syntax used in my wireplumber config is according to the old documentation 
Reply
#7
Thanks!

I have tried 'audio-backend=alsa' before, and can see more audio-devices, but none of them with passthrough capabilities

in lodi.log: ' m_streamTypes     : No passthrough capabilities'
Reply
#8
To rule out a faulty wireplumber config try to set the passthrough property manually before starting Kodi: pw-cli s <YourID> Props '{ "iec958Codecs" : [ "PCM", "AC3", "DTS", "EAC3", "TrueHD", "DTS-HD" ] }'.

When successful the output should look like this:
Code:

$ pw-cli s 81 Props '{ "iec958Codecs" : [ "PCM", "AC3", "DTS", "EAC3", "TrueHD", "DTS-HD" ] }'
Object: size 56, type Spa:Pod:Object:Param:Props (262146), id Spa:Enum:ParamId:Props (2)
 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)
     Id 6        (Spa:Enum:AudioIEC958Codec:EAC3)
     Id 7        (Spa:Enum:AudioIEC958Codec:TrueHD)
     Id 8        (Spa:Enum:AudioIEC958Codec:DTS-HD)
Reply
#9
Thanks!
The result I see is identical to what you see.
I tried: 
Code:
 pw-cli s 51 Props '{ "iec958Codecs" : [ PCM AC3 DTS EAC3 TrueHD DTS-HD ] }'
as well as
pw-cli s 51 Props '{ "iec958Codecs" : [ "PCM", "AC3", "DTS", "EAC3", "TrueHD", "DTS-HD" ] }'

But, still no Passthrough option in Kodi, and the Kodi.log still says " m_streamTypes     : No passthrough capabilities"

What confuses me: these setting seem to have no effect:
Code:
  
pw-cli s 51 Props '{ "iec958Codecs" : [ "PCM", "AC3", ] }' 
pw-cli i 51
  ...
  iec958.codecs = "[ PCM DTS AC3 MPEG MPEG2-AAC EAC3 TrueHD DTS-HD ]"
  ...
Reply
#10
(2024-10-01, 05:23)MicTie Wrote: What confuses me: these setting seem to have no effect:
Code:
  
pw-cli s 51 Props '{ "iec958Codecs" : [ "PCM", "AC3", ] }' 
pw-cli i 51
  ...
  iec958.codecs = "[ PCM DTS AC3 MPEG MPEG2-AAC EAC3 TrueHD DTS-HD ]"
  ...
It changes this property:
Code:

$ pw-cli e 71 Props
[...]
Object: size 1408, type Spa:Pod:Object:Param:Props (262146), id Spa:Enum:ParamId:Props (2)
   Prop: key Spa:Pod:Object:Param:Props:device (257), flags 00000000
     String "hdmi:0,1"
   Prop: key Spa:Pod:Object:Param:Props:deviceName (258), flags 00000000
     String ""
   Prop: key Spa:Pod:Object:Param:Props:cardName (261), flags 00000000
     String ""
   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 2        (Spa:Enum:AudioIEC958Codec:DTS)
       Id 3        (Spa:Enum:AudioIEC958Codec:AC3)
       Id 4        (Spa:Enum:AudioIEC958Codec:MPEG)
       Id 5        (Spa:Enum:AudioIEC958Codec:MPEG2-AAC)
       Id 6        (Spa:Enum:AudioIEC958Codec:EAC3)
       Id 7        (Spa:Enum:AudioIEC958Codec:TrueHD)
       Id 8        (Spa:Enum:AudioIEC958Codec:DTS-HD)
   Prop: key Spa:Pod:Object:Param:Props:params (524289), flags 00000000
     Struct: size 912
       String "audio.channels"
       Int 6
       String "audio.rate"
       Int 0
       String "audio.format"
       String "UNKNOWN"
[...]
How this relates to iec958.codecs I don't know, but I confirmed this is what changes the available options in Kodi.

But, if that also doesn't work for you, then I'm out of ideas. Maybe somehow PipeWire isn't recognizing the TV as able to process passthrough audio but I have no clue how that could be verified.
Reply
#11
Thanks for your help! 

pw-cli e 71 Props does not show any properties related to iec958Codecs on my system.

Passthrough was working when using different Platform (Raspberry) and OS with the same AVR and TV.
So maybe something is wrong with my wireplumber / pipewire setup ....

PS:
No idea if it's related to my issue:
When reading the Pipewire documentation regarding Passthrough I found this: Passthrough with HDMI is partially supported. If the device is using UCM, it likely will not work.
Yes, I it seems I have usm and ucm2 installed, and it seems not working:
Code:
michael@michael-desktop:~$ alsaucm listcards
ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:2 use case configuration -2
ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:3 use case configuration -2
ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:4 use case configuration -2
  list is empty

Too bad, Google does not have anything relevant regarding ALSA lib main.c:1554Sadsnd_use_case_mgr_open) error: failed to import hw:4 use case configuration -2
Reply
#12
(2024-10-02, 05:16)MicTie Wrote: pw-cli e 71 Props does not show any properties related to iec958Codecs on my system.
You have to use the correct ID for your system, 71 is from my configuration.

Regarding HDMI UMC: I have no clue, all I can say is that the command says list is empty without errors/warnings on my system.
Reply
#13
Thanks!
I accidently cut / pasted your command and id here, 
although I checked on my system with my current id, and no properties related to iec958Codecs are displayed.

Code:

michael@michael-desktop:~$ pw-cli s  46 Props '{ "iec958Codecs" : [ "PCM", "AC3", "DTS", "EAC3", "TrueHD", "DTS-HD" ] }'
Object: size 56, type SpaTongueod:ObjectTonguearamTonguerops (262146), id Spa:EnumTonguearamIdTonguerops (2)
  Prop: key SpaTongueod:ObjectTonguearamTonguerops:iec958Codecs (65553), flags 00000000
    Array: child.size 4, child.type Spa:Id
      Id 1        (Spa:Enum:AudioIEC958CodecTongueCM)
      Id 3        (Spa:Enum:AudioIEC958Codec:AC3)
      Id 2        (Spa:Enum:AudioIEC958CodecBig GrinTS)
      Id 6        (Spa:Enum:AudioIEC958Codec:EAC3)
      Id 7        (Spa:Enum:AudioIEC958Codec:TrueHD)
      Id 8        (Spa:Enum:AudioIEC958CodecBig GrinTS-HD)

michael@michael-desktop:~$ pw-cli i  46 | grep iec958.codecs
*               iec958.codecs = "[ PCM DTS AC3 MPEG MPEG2-AAC EAC3 TrueHD DTS-HD ]"

michael@michael-desktop:~$ pw-cli e  46 Props | grep iec958Codecs


I have 2 more questions: is it normal; not to see ANY passthrough related configuration item in Settings -> System -> Audio (expert mode). Older screenshots seem to indicate that the option is there, but greyed.

This post says all 'formats' are tested .... but I don't see anything like 'AESinkAUDIOTRACK' or 'VerifySinkConfiguration' in my logs.

Thank you for your patience!
Reply
#14
(2024-10-04, 06:09)MicTie Wrote: I have 2 more questions: is it normal; not to see ANY passthrough related configuration item in Settings -> System -> Audio (expert mode). Older screenshots seem to indicate that the option is there, but greyed.

Maybe that was the case at some point, or is even skin dependent, but with the default Estuary skin today passthrough options are only visible if the sink supports them. And only those formats supported by the connected device are shown, so in my case I have all formats enabled in PipeWire but when connected to my old TV Kodi shows only the options for AC3 and DTS.
 
(2024-10-04, 06:09)MicTie Wrote: This post says all 'formats' are tested .... but I don't see anything like 'AESinkAUDIOTRACK' or 'VerifySinkConfiguration' in my logs.

Different backends have different initialization routines, AESinkAUDIOTRACK is Android only. ALSA also doesn't require probing for different formats.
Reply
#15
Thank you for your effort and help!
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 24.04 Audio Passthrough0