[cuboxi] XBMC HDMI Audio

221 views
Skip to first unread message

emveeppe

unread,
Feb 26, 2014, 12:38:40 PM2/26/14
to openbric...@googlegroups.com
In working with the xbmc-imx6 repo I found the following audio issues  which koying attributes to GeexBox http://forum.xbmc.org/showthread.php?tid=161793&pid=1637873#pid1637873

- HDMI is set default audio now which is an improvement over SPDIF, but the default is pass through audio, so AC3 don't work without changing advanced setting.  I'm sure the majority of users don't use an AVR.

- If HDMI is not on when powered up, HDMI audio cannot be configured without a restart, HDMI is clearly working because I have video.

Martin

Rudi

unread,
Feb 26, 2014, 2:03:14 PM2/26/14
to openbric...@googlegroups.com
Hi,

> - HDMI is set default audio now which is an improvement over SPDIF,

Yes. This was the case on the HummingBoard from day one. For CuBox-i
it didn't work because these devices were accidently detected as old
CuBox model.


> but the default is pass through audio, so AC3 don't work without
> changing advanced setting. I'm sure the majority of users don't
> use an AVR.

I think we set it up this way because of complaints from other users
(old CuBox). Except for RaspberryPi, which AFAIK default to this as
well. But it's very easy to change. The startup defaults for these
settings are in 'packages/xbmc/config' . Tom, what do you think ?

BTW, I'm testing using a Yamaha AVR that can do EAC3 and HD audio ;-).


> - If HDMI is not on when powered up, HDMI audio cannot be configured
> without a restart, HDMI is clearly working because I have video.

The HDMI audio drivers are currently built into the kernel. If there
is no valid EDID at the time they initialize, they simply refuse to
load. I think, they should to be loaded/unloaded dynamically on HDMI
hotplug. But I'm mot sure if this is possible without major changes.
The 3.10.x kernel may behave differently. So let's until we have
switched to the new kernel and re-check.



--

Ruediger "Rudi" Ihle


Stéphan Rafin

unread,
Feb 26, 2014, 3:12:33 PM2/26/14
to openbric...@googlegroups.com
Hi there,
> The HDMI audio drivers are currently built into the kernel. If there
> is no valid EDID at the time they initialize, they simply refuse to
> load. I think, they should to be loaded/unloaded dynamically on HDMI
> hotplug. But I'm mot sure if this is possible without major changes.
> The 3.10.x kernel may behave differently. So let's until we have
> switched to the new kernel and re-check.
>
>
>

Are you sure it is about EDID ? I would have though the EEPROM holding
it can always be read...
Yet it is very true that if tv is not powered on then the hdmi audio
driver does not initialize properly and your conclusion is wise
I am also very interested by the results with 3.10.x kernel...

Stephan


emveeppe

unread,
Feb 26, 2014, 5:36:15 PM2/26/14
to openbric...@googlegroups.com
After I turn on my TV I get HDMI audio with

aplay -D hw:1,0 music.wav

even when it is greyed out in XBMC (on SPDIF)

Martin

Rudi

unread,
Feb 27, 2014, 2:21:22 AM2/27/14
to openbric...@googlegroups.com
Hi Stephan,

> Are you sure it is about EDID ? I would have though the EEPROM holding
> it can always be read...

At least the old platform the EDID readout it triggered by the hotplog detect, which is
a pin on the HDMI connector. I'm not sure if some computer montors leave this enabled
when in standby. At leaset my TV will shut down off when powered of. And, btw. toggles
it multiple times during power on, which caused some weird race conditions on the old CuBox.


> Yet it is very true that if tv is not powered on then the hdmi audio
> driver does not initialize properly and your conclusion is wise

I was referring to the situation where no monitor is plugged during boot.


> I am also very interested by the results with 3.10.x kernel...

Yep. I would not spend any effort in the old kernel when the new one is so close.



--

Ruediger "Rudi" Ihle


Rudi

unread,
Feb 28, 2014, 3:02:01 AM2/28/14
to openbric...@googlegroups.com
Hi,

> After I turn on my TV I get HDMI audio with
>
> aplay -D hw:1,0 music.wav
>
> even when it is greyed out in XBMC (on SPDIF)

Hmm, the device seems to be there, indeed. However, XBMC doesn't re-enumerate. We need
to look deeper into that. The new 3.10. kernel will be in place very soon. I would not
spend any time on that before we have switched...



--

Ruediger "Rudi" Ihle


Thomas Genty

unread,
Mar 1, 2014, 4:48:56 AM3/1/14
to openbric...@googlegroups.com
Le 26/02/2014 20:03, Rudi a écrit :
> Hi,
>
>> - HDMI is set default audio now which is an improvement over SPDIF,
>
> Yes. This was the case on the HummingBoard from day one. For CuBox-i
> it didn't work because these devices were accidently detected as old
> CuBox model.
>
should rework now on kernel 3.10.30
>
>> but the default is pass through audio, so AC3 don't work without
>> changing advanced setting. I'm sure the majority of users don't
>> use an AVR.
>
> I think we set it up this way because of complaints from other users
> (old CuBox). Except for RaspberryPi, which AFAIK default to this as
> well. But it's very easy to change. The startup defaults for these
> settings are in 'packages/xbmc/config' . Tom, what do you think ?
disable for now
I can only hear noise playing BBB_1080p
>
> BTW, I'm testing using a Yamaha AVR that can do EAC3 and HD audio ;-).
>

Tom

Rudi

unread,
Mar 1, 2014, 8:17:29 AM3/1/14
to openbric...@googlegroups.com
Hi Tom,


> I can only hear noise playing BBB_1080p

Are we sure that 24bit formats are disabled ? Can you post the lines
from xbmc.log that list the audio devices present at startup ?




--

Ruediger "Rudi" Ihle


Thomas Genty

unread,
Mar 1, 2014, 8:42:54 AM3/1/14
to openbric...@googlegroups.com
Le 01/03/2014 14:17, Rudi a écrit :
> Hi Tom,
>
>
>> I can only hear noise playing BBB_1080p
> Are we sure that 24bit formats are disabled ? Can you post the lines
> from xbmc.log that list the audio devices present at startup ?
>
>
>
14:45:09 T:1969623040 NOTICE: Found 1 Lists of Devices
14:45:09 T:1969623040 NOTICE: Enumerated ALSA devices:
14:45:09 T:1969623040 NOTICE: Device 1
14:45:09 T:1969623040 NOTICE: m_deviceName :
sysdefault:CARD=imxspdif
14:45:09 T:1969623040 NOTICE: m_displayName : imx-spdif
14:45:09 T:1969623040 NOTICE: m_displayNameExtra: S/PDIF
14:45:09 T:1969623040 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
14:45:09 T:1969623040 NOTICE: m_channels : FL,FR
14:45:09 T:1969623040 NOTICE: m_sampleRates : 32000,44100,48000
14:45:09 T:1969623040 NOTICE: m_dataFormats :
AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S24NE4,AE_FMT_S16NE,AE_FMT_S16LE
14:45:09 T:1969623040 NOTICE: Device 2
14:45:09 T:1969623040 NOTICE: m_deviceName :
sysdefault:CARD=imxhdmisoc
14:45:09 T:1969623040 NOTICE: m_displayName : imx-hdmi-soc
14:45:09 T:1969623040 NOTICE: m_displayNameExtra: HDMI
14:45:09 T:1969623040 NOTICE: m_deviceType : AE_DEVTYPE_HDMI
14:45:09 T:1969623040 NOTICE: m_channels : FL,FR
14:45:09 T:1969623040 NOTICE: m_sampleRates :
32000,44100,48000,96000
14:45:09 T:1969623040 NOTICE: m_dataFormats :
AE_FMT_LPCM,AE_FMT_DTSHD,AE_FMT_TRUEHD,AE_FMT_EAC3,AE_FMT_DTS,AE_FMT_AC3,AE_FMT_AAC,AE_FMT_S16NE,AE_FMT_S16LE
Did I miss something ?

Tom

Rudi

unread,
Mar 1, 2014, 9:02:03 AM3/1/14
to openbric...@googlegroups.com
Hi Tom,


Am 01.03.2014 14:42, schrieb Thomas Genty:

>>> I can only hear noise playing BBB_1080p
>> Are we sure that 24bit formats are disabled ? Can you post the lines
>> from xbmc.log that list the audio devices present at startup ?
>>
>>
>>
> 14:45:09 T:1969623040 NOTICE: Found 1 Lists of Devices
> 14:45:09 T:1969623040 NOTICE: Enumerated ALSA devices:
> 14:45:09 T:1969623040 NOTICE: Device 1
> 14:45:09 T:1969623040 NOTICE: m_deviceName :
> sysdefault:CARD=imxspdif
> 14:45:09 T:1969623040 NOTICE: m_displayName : imx-spdif
> 14:45:09 T:1969623040 NOTICE: m_displayNameExtra: S/PDIF
> 14:45:09 T:1969623040 NOTICE: m_deviceType :
> AE_DEVTYPE_IEC958
> 14:45:09 T:1969623040 NOTICE: m_channels : FL,FR
> 14:45:09 T:1969623040 NOTICE: m_sampleRates :
> 32000,44100,48000
> 14:45:09 T:1969623040 NOTICE: m_dataFormats :
> AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S24NE4,AE_FMT_S16NE,AE_FMT_S16LE


As we see, AE_FMT_S24NE4 is enabled. That is bad, because there used to
be some unresolved issues with this. There were two patches that
(temporary) disabled 24bit formats. One was for analog output (by
Stephan) and one was for S/PDIF (by myself). I guess they got lost.
There is a discussion about this here:

https://github.com/xbmc-imx6/xbmc/issues/16#issuecomment-36176273



> 14:45:09 T:1969623040 NOTICE: m_deviceName :
> sysdefault:CARD=imxhdmisoc
> 14:45:09 T:1969623040 NOTICE: m_displayName : imx-hdmi-soc
> 14:45:09 T:1969623040 NOTICE: m_displayNameExtra: HDMI
> 14:45:09 T:1969623040 NOTICE: m_deviceType : AE_DEVTYPE_HDMI
> 14:45:09 T:1969623040 NOTICE: m_channels : FL,FR
> 14:45:09 T:1969623040 NOTICE: m_sampleRates :
> 32000,44100,48000,96000
> 14:45:09 T:1969623040 NOTICE: m_dataFormats :
> AE_FMT_LPCM,AE_FMT_DTSHD,AE_FMT_TRUEHD,AE_FMT_EAC3,AE_FMT_DTS,AE_FMT_AC3,AE_FMT_AAC,AE_FMT_S16NE,AE_FMT_S16LE

Oh. Some interresting new formats show up here...



--

Ruediger "Rudi" Ihle


Thomas Genty

unread,
Mar 1, 2014, 9:35:50 AM3/1/14
to openbric...@googlegroups.com
Working on it

Tom

Thomas Genty

unread,
Mar 1, 2014, 9:50:14 AM3/1/14
to openbric...@googlegroups.com
new log :
01:15:02 T:1970442240 NOTICE: Found 1 Lists of Devices
01:15:02 T:1970442240 NOTICE: Enumerated ALSA devices:
01:15:02 T:1970442240 NOTICE: Device 1
01:15:02 T:1970442240 NOTICE: m_deviceName :
sysdefault:CARD=imxspdif
01:15:02 T:1970442240 NOTICE: m_displayName : imx-spdif
01:15:02 T:1970442240 NOTICE: m_displayNameExtra: S/PDIF
01:15:02 T:1970442240 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
01:15:02 T:1970442240 NOTICE: m_channels : FL,FR
01:15:02 T:1970442240 NOTICE: m_sampleRates : 32000,44100,48000
01:15:02 T:1970442240 NOTICE: m_dataFormats :
AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S16NE,AE_FMT_S16LE
01:15:02 T:1970442240 NOTICE: Device 2
01:15:02 T:1970442240 NOTICE: m_deviceName :
sysdefault:CARD=imxhdmisoc
01:15:02 T:1970442240 NOTICE: m_displayName : imx-hdmi-soc
01:15:02 T:1970442240 NOTICE: m_displayNameExtra: HDMI
01:15:02 T:1970442240 NOTICE: m_deviceType : AE_DEVTYPE_HDMI
01:15:02 T:1970442240 NOTICE: m_channels : FL,FR
01:15:02 T:1970442240 NOTICE: m_sampleRates :
32000,44100,48000,96000
01:15:02 T:1970442240 NOTICE: m_dataFormats :
AE_FMT_LPCM,AE_FMT_DTSHD,AE_FMT_TRUEHD,AE_FMT_EAC3,AE_FMT_DTS,AE_FMT_AC3,AE_FMT_AAC,AE_FMT_S16NE,AE_FMT_S16LE

and enabling passthrough give me only noise ...
so let's passtrought disable for now

Pushing the new patch for spdif out

Tom
Reply all
Reply to author
Forward
0 new messages