Ubuntu 16.04 passthrough

Moderators: mdrjr, odroid

Ubuntu 16.04 passthrough

Unread postby pikilon » Mon Aug 01, 2016 7:41 pm

How to check if some of the upgrades did solves the absence of HDMI passthrough in Kodi?

Is there a log of changes somewhere?

Thanks
pikilon
 
Posts: 3
Joined: Mon Jul 11, 2016 12:51 am
languages_spoken: english
ODROIDs: odroid c2

Re: Ubuntu 16.04 passthrough

Unread postby odroid » Tue Aug 02, 2016 3:36 pm

There is no update about the Kodi passthrough feature.
We will check it later.
User avatar
odroid
Site Admin
 
Posts: 24617
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Ubuntu 16.04 passthrough

Unread postby wrxtasy » Wed Aug 03, 2016 1:33 pm

For Kodi on a minimal Linux distro like LibreELEC I had to:

1) Remove all HardKernel HiFi Shield - Kernel Code hacks to actually allow passthrough as per standard AML coding.
2) Patch Kodi extensively for Audio Passthrough support.

Audio in Linux AML Kodi is an absolute patched mess at the moment, and its going to get worse for Kodi Krypton unless resources are thrown at the problem by knowledgable C++ coders and AML Audio Kernel Gurus.

A bunch of people are also asking for HiFi Shield support in Kodi that allows audio passthrough to work alongside.
If users want this to be fixed, then HardKernel themselves need to put the work in, exactly like WeTek are doing for the Kodi Krypton codebase at the moment.

Support for HK specific Hardware and Audio passthrough will be impossible in Kodi unless this is done going forward into the future.
LibreELEC Krypton C1(+) HERE
LibreELEC Krypton C2 HERE
User avatar
wrxtasy
 
Posts: 1288
Joined: Wed May 13, 2015 1:59 pm
Location: Australia
languages_spoken: english
ODROIDs: C1, C1+, C2

Re: Ubuntu 16.04 passthrough

Unread postby Pienoet » Wed Aug 03, 2016 11:40 pm

odroid wrote:There is no update about the Kodi passthrough feature.
We will check it later.


When is later?
Pienoet
 
Posts: 367
Joined: Sun May 10, 2015 10:04 pm
languages_spoken: english Dutch

Re: Ubuntu 16.04 passthrough

Unread postby odroid » Thu Aug 04, 2016 1:33 pm

We've checked it from last night.
After adding 'AE_SINK=ALSA' environment, Kodi could activate the passthrough in C1+ Ubunut Kodi.
But C2 has a different behavior. Look into the Kodi source code now.
User avatar
odroid
Site Admin
 
Posts: 24617
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Ubuntu 16.04 passthrough

Unread postby Pienoet » Fri Aug 05, 2016 2:33 am

Great!

Hope you can find something too have dts hd and true hd passtrough on C2.
Pienoet
 
Posts: 367
Joined: Sun May 10, 2015 10:04 pm
languages_spoken: english Dutch

Re: Ubuntu 16.04 passthrough

Unread postby tdesaules » Fri Aug 12, 2016 1:05 am

Hi,

So just using AE_SINK=ALSA kodi will make kodi passthrough over HDMI on pulseaudio ?

Thanks
tdesaules
 
Posts: 6
Joined: Sat Jan 23, 2016 9:22 pm
languages_spoken: english

Re: Ubuntu 16.04 passthrough

Unread postby odroid » Fri Aug 12, 2016 7:08 pm

Nope. we need to modify the Kodi 16.1 source code.
But it is quite complicated and we need to learn the audio framework via studying the Kodi source code intensively.
User avatar
odroid
Site Admin
 
Posts: 24617
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Ubuntu 16.04 passthrough

Unread postby tdesaules » Fri Aug 12, 2016 9:39 pm

ok... so right now, no way to have a passthrough over HDMI on C1+ or C2 -_- so sad :'(
tdesaules
 
Posts: 6
Joined: Sat Jan 23, 2016 9:22 pm
languages_spoken: english

Re: Ubuntu 16.04 passthrough

Unread postby pikilon » Wed Aug 17, 2016 5:09 pm

It's the main flaw of odroid, we can't use rpi images directly (I heard orange pi plus 2 does) and it doesn't have usb 3.
Anything else is perfect
pikilon
 
Posts: 3
Joined: Mon Jul 11, 2016 12:51 am
languages_spoken: english
ODROIDs: odroid c2

Re: Ubuntu 16.04 passthrough

Unread postby countzero » Sat Aug 27, 2016 4:36 am

Dear Hardkernel Odroid-Team,

please try to correct some parts of your kernel audio code so that the full Audio Passthrough potential can be unleashed within Ubuntu / OdroBian & CO.
Currently only LibreElec on Odroid (i.e. C2) is able to do that.

Thanks and best regards,
count
countzero
 
Posts: 15
Joined: Tue Jul 05, 2016 6:31 pm
Location: Vienna/Austria
languages_spoken: german, english
ODROIDs: Odroid-C2

Re: Ubuntu 16.04 passthrough

Unread postby odroid » Sat Aug 27, 2016 11:30 am

Our HDMI audio kernel driver seems to be fine. But we couldn't find which portion of the Kodi source code should be modified for the passthrough functionality due to very limited knowledge on Kodi system.

If you can see/compare the code, please help us.
User avatar
odroid
Site Admin
 
Posts: 24617
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Sat Sep 10, 2016 11:25 pm

odroid wrote:Our HDMI audio kernel driver seems to be fine. But we couldn't find which portion of the Kodi source code should be modified for the passthrough functionality due to very limited knowledge on Kodi system.

If you can see/compare the code, please help us.


Hi,
I personally can not help, but maybe its worth to talk to @wrxtasy. He made a github pull request regarding DTS-HD MA HDMI Audio Passthrough, but it has not been accepted because it breaks HiFi-shield support (here). So generally it is possible.
If it is too hard to get both passthrough AND HiFi-shield working, I'd propose a configuration option and/or a script like for the C1 that one can choose to have only one of both working.
I personally think, that there are many people who'd prefer a working passthrough feature over the HiFi-shield support ;) .

Thanks
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby wrxtasy » Sun Sep 11, 2016 4:34 pm

Curently testing:

Unsupported AVR Audio codecs like 5.1/7.1 FLAC and AAC, now get decoded to Multichannel PCM (>2.0) Audio with LibreELEC Kodi as well.
This gives you lossless HD Audio output from FLAC audio sources or lossless HD Audio from DTS-HD MA/HRA or TrueHD if your AVR only supports Multichannel PCM.
EAC3 Passthrough has been added too. :)

You will find the AML-M8AUDIO.conf and Kodi Jarvis audio patches needed here:
https://github.com/wrxtasy/LibreELEC.tv ... 10e1957aab

The bang for the buck when using an AML S905 like the C2 as a LibreELEC / Kodi media player is now outstanding value compared to what the Intel or RPi camps are serving up. Even HDMI 2.0 is rare as hens teeth with Intel.
LibreELEC Krypton C1(+) HERE
LibreELEC Krypton C2 HERE
User avatar
wrxtasy
 
Posts: 1288
Joined: Wed May 13, 2015 1:59 pm
Location: Australia
languages_spoken: english
ODROIDs: C1, C1+, C2

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Tue Sep 13, 2016 10:16 pm

wrxtasy wrote:Curently testing:

Unsupported AVR Audio codecs like 5.1/7.1 FLAC and AAC, now get decoded to Multichannel PCM (>2.0) Audio with LibreELEC Kodi as well.
This gives you lossless HD Audio output from FLAC audio sources or lossless HD Audio from DTS-HD MA/HRA or TrueHD if your AVR only supports Multichannel PCM.
EAC3 Passthrough has been added too. :)

You will find the AML-M8AUDIO.conf and Kodi Jarvis audio patches needed here:
https://github.com/wrxtasy/LibreELEC.tv ... 10e1957aab

The bang for the buck when using an AML S905 like the C2 as a LibreELEC / Kodi media player is now outstanding value compared to what the Intel or RPi camps are serving up. Even HDMI 2.0 is rare as hens teeth with Intel.


Yes, I know that passthrough works like a charm on your LibreELEC releases. And to be honest, this feature is the main reason why I use LibreELEC and not the official Ubuntu.
But from my point of view, the lack of this feature is one of the biggest drawbacks of the ODROID-Cs. Some friends already asked me "Why don't you just use a Raspberry Pi?!" :roll: ...
I was really right before opening a poll to let people vote for either HiFi-shield or passthrough support. But I was afraid that this could split the community as this would bring HK into an inconvinient situation as well...

Thats why I suggested for some kind of configuration option, to let the user choose to have at least one of both options (if both just don't work simultaniousely).
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby wrxtasy » Wed Sep 14, 2016 12:21 am

Just for info incase someone wants to experiment with Kodi Ubuntu.....

That Github Link I posted for Kodi Jarvis modifications should contain the patches needed for whomever is distributing the Kodi Jarvis version for Ubuntu on the C2.

Specifically these additions and patches:
projects/Odroid_C2/patches/linux/li04-Revert.all.Odroid.Specific.Sound.Mods.for.HiFi.Shield.and.usb_dac.patch
projects/Odroid_C2/filesystem/usr/share/alsa/cards/AML-M8AUDIO.conf
projects/Odroid_C2/patches/kodi/a02-Multichannel-PCM-and-HD-Audio-passthrough.patch
patches/linux/li40-sound_soc_aml_m8-Report-only-working-frequecies-and-bit-depths.patch

We now have confirmation that with those Linux & Kodi patches the HiFi Shield works out of the box with the new Multichannel PCM LibreELEC 7.1 update.
See this post here:
viewtopic.php?f=144&t=22452&start=250#p159652

I also patched in a 8 Channel PCM update to the C2's Kernel:
https://github.com/wrxtasy/LibreELEC.tv ... ture.patch
And I am using a slightly A/V updated Kernel to HK's 3.14 master:
https://github.com/wrxtasy/linux/commit ... dc2-3.14.y
LibreELEC Krypton C1(+) HERE
LibreELEC Krypton C2 HERE
User avatar
wrxtasy
 
Posts: 1288
Joined: Wed May 13, 2015 1:59 pm
Location: Australia
languages_spoken: english
ODROIDs: C1, C1+, C2

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Wed Sep 14, 2016 4:08 pm

wrxtasy wrote:We now have confirmation that with those Linux & Kodi patches the HiFi Shield works out of the box with the new Multichannel PCM LibreELEC 7.1 update.

Ok, I think this is good! I Am very willing to do some tests, but could you please explain, how to apply these patches? Let's assume the situation, that I have a brand new C2 with the official Ubuntu OS on it. So what now?

Cheers
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby Brian.K » Thu Sep 22, 2016 5:04 pm

Enabling HDMI-Passthrough for Kodi Ubuntu

1. Download ODROID-HDMI.conf alsa configuration file.
Code: Select all
$ sudo wget https://git.io/vi7df -O /usr/share/alsa/cards/ODROID-HDMI.conf

2. Run Kodi with AE_SINK=ALSA
Code: Select all
$ AE_SINK=ALSA kodi

3. Set the HDMI-Passthrough function in Kodi
  • SYSTEM -> Settings -> System (Settings level >= Advanced) -> Audio output
  • Check Enable passthrough
  • Set the Passthrough output device to ODROID-HDMI, S/PDIF
4. Done. Enjoy with ODROID-C2. :-)

EDIT:
* Added missing command 'wget' in step 1.
Last edited by Brian.K on Tue Sep 27, 2016 6:27 pm, edited 2 times in total.
User avatar
Brian.K
 
Posts: 245
Joined: Tue Sep 15, 2015 7:30 pm
Location: South Korea
languages_spoken: English, Korean
ODROIDs: XU4, C1+, C2

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Fri Sep 23, 2016 7:06 am

@Brian.K

Great! I will test tomorrow and come back to report :) . Thank you in advance!
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Sat Sep 24, 2016 5:43 am

Ok, I applied the changes described by Brian.K.

1. I think there is something like "wget" missing in hour post:
Brian.K wrote:
Code: Select all
$ sudo https://git.io/vi7df -O /usr/share/alsa/cards/ODROID-HDMI.conf
should be
Code: Select all
$ sudo wget https://git.io/vi7df -O /usr/share/alsa/cards/ODROID-HDMI.conf
(at least this made it work for me ;) )

2. Passthrough seems to work for the video files I have. My AVR switches to "Dolby Digital", I think I don't have files with a DTS-*** track to test...

3. If one likes to have a Kodi desktop launcher with "AE_SINK=ALSA kodi" it should look like this:
Code: Select all
[Desktop Entry]
Version=1.0
Name=Kodi media center
GenericName=Media center
Comment=Manage and view your media
Exec=bash -c 'AE_SINK=ALSA kodi'
Icon=kodi
Terminal=true
Type=Application
Categories=AudioVideo;Video;Player;TV;
Actions=Fullscreen;Standalone;
Name[de_DE]=Kodi media center Passthrough

4. There are some kind of "sound dropouts" from time to time. It's liks there is a "gap" in the playback of about 1/10 seconds or something. Did anybody notice that as well?

Thank you!
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby AFUN » Sun Oct 02, 2016 3:28 am

@Brian.K
@Jojo

I applied the changes to my Ubuntu C2. Unfortunately the Kodi passthrough option still didn't work. Did you apply the Kodi patches that have been suggested by wrxtasy or any kernel patches? I tried the passthrough function with the original updated image of Ubuntu 16.04
AFUN
 
Posts: 2
Joined: Sun Oct 02, 2016 12:43 am
languages_spoken: english german
ODROIDs: C2

Re: Ubuntu 16.04 passthrough

Unread postby Jojo » Mon Oct 03, 2016 5:49 am

AFUN wrote:@Brian.K
@Jojo

I applied the changes to my Ubuntu C2. Unfortunately the Kodi passthrough option still didn't work. Did you apply the Kodi patches that have been suggested by wrxtasy or any kernel patches? I tried the passthrough function with the original updated image of Ubuntu 16.04

Well, I did nothing very special. I used the official Ubuntu release and did what @Brian.K described. Basically this is nothing more than downloading (and copying ) this config file and then start Kodi by the "AE_SINK=ALSA kodi" command.
And what do you mean by "does not work"? Does the option not show up in the Kodi config, or does your AVR not detect the expected audio format?
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html
Jojo
 
Posts: 437
Joined: Mon May 18, 2015 12:13 am
Location: Germany
languages_spoken: english, german
ODROIDs: C1, C2

Re: Ubuntu 16.04 passthrough

Unread postby RoBird » Mon Oct 03, 2016 7:15 pm

Same here.
Yesterday i receive my new shiny C2. First I updated software and next start Kodi. Big disappointment - no multi channel sound on receiver.

After downloading ODROID-HDMI.conf and start kodi with AE_SINK=ALSA kodi new device ODROID-HDMI, S/PDIF show up.
When I enable passthru through this device no sound comming from receiver, when passthru is disabled sound appears, but no multichannel.
RoBird
 
Posts: 1
Joined: Mon Oct 03, 2016 7:12 pm
languages_spoken: polish
ODROIDs: C2

Re: Ubuntu 16.04 passthrough

Unread postby Brian.K » Tue Oct 04, 2016 10:10 am

I tested on YAMAHA RX-V477
Please describe the problem in more detail(dmesg, Kodi log, test SW/HW environments).
User avatar
Brian.K
 
Posts: 245
Joined: Tue Sep 15, 2015 7:30 pm
Location: South Korea
languages_spoken: English, Korean
ODROIDs: XU4, C1+, C2

Re: Ubuntu 16.04 passthrough

Unread postby AFUN » Fri Oct 14, 2016 8:20 am

Mmh, I still didn't get it to work. When I start kodi with the AE_SINK=ALSA environment, the audio source defaults to "Playback/record through the PulseAudio sound server". After that I select the passthrough option to the ODROID-HDMI, S/PDIF device. But still the sound is playing only from the default sink that I selected in pavucontrol. Either "ODROID-DAC Analog Stereo" or ODROID-HDMI Analog Stereo" is playing. The Configuration menu of pavuconrol offers a couple of possible profiles for the ODROID-HDMI device. But after some fooling around with these Analog* only options I selected "off" and the "Analog Stereo Duplex" again, and the ODROID-HDMI, S/PDIF option as a Kodi passthrough device disappeared completely. (Even after several system reboots.) I don't know, how to fix this. Any advice?

Cheers
AFUN
 
Posts: 2
Joined: Sun Oct 02, 2016 12:43 am
languages_spoken: english german
ODROIDs: C2

Re: Ubuntu 16.04 passthrough

Unread postby Philibert » Thu Feb 09, 2017 5:48 am

Hello there,

I tried the procedure described above to get the pass-through feature working but no luck : even if it is activated with the ODROID-HDMI, S/PDIF device it is still down-mixed to a 2.0 channels source...

Also, if I start kodi without root privileges, only the audio is played, no video...
Philibert
 
Posts: 2
Joined: Mon Jul 11, 2016 3:29 am
languages_spoken: english, french
ODROIDs: ODROID C2

Re: Ubuntu 16.04 passthrough

Unread postby roboogle » Fri Apr 21, 2017 4:54 pm

Exactly as experienced by Jojo ยป Fri Sep 23, 2016 9:43 pm:

HDMI passthrough activated and actually working, but I also can observe this major issue:

4. There are some kind of "sound dropouts" from time to time. It's liks there is a "gap" in the playback of about 1/10 seconds or something.


The "dropout" happens at apparently random times, once every 10..30 seconds.

Anyone else? Any clue about what it could be due to?
This happens only with Ubuntu 16.04, and I never noticed it with LibreElec.
roboogle
 
Posts: 1
Joined: Fri Apr 21, 2017 4:43 pm
languages_spoken: english
ODROIDs: C2


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 4 guests