Linux HDMI - HD audio passthrough bug ?
#1
Hi
In audio topic maybe someone can give me some light

mainboard Asrock J3455-ITX (Apollo Lake, Broxton)



i checked cat /proc/asound/card0/eld\#2.0"
Code:
monitor_present         1
eld_valid               1
monitor_name            marantz-AVR
connection_type         DisplayPort
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0x4935
product_id              0x2d
port_id                 0x0
support_hdcp            0
support_ai              1
audio_sync_delay        0
speakers                [0x5f] FL/FR LFE FC RL/RR RC RLC/RRC
sad_count               7
sad0_coding_type        [0x1] LPCM
sad0_channels           8
sad0_rates              [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits               [0xe0000] 16 20 24
sad1_coding_type        [0x7] DTS
sad1_channels           6
sad1_rates              [0x6c0] 44100 48000 88200 96000
sad1_max_bitrate        1536000
sad2_coding_type        [0x2] AC-3
sad2_channels           6
sad2_rates              [0xe0] 32000 44100 48000
sad2_max_bitrate        640000
sad3_coding_type        [0xb] DTS-HD
sad3_channels           8
sad3_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad4_coding_type        [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad4_channels           8
sad4_rates              [0xc0] 44100 48000
sad5_coding_type        [0xc] MLP (Dolby TrueHD)
sad5_channels           8
sad5_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad6_coding_type        [0x9] DSD (One Bit Audio)
sad6_channels           6
sad6_rates              [0x40] 44100

Code:
cat /proc/asound/card0/codec\#2 | grep HBR
  Pincap 0x0b000094: OUT Detect HBR HDMI DP
  Pincap 0x0b000094: OUT Detect HBR HDMI DP
  Pincap 0x0b000094: OUT Detect HBR HDMI DP

showing me support HD audio, also in DP codec info showing me HBR support

from kodi

Code:
21:12:06.572 T:139961736878144  NOTICE:     Device 5
21:12:06.572 T:139961736878144  NOTICE:         m_deviceName      : hdmi:CARD=PCH,DEV=0
21:12:06.572 T:139961736878144  NOTICE:         m_displayName     : HDA Intel PCH
21:12:06.572 T:139961736878144  NOTICE:         m_displayNameExtra: MJI marantz-AVR on DisplayPort #0
21:12:06.572 T:139961736878144  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
21:12:06.572 T:139961736878144  NOTICE:         m_channels        : FL,FR,LFE,FC,BL,BR,BC,BLOC,BROC
21:12:06.572 T:139961736878144  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
21:12:06.572 T:139961736878144  NOTICE:         m_dataFormats     : AE_FMT_RAW,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_RAW
21:12:06.572 T:139961736878144  NOTICE:         m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,ST​REAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512,STREAM_TYPE_EAC3,STREAM_TYPE_TRUEHD

but no luck with any hd audio file - and debug give me strange information like
Code:
21:17:11.548 T:140489013737536    INFO: GL: Maximum texture width: 8192
21:17:11.548 T:140488908728064   DEBUG: CActiveAESink::OpenSin554 T:1[code]40488908728064    INFO: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
21:17:11.554 T:140488908728064   DEBUG: CAESinkALSA::SelectALSAChannelMap - Selected ALSA map "FL FR"
21:17:11.555 T:140488908728064    INFO: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
21:17:11.555 T:140488908728064    INFO: CAESinkALSA::InitializeHW - Using data format AE_FMT_S32NE
21:17:11.555 T:140488908728064   DEBUG: CAESinkALSA::InitializeHW - Request: periodSize 2205, bufferSize 8820
21:17:11.556 T:140488908728064   DEBUG: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
21:17:11.558 T:140488908728064   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
21:17:11.558 T:140488908728064   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL,FR
21:17:11.558 T:140488908728064   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL,FR (ALSA: FL FR)
21:17:11.558 T:140488908728064   DEBUG: CActiveAESink::OpenSink - ALSA Initialized:
21:17:11.558 T:140488908728064   DEBUG:   Output Device : HDA Intel PCH
21:17:11.558 T:140488908728064   DEBUG:   Sample Rate   : 44100
21:17:11.558 T:140488908728064   DEBUG:   Sample Format : AE_FMT_S32NE
21:17:11.558 T:140488908728064   DEBUG:   Channel Count : 2
21:17:11.558 T:140488908728064   DEBUG:   Channel Layout: FL,FR
21:17:11.558 T:140488908728064   DEBUG:   Frames        : 2205
21:17:11.558 T:140488908728064   DEBUG:   Frame Size    : 8
21:17:11.561 T:140488917120768   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted

any idea ? :/ that Kodi bug ?

what is strange please look on screen - info from procesing audio - there is 5 RAW channels
and in log file 2ch. FL,FR ?

here screenshoots (based on samples from log files)
http://imgur.com/a/frCvU

and here full logs
https://www.sendspace.com/file/mctpzg


Just please advice if i should raport bug to drm-intel or asound of kernel or this is Kodi issue ?

Thanks @flyingernst for logs from AVR
(on my harman i had problem with EDID so i wanted by sure the other users (with correct EDID) also had issue)

PS. A/V sync disabled was.
tested on latest official LibreELEC (kernel 4.8.x ) and dev builds with latest kernel drm-intel-nightly 4.9rc6
few people with Apollo and Kaby lake raported same issue
Reply
#2
You cut the totally wrong part from your kodi log - looking into it, one can directly see that kodi successfully opens 8 channel RAW 192 khz.

You have a kernel bug here and should investigate with the Linux / Kernel people.

Btw. just check from commandline. Stop kodi (on LE: systemctl stop kodi) and send a dts-hd file yourself to the HW directly using ALSA. There are a whole lot of howtos out there on checking that.

It has nothing, absolutely nothing to do with kodi, we just use ALSA API.

Samples: http://www.avenard.org/files/media/media...ssthrough/
Howto-Test:
Code:
#TrueHD
aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.truehd.anssi1.ff.60s.spdif
#DTS-HD
aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.dtshd.anssi1.ma-71-24.spdif
Make sure PCH,DEV=0 matches your setup (it does with the above log), but if you try it on another system
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
I tried, my system is 5.1 co i test with your -c8 after that i changed on -c6

Code:
Playing raw data 'testi.truehd.anssi1.ff.60s.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 6
Warning: rate is not accurate (requested = 19200Hz, got = 32000Hz)
         please, try the plug plugin

aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r19200 testi.dtshd.anssi1.ma-71-24.spdif
Playing raw data 'testi.dtshd.anssi1.ma-71-24.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 8
aplay: set_params:1303: Channels count non available

aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c6 -fs16_le -r19200 testi.dtshd.anssi1.ma-71-24.spdif
Playing raw data 'testi.dtshd.anssi1.ma-71-24.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 6
Warning: rate is not accurate (requested = 19200Hz, got = 32000Hz)
Reply
#4
Fritsch, did not make your test, will not be able to today. But one thing: Whenever it is the case, that LE gives out an audio signal (DTS-HD in 5.1 for example), what only happens on some files --> then AVR shows 7.1 LPCM with 192kHz and gives ugly noises...so it is not passing the correct audio codec towards the AVR. I will send you my logs too.

Sofern LE überhaupt einen Ton ausspuckt bei HD Audio-Tests, zum Beispiel bei einem meiner DTS HD Testfiles, dann kommen grausame Töne aus dem Lautsprecher...so ein kleiner Alienangriff auf die Ohren :-)....und der AVR zeigt LPCM 7.1 192kHz, egal was die Quelle eigentlich hergibt. Ich schick dir mal die vollen Logs welche ich auch piotrasd geschickt habe
Reply
#5
(2016-11-26, 17:02)piotrasd Wrote: I tried, my system is 5.1 co i test with your -c8 after that i changed on -c6

Code:
Playing raw data 'testi.truehd.anssi1.ff.60s.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 6
Warning: rate is not accurate (requested = 19200Hz, got = 32000Hz)
         please, try the plug plugin

aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r19200 testi.dtshd.anssi1.ma-71-24.spdif
Playing raw data 'testi.dtshd.anssi1.ma-71-24.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 8
aplay: set_params:1303: Channels count non available

aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c6 -fs16_le -r19200 testi.dtshd.anssi1.ma-71-24.spdif
Playing raw data 'testi.dtshd.anssi1.ma-71-24.spdif' : Signed 16 bit Little Endian, Rate 19200 Hz, Channels 6
Warning: rate is not accurate (requested = 19200Hz, got = 32000Hz)

oO. We passthrough dtshd as 8 channels 192 kHz. Always! No matter how many speakers attached. It's passthrough. The avr copes with it. It's a bandwidth thing. The first log tells it loud and clear. Issue opening 8/192 driver bug.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Looking more exact, "we" missed a "zero" (0) for your 19200, it should be 192000 <- 192 khz and not 19.2 khz.

All the kodi logs are useless - I need to know what happens with the above commands :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
A similar problem with the same motherboard (Asrock J3455-ITX)

AC3, DTS works
TrueHD, DTSHD not work

The two audio tracks when playing unsounded
aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.truehd.anssi1.ff.60s.spdif
aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.dtshd.anssi1.ma-71-24.spdif

[email protected]:~$ aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.truehd.anssi1.ff.60s.spdif
Playing raw data 'testi.truehd.anssi1.ff.60s.spdif' : Signed 16 bit Little Endian, Rate 192000 Hz, Channels 8

[email protected]:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23544331/
[email protected]:~$ DISPLAY=:0 vainfo | pastebinit
http://paste.ubuntu.com/23544333/
[email protected]:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23544334/
[email protected]:~$ dmesg | pastebinit
http://paste.ubuntu.com/23544335/
[email protected]:~$ id | pastebinit
http://paste.ubuntu.com/23544336/
[email protected]:~$ amixer | pastebinit
http://paste.ubuntu.com/23544337/
Reply
#8
Yeah - as said now twenty times. Kernel bug -> please try to get attention on bugs.freedesktop.org or visit the ALSA channel on freenode. If you are really, really lucky you meet "Annsi" on kodi channel and can link him this thread. He is an ALSA upstream dev.

Again: It is nothing kodi could fix in kodi.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Thanks for the info!
Reply
#10
im tested today Asus Vivo - based on skylake ... same issue, and here is native HDMI without DP chip converter to HDMI Sad so problem is bigger
(EDID/ELD show exposed all codec DTS-hd, TrueHD etc. kodi also ... but no sound ... Sad )
Reply
#11
So - now - we start a whining party? :-)

Btw. you contacted me 5 weeks ago with that issue and I told you: It's a kernel bug, please file it at bugs.freedesktop.org

There are some thousand skylake based NUCs out there that do dts-hd / truehd just fine ... wee LibreELEC thread. So without proper bug on bugs.freedesktop.org nothing will move forward.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
we already made Wink but i dont know if for that is responsilbe drm-intel or some asound/alsa core ? any idea how to more debug ?
where signal audio dissapear after play "aplay -D 'hdmi:CARD=PCH,DEV=0,AES0=2' -c8 -fs16_le -r192000 testi.truehd.anssi1.ff.60s.spdif" ??
(im updated even alsa-lib/utils - to latest because i saw some changes for broxton and topology)
Reply
#13
I pinged Anssi in the dev channel - let's see. Don't go on his nerves, please.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
drm debug after play sample give me ...
Code:
[   71.563430] [drm:i915_audio_component_get_eld] Not valid for port C
[   71.563438] [drm:i915_audio_component_get_eld] Not valid for port D
[   78.521509] [drm:i915_audio_component_get_eld] Not valid for port C
[   78.521516] [drm:i915_audio_component_get_eld] Not valid for port D
[   78.523207] [drm:hsw_audio_config_update] using Maud 2048, Naud 5625

maybe that help

link: https://bugs.freedesktop.org/show_bug.cgi?id=98797
Reply
#15
Link your bug that you filed on bugs.freedesktop.org here and feed this bug with all the information you have.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
HDMI - HD audio passthrough bug ?00