Bug 96382

Summary: [SKL/LSPCON] Not getting 5.1 surround sound over HDMI on NUC6i7KYK with kernel 4.6.1
Product: DRI Reporter: Chris <christianborck>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs, keqiao.zhang, piotr.kasprzak
Version: XOrg git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: SKL i915 features: display/audio, display/DP, display/HDMI, display/LSPCON
Attachments:
Description Flags
Kodi log
none
dmesg log
none
dmesg + lsmod none

Description Chris 2016-06-05 00:12:41 UTC
Created attachment 124321 [details]
Kodi log

I get no sound on any files unless my sound settings it Number of channels 2.0. I have this working on another setup with NUC6i5SYK.

Build I used: ​http://milhouse.libreelec.tv/builds/master/Generic/LibreELEC-Generic.x86_64-8.0-Milhouse-20160604210510-%230604-g6bd3b8c.tar

Hardware: NUC6i7KYK - Marantz NR1606 - LG 65E6 OLED

On my NUC6i5SYK this works just fine. But not on the new hardware. So it seems like the 4.6.1 kernel has a problem with the new hardware.

Logs:

dmesg http://sprunge.us/QEKO
kodi.log http://sprunge.us/ejgL
Comment 1 Chris 2016-06-05 00:13:03 UTC
Created attachment 124322 [details]
dmesg log
Comment 2 Peter Frühberger 2016-06-05 06:58:32 UTC
Test with speaker-test -c6 and see what you will get. Make sure you stop all devices that might hogg the audio device before that, e.g. systemctl stop kodi and afterwards:

speaker-test -c6 plughw:0,3 (if 0,3 is your output device)
Comment 3 Chris 2016-06-05 10:42:28 UTC
I did the test on all devices. I am using HDMI 0. So that would be 0,3. But no sound.

NUCTest:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC233 Analog [ALC233 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC233 Digital [ALC233 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Comment 4 Chris 2016-06-05 11:02:30 UTC
speaker-test -D hdmi:CARD=PCH,DEV=0 -c 2

Plays sound in front left and right

speaker-test -D hdmi:CARD=PCH,DEV=0 -c 6

Plays no sound in any channel
Comment 5 Chris 2016-06-05 11:04:58 UTC
NUCTest:~ # speaker-test -D hdmi:CARD=PCH,DEV=0 -c 8

speaker-test 1.1.1

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 131072
Period size range from 8 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
 0 - Front Left
 4 - Front Center
 1 - Front Right
 7 - Rear Right
 3 - Rear Right Center
 2 - Rear Left Center
 6 - Rear Left
 5 - LFE
Time per period = 19.117895
 0 - Front Left
 4 - Front Center
 1 - Front Right
 7 - Rear Right
 3 - Rear Right Center
 2 - Rear Left Center
 6 - Rear Left
 5 - LFE
Time per period = 3.540333

That gives me surround sound
Comment 6 Chris 2016-06-06 10:09:16 UTC
Just add that the last soundtest just concludes that 7.1 works, but 5.1 does not work. So my 5.1 setup is still not working.
Comment 7 Chris 2016-06-08 11:40:28 UTC
Seems there is a firmwareupdate for the HDMI 2.0 port that fixes this issue:

https://downloadcenter.intel.com/download/26061/HDMI-2-0-Firmware-Update

I will install and report back.
Comment 8 Chris 2016-06-08 13:25:17 UTC
It did help some with the firmware.

But no sound in any other channel then front left and right when doing this:
speaker-test -D hdmi:CARD=PCH,DEV=0 -c 6

So it's seems passthrough of sound through the Paradetech PS175 is not working proparly yet.
Comment 9 Chris 2016-06-08 14:00:28 UTC
Close it. Related to Paradetech firmware. Not kernel or Kodi
Comment 10 Chris 2016-06-08 18:34:34 UTC
Sorry, firmware did not fix all problems. Leave it open for now.
Comment 11 Jani Nikula 2016-06-09 08:21:52 UTC
Your GPU does not support HDMI 2.0 natively. There's an adapter on board, which needs driver support to work properly. There are patches on the list to support this [1]. Maybe you're brave enough to try out...?

[1] http://mid.gmane.org/1464686746-5099-1-git-send-email-shashank.sharma@intel.com
Comment 12 Chris 2016-06-09 08:45:15 UTC
Sure. But I am just running a small Linux distro called LibreELEC.
Comment 13 Jani Nikula 2016-06-09 11:14:46 UTC
(In reply to Chris from comment #12)
> Sure. But I am just running a small Linux distro called LibreELEC.

Said patches are valid also for the kernel in that distro.
Comment 14 Chris 2016-06-09 11:24:46 UTC
I can give it a go :) Btw. Latest LibreELEC I use has kernel 4.6.2.

Where can I get the patches and instructions?
Comment 15 Jani Nikula 2016-06-09 12:37:54 UTC
The patches are at https://patchwork.freedesktop.org/series/8024/

The expectation here is that you can build and configure your own kernels, apply patches and try them out. Otherwise, we often can't help you.

See http://kernelnewbies.org/ for some help.
Comment 16 Chris 2016-06-09 12:40:45 UTC
Ok. I am not there and don't think the LibreELEC guys want to spend to much time on this for me. So I guess I will just have to wait and see when this will be implemented in the kernel.

Is the timeline for this to be part of kernel 4.8?
Comment 17 Jani Nikula 2016-06-09 12:46:18 UTC
I wish. It looks tight.
Comment 18 Chris 2016-06-09 12:51:40 UTC
Ok. So kernel 4.9 would be the september-ish timeframe.

It works OK for now without passthrough and just use Multichannel PCM.

Guess we can just close this case then. Thanks for the feedback :)
Comment 19 Jani Nikula 2016-10-14 10:46:38 UTC
Please try https://patchwork.freedesktop.org/series/8024/ on top of drm-intel-nightly branch of http://cgit.freedesktop.org/drm-intel
Comment 20 Piotr Kasp. 2016-11-20 15:15:43 UTC
Created attachment 128086 [details]
dmesg + lsmod
Comment 21 Piotr Kasp. 2016-11-20 15:18:27 UTC
Im monitor progress for HDMI passthrough on Broxton
i have compiled latest intel-drm kernel fork, merged Asoc changes, latest mesa, intel drivers etc.

But no HD audio. DTS and Ac3 passthrough working any higher format not.
here my latest build LE if you want test on NUC
https://www.sendspace.com/file/h28twl/886744bca1829eec4bba60352fc11cdc

im tried disable SPDIF with blacklist blacklist snd_hda_codec_realtek
but after that spdif was visible for system from snd_hda_codec_generic
which is part of core and i cannot disable :(
Comment 22 Imre Deak 2016-11-22 10:32:12 UTC
(In reply to Piotr Kasp. from comment #21)
> Im monitor progress for HDMI passthrough on Broxton
> i have compiled latest intel-drm kernel fork, merged Asoc changes, latest
> mesa, intel drivers etc.
> 
> But no HD audio. DTS and Ac3 passthrough working any higher format not.
> here my latest build LE if you want test on NUC
> https://www.sendspace.com/file/h28twl/886744bca1829eec4bba60352fc11cdc
> 
> im tried disable SPDIF with blacklist blacklist snd_hda_codec_realtek
> but after that spdif was visible for system from snd_hda_codec_generic
> which is part of core and i cannot disable :(

Thanks for the report. This bug was for SKL, so could you open a new one attaching a dmesg booting with drm.debug=14?
Comment 23 Piotr Kasp. 2016-11-22 10:36:22 UTC
no problem i will add today debug drm.debug=14

Here is my open bug
https://bugs.freedesktop.org/show_bug.cgi?id=98797

Im also used patch
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/linux/patches/4.8.9/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch

but in this case nothing help
Comment 24 keqiao 2016-12-20 05:48:43 UTC
Not sure if you still have this issue, But I cannot reproduce this issue on my NUC(PCODE:NUC6I7KYK-IDD).
# speaker-test -D hdmi:CARD=PCH,DEV=0 -t wav -c 6

speaker-test 1.0.27.2

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 22 to 5461
Period size range from 11 to 2730
Using max buffer size 5460
Periods = 4
was set period_size = 1365
was set buffer_size = 5460
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 8.530777

# speaker-test -D hdmi:CARD=PCH,DEV=0 -t wav -c 8

speaker-test 1.0.27.2

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 8 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 4096
Period size range from 8 to 2048
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
 0 - Front Left
 4 - Center
 1 - Front Right
 7 - Side Right
 7 - Side Right
 6 - Side Left
 6 - Side Left
 5 - LFE
Time per period = 11.242475

I tried with 2 last kernel branch mainline and drm-tip. both are work well.
mainline:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
drm-tip:git://anongit.freedesktop.org/drm-tip
If you still have this issue, please have a try.
Comment 25 Jani Saarinen 2017-02-19 15:55:24 UTC
Hi Chris, is still issue stil with latest drm-tip?
Comment 26 Libin Yang 2017-02-20 01:59:49 UTC
Hi Chris,

We have tested it on our NUC6I7KYK-IDD, the difference from your platform is "-IDD". And everything works well here.

Could you please confirm your platform is same as us? And could you please provide your BIOS setting?

Thanks,
Libin
Comment 27 Jari Tahvanainen 2017-04-12 10:48:55 UTC
Assuming resolved+fixed based on comment 18, comment 24 and comment 26.
Bug 98797 has been created for another failure noticed by Piotr.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.