HDMI audio 5.1 problem

Post Reply
johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

HDMI audio 5.1 problem

Post by johnbshk »

Hi everyone.

I am a retiree learning some new Ubuntu skills!

I am just starting out with the M1, with the aim to use it with Roon Bridge to enable me to play 5.1 music via HDMI to my Buchardt Audio active speakers that use WISA to receive audio from a HDMI hub.

Roon Bridge installs fine on the M1 running the Ubuntu images that comes with the M1, without error.

However, I cannot get the M1 to handshake for 5.1 with my Denon receiver. It sends stereo fine (the same HDMI cable works fine for 5.1 with my Mac Mini).

The Ubuntu Sound Settings shows HDMI 5.1 and 7.1 as options, but it clearly is only sending 2.0 as only the left and right speakers work in a test, regardless of which sound output I choose. When I use speaker-test -c6, speakers other than left and right are silent.

I checked that the ALSA is set to work with 6 channels, so I assume it may be the HDMI driver really only handles 2.0, not 5.1 or 7.1.

I am using PCM signals, not DD or other encoded signals.

Any suggestions about things to try, please?

Thanks, John

User avatar
mctom
Posts: 4135
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polski
ODROIDs: XU4, M1, H3+, SP3, N2L, M1S, N2
Location: Gdańsk, Poland
Has thanked: 609 times
Been thanked: 828 times
Contact:

Re: HDMI audio 5.1 problem

Post by mctom »

Hi!

From your tests and observations this is known:
- Roon Bridge is not a problem, as native Ubuntu tests show the same results
- The problem is either that M1 does not send any audio information except the two stereo channels, or does it in a way that the receiver does not understand.
- Hardware issues are very unlikely.

If two audio channels are working, I am not aware of any encoding or electrical problem that could silence the others. All audio data goes through the same medium.
So I'm inclined to agree your diagnosis may be correct. Perhaps not the HDMI driver per se, but some OS configuration magic may be required.
These users thanked the author mctom for the post:
johnbshk (Sat Sep 03, 2022 3:05 am)
Punk ain't no religious cult, punk means thinking for yourself!
OpenUPS
PiStackMon

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Hi, thanks for confirming that my diagnosis was correct.

I had assumed that as ODROID devices were being used for home theatre, that proper HDMI support would work.

My query now is whether this is a hardware problem or software.

If software, whether this is solvable in Ubuntu, or I need to look at using a different OS

Thanks, John

User avatar
mctom
Posts: 4135
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polski
ODROIDs: XU4, M1, H3+, SP3, N2L, M1S, N2
Location: Gdańsk, Poland
Has thanked: 609 times
Been thanked: 828 times
Contact:

Re: HDMI audio 5.1 problem

Post by mctom »

Please be patient until Monday, when Hardkernel employees could look into the issue. Odroid M1 is quite a young product, so you may have discovered something that no one has simply tested before.

Or maybe someone smarter than me would point you at the solution that I am not aware of. I do not even own a 5.1 audio system.
Punk ain't no religious cult, punk means thinking for yourself!
OpenUPS
PiStackMon

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

mctom wrote:
Sat Sep 03, 2022 3:41 am
Please be patient until Monday, when Hardkernel employees could look into the issue. Odroid M1 is quite a young product, so you may have discovered something that no one has simply tested before.

Or maybe someone smarter than me would point you at the solution that I am not aware of. I do not even own a 5.1 audio system.
No problem, I am happy to wait for advice. Thanks

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HDMI audio 5.1 problem

Post by odroid »

We've no experience of using a multi-channel audio output feature on the basic Ubuntu system.
As far as we've tested, the HDMI passthrough multi-channel output could be enabled via Kodi settings something like this.
https://wiki.odroid.com/odroid-n2/os_im ... ew_updates

Therefore, it is worth to try this OS image.
viewtopic.php?f=217&t=44564
These users thanked the author odroid for the post:
johnbshk (Mon Sep 05, 2022 3:22 am)

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

This is a very helpful start, but I do not understand why the HDMI would not be able to handle straight PCM 5.1 audio? This is not fancy stuff like passing DTS or DD. It seems strange that even the audio tests in the Ubuntu system fail for 5.1 and my receiver can only see a stereo handshake.

I really need

a) HDMI audio to handle PCM 5.1 (preferably 24 bit 96KHz, but 16 bit 48Khz would be a start)
b) to be able to run Roon Bridge, which I can access as an ARM8 executable.

Roon Bridge installed on Ubuntu and claims to be running OK using the self-check.

I can certainly try the KODI image - I assume that I should try the 64 bit version?

This link shows how someone used Corelec on an Android box (Mecool M8s Pro L, S912 Amlogic) to install the ARM8 executable:
<https://medium.com/@malindrap/turning-a ... c074e4c21a>

Did I understand correctly that trying the KODI image is probably better than waiting for a Corelec image, which currently only runs on N1?

Thanks a lot, John

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HDMI audio 5.1 problem

Post by odroid »

I hope other multi-channel audio experts can explain for your questions.

If you don't need Netflix, 64bit version might be fine.
viewtopic.php?p=349177#p349177

As far as I know, CoreELEC dev team have supported only Amlogic SoC based devices like ODROID-N2/C4 series. https://github.com/CoreELEC/CoreELEC/releases
Therefore, I don't think we can see a CoreELEC OS running on N1/M1 series any time soon.

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Understood

However, it seems that this thread suggests that the corelec team are including M1 in their testing of future versions:

<https://forum.libreelec.tv/thread/20823 ... 3288-3188/>

The log shown in the test for M1 seems to suggest that the HDMI supports 48KHz audio and this patch

<https://lore.kernel.org/lkml/1654960441 ... tech.de/T/>

suggests that 7.1 should work, so I will try with 7.1 48KHz with 16/24/32 bit.

Thanks, John

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HDMI audio 5.1 problem

Post by odroid »

LibreELEC is very different from CoreELEC.

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Sorry about my confusion!

I wondered if the problem was the EDID signal coming back from my receiver, so I tried to use get-edid and received the message that no busses have an EDID.

Is there some other way to check what the handshake information is from my receiver to the M1?

Thanks, John

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HDMI audio 5.1 problem

Post by odroid »

Try 'get-edid' command even though I am not sure you can get the number of audio channels information or not.
https://manpages.ubuntu.com/manpages/ja ... did.1.html

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Thanks ODROID.

I *did* try get-edid, but it told me that it could not read the bus, which seems odd.

Should it work on M1?

Do I need to add any options?

[please excuse me, if my questions seem ignorant, I am a newbie as regards Linux and SBCs]

Wikipedia states that:

"Audio Data Blocks contain one or more 3-byte Short Audio Descriptors (SADs). Each SAD details audio format, channel number, and bitrate/resolution capabilities of the display"

I assumed that the M1 HDMI driver must read EDID for video at least and that maybe it fails to read the Audio Data Blocks?

I wanted to see what my receiver is sending to M1, so I can understand if that might be the problem, although the same cable and received work perfectly for HDMI from my Mac mini.

Thanks, John

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HDMI audio 5.1 problem

Post by odroid »

I can't check if the current M1 Linux kernel driver can read the EDID data or not like other ODROD boards.

Can you show me sudo get-edid output?
These users thanked the author odroid for the post:
johnbshk (Tue Sep 06, 2022 8:16 pm)

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

sudo get-edid yields:

Attempting to use i2c interface
No EDID on bus 0
No EDID on bus 1
Looks like no busses have an EDID. Sorry!

I tried dmesg and found HDMI related messages

Repeatedly has these lines:
dwhdmi-rockchip fe0a000.hdmi Rate 286703000 missing: compute N dynamically

I also tried the i2c-tools and ran

i2cdetect -l
and it shows DesignWare HDMI on i2c bus 6

Thanks for your help, John

User avatar
tobetter
Posts: 13216
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1014 times
Been thanked: 2300 times
Contact:

Re: HDMI audio 5.1 problem

Post by tobetter »

johnbshk wrote:
Tue Sep 06, 2022 8:16 pm
sudo get-edid yields:

Attempting to use i2c interface
No EDID on bus 0
No EDID on bus 1
Looks like no busses have an EDID. Sorry!

I tried dmesg and found HDMI related messages

Repeatedly has these lines:
dwhdmi-rockchip fe0a000.hdmi Rate 286703000 missing: compute N dynamically

I also tried the i2c-tools and ran

i2cdetect -l
and it shows DesignWare HDMI on i2c bus 6

Thanks for your help, John
For EDID, you can run sudo get-edid -b | grep edid-parse.
For HDMI 5.1, actually we need to check if 5.1 can be supported in generic Linux kernel. The reason why Ubuntu shows 5.1 channel is that it's default audio configuration for HDMI and not customized nor tested for ODROID properly.
These users thanked the author tobetter for the post:
johnbshk (Wed Sep 07, 2022 3:33 am)

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Running get-edid into edid-parse gives the same result - no busses have EDID, which seems odd.

I believe that the generic Linux kernel should work as it uses the DesignWare HDMI driver, which supports 5.1

I will look into adding to the ALSA config, to see if that helps, as alsa-mixer does not currently do anything except switch between HDMI and analog.

I welcome any other suggestions.

Thanks, John

User avatar
istanbulls
Posts: 940
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 587 times
Been thanked: 184 times
Contact:

Re: HDMI audio 5.1 problem

Post by istanbulls »

you can't get multi-channel audio from any odroid device (I assume it's the same with other sbc's) over ubuntu or debian. the best way for this is Android or @AreaScout's Kodi for now.

If you manage to have 5.1 sound on Ubuntu, I would like to be one of your first users.

When the first Panfrost versions were released for the N2, there was multi-channel sound, but the channels were in the wrong places, eg left rear, right front.

edit:
Also, @chewitt had a patch for multi-channel audio, but I couldn't try it because I'm not very familiar with the software details.
viewtopic.php?p=265594#p265594

Edit2:
This is how you can improve the sound quality, independent of multi-channel sound.
viewtopic.php?f=176&t=38355

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

istanbulls wrote:
Thu Sep 08, 2022 7:30 pm
you can't get multi-channel audio from any odroid device (I assume it's the same with other sbc's) over ubuntu or debian. the best way for this is Android or @AreaScout's Kodi for now.

If you manage to have 5.1 sound on Ubuntu, I would like to be one of your first users.

When the first Panfrost versions were released for the N2, there was multi-channel sound, but the channels were in the wrong places, eg left rear, right front.

edit:
Also, @chewitt had a patch for multi-channel audio, but I couldn't try it because I'm not very familiar with the software details.
viewtopic.php?p=265594#p265594

Edit2:
This is how you can improve the sound quality, independent of multi-channel sound.
viewtopic.php?f=176&t=38355
Thanks so much. I know how to handle channel mapping. I will report back if I succeed in getting 24/96KHz sound and/or 5.1 working in Ubuntu or Android. John

User avatar
istanbulls
Posts: 940
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 587 times
Been thanked: 184 times
Contact:

Re: HDMI audio 5.1 problem

Post by istanbulls »

johnbshk wrote:
Fri Sep 09, 2022 1:12 am
istanbulls wrote:
Thu Sep 08, 2022 7:30 pm
you can't get multi-channel audio from any odroid device (I assume it's the same with other sbc's) over ubuntu or debian. the best way for this is Android or @AreaScout's Kodi for now.

If you manage to have 5.1 sound on Ubuntu, I would like to be one of your first users.

When the first Panfrost versions were released for the N2, there was multi-channel sound, but the channels were in the wrong places, eg left rear, right front.

edit:
Also, @chewitt had a patch for multi-channel audio, but I couldn't try it because I'm not very familiar with the software details.
viewtopic.php?p=265594#p265594

Edit2:
This is how you can improve the sound quality, independent of multi-channel sound.
viewtopic.php?f=176&t=38355
I will report back if I succeed in getting 24/96KHz sound and/or 5.1 working in Ubuntu or Android. John
You can do this in Ubuntu, I use it as 24bit-192khz, there is a link on how to do it in the previous message, but I couldn't do it on Android, if you succeed, please share and I would like to try it.
These users thanked the author istanbulls for the post:
johnbshk (Fri Dec 02, 2022 4:02 am)

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: HDMI audio 5.1 problem

Post by johnbshk »

Hi, it seems you have success with Pulse Audio, but I need to use alsa (as Roon only uses alsa).

I can't find the GitHub link referenced in the @chewitt patch - did you manage to download the alsa code?

Thanks, John

sivanbalaji
Posts: 9
Joined: Tue Apr 02, 2024 7:55 pm
languages_spoken: english
ODROIDs: m1s
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio 5.1 problem

Post by sivanbalaji »

edid file can be found in folder /sys/class/drm/*/edid. * is based on your card.

After getting the right edid file you can use edid-decode. If you do not have edid-decode you can install it by

Code: Select all

sudo apt-get install edid-decode
I also face an audio issue that I get only 48kHz PCM audio even if I play 96kHz flac audio. Towards this I've decoded my Denon-AVR edid. As per edid it supports LPCM max 8 channels of sample rate from 32kHz to 192kHz. But I get only 48kHz and 44.1kHz. Anything more than 48kHz gets down-sampled to 48kHz.

FYI, I've an odroid m1s and trying this with ubuntu 20.04 LTS.

Also I am getting only 44.1kHz with stock Android 11 provided by Odroid on m1s. I was looking at the Audio HAL and changing the codes to get the hi-res audio, without any success yet. But later thought to make sure to get the hi-res in ubuntu first as android uses linux kernel and drivers at lower level.

Coming back to the Ubuntu, came across alsa-utils aplay to find the playable auido devices. It gives only the device list not their full capabilities such as sample-rate bit-depth and number of channels. For these info came across about another util called alsacap, unfortunately only the source not binary or package and not able to compile that util on my own.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests