Kodi Community Forum

Full Version: Support for HDMI 1 port (i.e. both ports)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
My understanding is that Kodi on Raspbian only supports one HDMI port, yet the Raspberry Pi 4 has two HDMI ports. Specifically, I'm using the pipplware version.

I have a situation where I would like video (as normal) to go down HDMI 0 and audio to go down HDMI 1, especially passthrough audio. The reason for this is that my TV can only handle PCM 2ch and Dolby Digital, but my audio receiver can't process 4k video, so I'm sending sound directly to it so it can handle DTS etc. which my TV can't. The setup is:
  • HDMI 0 -> TV
  • HDMI 1 -> Audio receiver

Is it possible to get both HDMI ports working on the RPi 4? Apparently, this would need a code change in Kodi itself (PISink code block in Kodi).

Just to clarify, I only care about audio on the second port, but maybe somebody else has a need to video on that port too.
(2019-09-28, 22:46)cocodude Wrote: [ -> ]My understanding is that Kodi on Raspbian only supports one HDMI port, yet the Raspberry Pi 4 has two HDMI ports. Specifically, I'm using the pipplware version.

I have a situation where I would like video (as normal) to go down HDMI 0 and audio to go down HDMI 1, especially passthrough audio. The reason for this is that my TV can only handle PCM 2ch and Dolby Digital, but my audio receiver can't process 4k video, so I'm sending sound directly to it so it can handle DTS etc. which my TV can't. The setup is:
  • HDMI 0 -> TV
  • HDMI 1 -> Audio receiver

Is it possible to get both HDMI ports working on the RPi 4? Apparently, this would need a code change in Kodi itself (PISink code block in Kodi).

Just to clarify, I only care about audio on the second port, but maybe somebody else has a need to video on that port too. 

I did this using advice in this post:
https://www.raspberrypi.org/forums/viewt...4#p1526690
(2019-09-29, 22:24)armyofme Wrote: [ -> ]I did this using advice in this post:
https://www.raspberrypi.org/forums/viewt...4#p1526690
I can already get independent sound without doing anything too special. All I needed to do was to set the Raspbian default audio to HDMI 1 (right click on the audio icon) and direct Kodi to output audio to the default ALSA device.

This question specifically address passthrough audio, e.g. direct Dolby Digital and friends to a different HDMI port (HDMI 1). Did you manage to get video out on HDMI 0 and passthrough audio, not decoded PCM on HDMI 1?
(2019-09-30, 00:53)cocodude Wrote: [ -> ]
(2019-09-29, 22:24)armyofme Wrote: [ -> ]I did this using advice in this post:
https://www.raspberrypi.org/forums/viewt...4#p1526690
I can already get independent sound without doing anything too special. All I needed to do was to set the Raspbian default audio to HDMI 1 (right click on the audio icon) and direct Kodi to output audio to the default ALSA device.

This question specifically address passthrough audio, e.g. direct Dolby Digital and friends to a different HDMI port (HDMI 1). Did you manage to get video out on HDMI 0 and passthrough audio, not decoded PCM on HDMI 1? 
Now you've got me there. I'm not absolutely sure and will check tomorrow. I have video on hdmi0 to my tv and audio on hdmi1 to my amp. The films I've been watching sounded good but I didn't check that they were passthrough.
Oh no. It seems you are right. I'd not checked the messages on my amp as the sound seemed good but obviously not as good as should!! Let me know if you discover anything new to solve this issue.
(2019-10-04, 15:42)armyofme Wrote: [ -> ]Oh no. It seems you are right. I'd not checked the messages on my amp as the sound seemed good but obviously not as good as should!! Let me know if you discover anything new to solve this issue.

Thanks for checking!

I'm not sure if Kodi is decoding, say, 5.1 DD into its separate channels (i.e. sending PCM over), so if it is, you might be getting a similar result anyway. It's probably best to try some sort of sound test clip to see if you're getting all the channels you need.

For me though, I always get better results if it's passing through the signal without decoding.
(2019-09-28, 22:46)cocodude Wrote: [ -> ]My understanding is that Kodi on Raspbian only supports one HDMI port, yet the Raspberry Pi 4 has two HDMI ports.

I've used Raspbian with 2 monitors on my RPi 4B, and it worked out of the box.
I did not try Kodi yet (no v18 is available yet afaik), but Kodi itself only supports clone mode, i.e. identical resolutions.

As far as audio setup goes, someone else step in please.
(2019-10-04, 15:53)Klojum Wrote: [ -> ]I did not try Kodi yet (no v18 is available yet afaik), but Kodi itself only supports clone mode, i.e. identical resolutions.

Kodi v18 (Leia) is available and this is what I use. See The Raspberry Pi forums for installation instructions on Raspbian.
Via Pipplware sources... right.
(2019-10-05, 14:27)Klojum Wrote: [ -> ]Via Pipplware sources... right.

Is there something wrong with Pipplware sources? I'm aware it's not "official" of course so it's at your own risk, but it'd be good to know if I should be worried.
(2019-10-05, 14:29)cocodude Wrote: [ -> ]Is there something wrong with Pipplware sources?

Nope. If it's all working on the RPi4, it's all fine.
Only if things are going sideways, knock on Pipple's door first.
(2019-10-05, 14:27)Klojum Wrote: [ -> ]Via Pipplware sources... right.

FYI Kodi from the PiPplware repo is now available on raspberrypi.org repo, so you don't need to add the repo. I understand that most people use LibreELEC or OSMC on the Raspberry Pi and you don't like to support it on other platforms but some find it useful to run on Raspbian or other systems. The code is open source and available so you have to live with it. If you are not familiar with it, please refrain from commenting.
About OPs question, all I can say is that isn't supported on Kodi on the Raspberry, regardless the OS, yet at least.
(2019-10-05, 16:09)rascas Wrote: [ -> ]
(2019-10-05, 14:27)Klojum Wrote: [ -> ]Via Pipplware sources... right.

FYI Kodi from the PiPplware repo is now available on raspberrypi.org repo, so you don't need to add the repo. I understand that most people use LibreELEC or OSMC on the Raspberry Pi and you don't like to support it on other platforms but some find it useful to run on Raspbian or other systems. The code is open source and available so you have to live with it. If you are not familiar with it, please refrain from commenting.
About OPs question, all I can say is that isn't supported on Kodi on the Raspberry, regardless the OS, yet at least. 
Great news Rascas. Thanks for all your hard work getting us to this point, glad to hear it's now on the main repo. So this dual hdmi issue on Pi4 is an issue with Kodi on all platforms, osmc and libreelec too? I've just had to switch back to using one hdmi port in order to get the best sound. Be great once we can use both ports but I realise that maybe somewhere down the line yet.
(2019-10-05, 16:09)rascas Wrote: [ -> ]FYI Kodi from the PiPplware repo is now available on raspberrypi.org repo, so you don't need to add the repo.
That's good to know. These changes can go pretty quickly at times. Smile
(2019-10-05, 16:39)armyofme Wrote: [ -> ]So this dual hdmi issue on Pi4 is an issue with Kodi on all platforms, osmc and libreelec too? I've just had to switch back to using one hdmi port in order to get the best sound. Be great once we can use both ports but I realise that maybe somewhere down the line yet. 

I'm absolutely not an expert in Kodi, but I think it's unlikely to be a general problem in Kodi. I think Kodi can indeed support multiple ports, but only output video on one output at a time (or mirroring) - honestly, this is fine and actually I think it's unrelated.

What we really need is for Kodi to be able to "see" two HDMI ports. Then, hopefully, we can just choose HDMI1 for the passthrough sound output; decoded sound will still go through on HDMI0, just like video.

I believe that what's needed to be done is to change the file xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp as that's where the HDMI ports appear to be enumerated, and it's Pi specific. I'm hoping just copying the block in EnumerateDevicesEx for the HDMI device (renaming to HDMI1) would work. It's a bit of a guess though, and I bet there's something more complicated to do.
Pages: 1 2