Enabling HDMI HBR mode on Intel HDA
Hi all!
We have been trying to get truehd/mlp/mat passthrough to work, with no luck so far. As HDMI standard requires a separate transmission mode (i.e. HBR Audio Stream Packets instead of Audio Sample Packets) for high-bitrate (over 6.144Mbps) compressed formats, a driver change is needed, AFAIU.
Attached is a hack we have been using with hda_intel driver (the patch is for generic code; we have been using nvidia 8x codec if that matters).
Could anyone familiar with Intel HDA confirm whether the hack looks correct, or if something more is required? (0x05 is the hardcoded pin nid).
It would help to know for sure that the problem is in our iso61937/mat encapsulation and not in the temporary driver hack.
Thanks,
Signature · 1 line
Anssi Hannula
pci/hda/hda_codec.h +3 -0
@@ -364,6 +364,9 @@ enum {#define AC_DIG2_CC (0x7f<<0)/* Pin widget control - 8bit */ +#define AC_PINCTL_EPT (0x3<<0) +#define AC_PINCTL_EPT_NATIVE 0 +#define AC_PINCTL_EPT_HBR 3#define AC_PINCTL_VREFEN (0x7<<0)#define AC_PINCTL_VREF_HIZ 0/* Hi-Z */ #define AC_PINCTL_VREF_50 1/* 50% */
pci/hda/patch_hdmi.c +19 -3
@@ -163,7 +163,8 @@ static int hdmi_channel_mapping[0x32][8] = {/* surround51 */ [0x0b ] = {0x00 ,0x11 ,0x24 ,0x35 ,0x43 ,0x52 ,0xf6 ,0xf7 },/* 7.1 */ - [0x13] = { 0x00, 0x11, 0x26, 0x37, 0x43, 0x52, 0x64, 0x75 }, +// [0x13] = { 0x00, 0x11, 0x26, 0x37, 0x43, 0x52, 0x64, 0x75 }, + [0x13] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, };/*
@@ -688,20 +689,35 @@ static void hdmi_unsol_event(struct hda_codec *codec, unsigned int res)static void hdmi_setup_stream (struct hda_codec *codec,hda_nid_t nid,u32 stream_tag,int format) { +int pinctl =0 ;int tag;int fmt; +int new_pinctl =0 ; + pinctl =snd_hda_codec_read (codec,0x05 ,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 ); tag =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_CONV ,0 ) >>4 ; fmt =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_STREAM_FORMAT ,0 ); -snd_printdd ("hdmi_setup_stream: " -"NID=0x%x, %sstream=0x%x, %sformat=0x%x\n" , +if (snd_hda_param_read (codec,0x05 ,AC_PAR_PIN_CAP ) &AC_PINCAP_HBR ) + new_pinctl = (pinctl & ~AC_PINCTL_EPT ) |AC_PINCTL_EPT_HBR ; +else + new_pinctl = (pinctl & ~AC_PINCTL_EPT ) |AC_PINCTL_EPT_NATIVE ; + +snd_printk ("hdmi_setup_stream: " +"%spinctl=0x%x, NID=0x%x, %sstream=0x%x, %sformat=0x%x\n" , + pinctl == new_pinctl ?"" :"new-" , + new_pinctl, nid, tag == stream_tag ?"" :"new-" , stream_tag, fmt == format ?"" :"new-" , format); +if (pinctl != new_pinctl) +snd_hda_codec_write (codec,0x05 ,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , + new_pinctl); +if (tag != stream_tag) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID,
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Anssi Hannula kirjoitti perjantai, 30. heinäkuuta 2010 15:48:41:
Quoted 11 lines
We have been trying to get truehd/mlp/mat passthrough to work, with no luck so far. As HDMI standard requires a separate transmission mode (i.e. HBR Audio Stream Packets instead of Audio Sample Packets) for high-bitrate (over 6.144Mbps) compressed formats, a driver change is needed, AFAIU.
Attached is a hack we have been using with
hda_inteldriver (the patch is for generic code; we have been using nvidia 8x codec if that matters).Could anyone familiar with Intel HDA confirm whether the hack looks correct, or if something more is required? (
0x05is the hardcoded pin nid).
Naturally I figured it out just few hours after sending the message... I had to set bit 15 (stream-type) in format to 1.
I'll now look into properly integrating this support to alsa.
Signature · 1 line
Anssi Hannula