intel-gpu-tools: intel_audio_dump updates
cover intel-gpu-tools: intel_audio_dump updates
A bunch of cleanups, fixes and new fields to intel_audio_dump, tested OK on G45, Ironlake and IvyBridge.
PATCH 1/18 intel_audio_dump: cleanup hyphen character
Convert "" (Hex 00ad) to "-" (Hex 2d), the former leads to ugly outputs in some situations.
--- tools/intel_audio_dump.c | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-)
tools/intel_audio_dump.c +35 -35
@@ -495,31 +495,31 @@ static void dump_ironlake(void)dump_reg (HDMIB ,"sDVO/HDMI Port B Control" );dump_reg (HDMIC ,"HDMI Port C Control" );dump_reg (HDMID ,"HDMI Port D Control" ); -dump_reg (AUD_CONFIG_A ,"Audio Configuration Transcoder A" ); -dump_reg (AUD_CONFIG_B ,"Audio Configuration Transcoder B" ); -dump_reg (AUD_CTS_ENABLE_A ,"Audio CTS Programming Enable Transcoder A" ); -dump_reg (AUD_CTS_ENABLE_B ,"Audio CTS Programming Enable Transcoder B" ); +dump_reg (AUD_CONFIG_A ,"Audio Configuration - Transcoder A" ); +dump_reg (AUD_CONFIG_B ,"Audio Configuration - Transcoder B" ); +dump_reg (AUD_CTS_ENABLE_A ,"Audio CTS Programming Enable - Transcoder A" ); +dump_reg (AUD_CTS_ENABLE_B ,"Audio CTS Programming Enable - Transcoder B" );dump_reg (AUD_MISC_CTRL_A ,"Audio MISC Control for Transcoder A" );dump_reg (AUD_MISC_CTRL_B ,"Audio MISC Control for Transcoder B" );dump_reg (AUD_VID_DID ,"Audio Vendor ID / Device ID" );dump_reg (AUD_RID ,"Audio Revision ID" );dump_reg (AUD_PWRST ,"Audio Power State (Function Group, Convertor, Pin Widget)" );dump_reg (AUD_PORT_EN_HD_CFG ,"Audio Port Enable HDAudio Config" ); -dump_reg (AUD_OUT_DIG_CNVT_A ,"Audio Digital Converter Conv A" ); -dump_reg (AUD_OUT_DIG_CNVT_B ,"Audio Digital Converter Conv B" ); +dump_reg (AUD_OUT_DIG_CNVT_A ,"Audio Digital Converter - Conv A" ); +dump_reg (AUD_OUT_DIG_CNVT_B ,"Audio Digital Converter - Conv B" );dump_reg (AUD_OUT_CH_STR ,"Audio Channel ID and Stream ID" ); -dump_reg (AUD_OUT_STR_DESC_A ,"Audio Stream Descriptor Format Conv A" ); -dump_reg (AUD_OUT_STR_DESC_B ,"Audio Stream Descriptor Format Conv B" ); +dump_reg (AUD_OUT_STR_DESC_A ,"Audio Stream Descriptor Format - Conv A" ); +dump_reg (AUD_OUT_STR_DESC_B ,"Audio Stream Descriptor Format - Conv B" );dump_reg (AUD_PINW_CONNLNG_LIST ,"Audio Connection List" );dump_reg (AUD_PINW_CONNLNG_SEL ,"Audio Connection Select" ); -dump_reg (AUD_CNTL_ST_A ,"Audio Control State Register Transcoder A" ); -dump_reg (AUD_CNTL_ST_B ,"Audio Control State Register Transcoder B" ); +dump_reg (AUD_CNTL_ST_A ,"Audio Control State Register - Transcoder A" ); +dump_reg (AUD_CNTL_ST_B ,"Audio Control State Register - Transcoder B" );dump_reg (AUD_CNTL_ST2 ,"Audio Control State 2" );dump_reg (AUD_HDMIW_STATUS ,"Audio HDMI Status" ); -dump_reg (AUD_HDMIW_HDMIEDID_A ,"HDMI Data EDID Block Transcoder A" ); -dump_reg (AUD_HDMIW_HDMIEDID_B ,"HDMI Data EDID Block Transcoder B" ); -dump_reg (AUD_HDMIW_INFOFR_A ,"Audio Widget Data Island Packet Transcoder A" ); -dump_reg (AUD_HDMIW_INFOFR_B ,"Audio Widget Data Island Packet Transcoder B" ); +dump_reg (AUD_HDMIW_HDMIEDID_A ,"HDMI Data EDID Block - Transcoder A" ); +dump_reg (AUD_HDMIW_HDMIEDID_B ,"HDMI Data EDID Block - Transcoder B" ); +dump_reg (AUD_HDMIW_INFOFR_A ,"Audio Widget Data Island Packet - Transcoder A" ); +dump_reg (AUD_HDMIW_INFOFR_B ,"Audio Widget Data Island Packet - Transcoder B" );printf ("\nDetails:\n\n" );
@@ -825,12 +825,12 @@ static void dump_cpt(void)dump_reg (HDMIB ,"sDVO/HDMI Port B Control" );dump_reg (HDMIC ,"HDMI Port C Control" );dump_reg (HDMID ,"HDMI Port D Control" ); -dump_reg (AUD_CONFIG_A ,"Audio Configuration Transcoder A" ); -dump_reg (AUD_CONFIG_B ,"Audio Configuration Transcoder B" ); -dump_reg (AUD_CONFIG_C ,"Audio Configuration Transcoder C" ); -dump_reg (AUD_CTS_ENABLE_A ,"Audio CTS Programming Enable Transcoder A" ); -dump_reg (AUD_CTS_ENABLE_B ,"Audio CTS Programming Enable Transcoder B" ); -dump_reg (AUD_CTS_ENABLE_C ,"Audio CTS Programming Enable Transcoder C" ); +dump_reg (AUD_CONFIG_A ,"Audio Configuration - Transcoder A" ); +dump_reg (AUD_CONFIG_B ,"Audio Configuration - Transcoder B" ); +dump_reg (AUD_CONFIG_C ,"Audio Configuration - Transcoder C" ); +dump_reg (AUD_CTS_ENABLE_A ,"Audio CTS Programming Enable - Transcoder A" ); +dump_reg (AUD_CTS_ENABLE_B ,"Audio CTS Programming Enable - Transcoder B" ); +dump_reg (AUD_CTS_ENABLE_C ,"Audio CTS Programming Enable - Transcoder C" );dump_reg (AUD_MISC_CTRL_A ,"Audio MISC Control for Transcoder A" );dump_reg (AUD_MISC_CTRL_B ,"Audio MISC Control for Transcoder B" );dump_reg (AUD_MISC_CTRL_C ,"Audio MISC Control for Transcoder C" );
@@ -838,27 +838,27 @@ static void dump_cpt(void)dump_reg (AUD_RID ,"Audio Revision ID" );dump_reg (AUD_PWRST ,"Audio Power State (Function Group, Convertor, Pin Widget)" );dump_reg (AUD_PORT_EN_HD_CFG ,"Audio Port Enable HDAudio Config" ); -dump_reg (AUD_OUT_DIG_CNVT_A ,"Audio Digital Converter Conv A" ); -dump_reg (AUD_OUT_DIG_CNVT_B ,"Audio Digital Converter Conv B" ); -dump_reg (AUD_OUT_DIG_CNVT_C ,"Audio Digital Converter Conv C" ); +dump_reg (AUD_OUT_DIG_CNVT_A ,"Audio Digital Converter - Conv A" ); +dump_reg (AUD_OUT_DIG_CNVT_B ,"Audio Digital Converter - Conv B" ); +dump_reg (AUD_OUT_DIG_CNVT_C ,"Audio Digital Converter - Conv C" );dump_reg (AUD_OUT_CH_STR ,"Audio Channel ID and Stream ID" ); -dump_reg (AUD_OUT_STR_DESC_A ,"Audio Stream Descriptor Format Conv A" ); -dump_reg (AUD_OUT_STR_DESC_B ,"Audio Stream Descriptor Format Conv B" ); -dump_reg (AUD_OUT_STR_DESC_C ,"Audio Stream Descriptor Format Conv C" ); +dump_reg (AUD_OUT_STR_DESC_A ,"Audio Stream Descriptor Format - Conv A" ); +dump_reg (AUD_OUT_STR_DESC_B ,"Audio Stream Descriptor Format - Conv B" ); +dump_reg (AUD_OUT_STR_DESC_C ,"Audio Stream Descriptor Format - Conv C" );dump_reg (AUD_PINW_CONNLNG_LIST ,"Audio Connection List" );dump_reg (AUD_PINW_CONNLNG_SEL ,"Audio Connection Select" ); -dump_reg (AUD_CNTL_ST_A ,"Audio Control State Register Transcoder A" ); -dump_reg (AUD_CNTL_ST_B ,"Audio Control State Register Transcoder B" ); -dump_reg (AUD_CNTL_ST_C ,"Audio Control State Register Transcoder C" ); +dump_reg (AUD_CNTL_ST_A ,"Audio Control State Register - Transcoder A" ); +dump_reg (AUD_CNTL_ST_B ,"Audio Control State Register - Transcoder B" ); +dump_reg (AUD_CNTL_ST_C ,"Audio Control State Register - Transcoder C" );dump_reg (AUD_CNTRL_ST2 ,"Audio Control State 2" );dump_reg (AUD_CNTRL_ST3 ,"Audio Control State 3" );dump_reg (AUD_HDMIW_STATUS ,"Audio HDMI Status" ); -dump_reg (AUD_HDMIW_HDMIEDID_A ,"HDMI Data EDID Block Transcoder A" ); -dump_reg (AUD_HDMIW_HDMIEDID_B ,"HDMI Data EDID Block Transcoder B" ); -dump_reg (AUD_HDMIW_HDMIEDID_C ,"HDMI Data EDID Block Transcoder C" ); -dump_reg (AUD_HDMIW_INFOFR_A ,"Audio Widget Data Island Packet Transcoder A" ); -dump_reg (AUD_HDMIW_INFOFR_B ,"Audio Widget Data Island Packet Transcoder B" ); -dump_reg (AUD_HDMIW_INFOFR_C ,"Audio Widget Data Island Packet Transcoder C" ); +dump_reg (AUD_HDMIW_HDMIEDID_A ,"HDMI Data EDID Block - Transcoder A" ); +dump_reg (AUD_HDMIW_HDMIEDID_B ,"HDMI Data EDID Block - Transcoder B" ); +dump_reg (AUD_HDMIW_HDMIEDID_C ,"HDMI Data EDID Block - Transcoder C" ); +dump_reg (AUD_HDMIW_INFOFR_A ,"Audio Widget Data Island Packet - Transcoder A" ); +dump_reg (AUD_HDMIW_INFOFR_B ,"Audio Widget Data Island Packet - Transcoder B" ); +dump_reg (AUD_HDMIW_INFOFR_C ,"Audio Widget Data Island Packet - Transcoder C" );printf ("\nDetails:\n\n" );
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/18 intel_audio_dump: cleanup ACP DIP name for ironlake and CPT
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tools/intel_audio_dump.c +8 -8
@@ -666,7 +666,7 @@ static void dump_ironlake(void)printf ("AUD_CNTL_ST_A DIP_Port_Select\t\t\t\t[%#lx] %s\n" ,BITS (dword,30 ,29 ), dip_port[BITS (dword,30 ,29 )]);printf ("AUD_CNTL_ST_A DIP_type_enable_status Audio DIP\t\t%lu\n" ,BIT (dword,21 )); -printf ("AUD_CNTL_ST_A DIP_type_enable_status Generic 1 ACP DIP\t%lu\n" ,BIT (dword,22 )); +printf ("AUD_CNTL_ST_A DIP_type_enable_status ACP DIP\t\t%lu\n" ,BIT (dword,22 ));printf ("AUD_CNTL_ST_A DIP_type_enable_status Generic 2 DIP\t%lu\n" ,BIT (dword,23 ));printf ("AUD_CNTL_ST_A DIP_transmission_frequency\t\t[0x%lx] %s\n" ,BITS (dword,17 ,16 ), dip_trans[BITS (dword,17 ,16 )]);
@@ -677,7 +677,7 @@ static void dump_ironlake(void)printf ("AUD_CNTL_ST_B DIP_Port_Select\t\t\t\t[%#lx] %s\n" ,BITS (dword,30 ,29 ), dip_port[BITS (dword,30 ,29 )]);printf ("AUD_CNTL_ST_B DIP_type_enable_status Audio DIP\t\t%lu\n" ,BIT (dword,21 )); -printf ("AUD_CNTL_ST_B DIP_type_enable_status Generic 1 ACP DIP\t%lu\n" ,BIT (dword,22 )); +printf ("AUD_CNTL_ST_B DIP_type_enable_status ACP DIP\t\t%lu\n" ,BIT (dword,22 ));printf ("AUD_CNTL_ST_B DIP_type_enable_status Generic 2 DIP\t%lu\n" ,BIT (dword,23 ));printf ("AUD_CNTL_ST_B DIP_transmission_frequency\t\t[0x%lx] %s\n" ,BITS (dword,17 ,16 ), dip_trans[BITS (dword,17 ,16 )]);
@@ -1068,8 +1068,8 @@ static void dump_cpt(void) dword =INREG (AUD_CNTL_ST_A );printf ("AUD_CNTL_ST_A DIP_Port_Select\t\t\t\t[%#lx] %s\n" ,BITS (dword,30 ,29 ), dip_port[BITS (dword,30 ,29 )]); -printf ("AUD_CNTL_ST_A DIP_type_enable_status Audio DIP\t\t%lu\n" ,BIT (dword,21 )); -printf ("AUD_CNTL_ST_A DIP_type_enable_status Generic 1 ACP DIP\t%lu\n" ,BIT (dword,22 )); +printf ("AUD_CNTL_ST_A DIP_type_enable_status Audio DIP\t%lu\n" ,BIT (dword,21 )); +printf ("AUD_CNTL_ST_A DIP_type_enable_status ACP DIP\t\t%lu\n" ,BIT (dword,22 ));printf ("AUD_CNTL_ST_A DIP_type_enable_status Generic 2 DIP\t%lu\n" ,BIT (dword,23 ));printf ("AUD_CNTL_ST_A DIP_transmission_frequency\t\t[0x%lx] %s\n" ,BITS (dword,17 ,16 ), dip_trans[BITS (dword,17 ,16 )]);
@@ -1079,8 +1079,8 @@ static void dump_cpt(void) dword =INREG (AUD_CNTL_ST_B );printf ("AUD_CNTL_ST_B DIP_Port_Select\t\t\t\t[%#lx] %s\n" ,BITS (dword,30 ,29 ), dip_port[BITS (dword,30 ,29 )]); -printf ("AUD_CNTL_ST_B DIP_type_enable_status Audio DIP\t\t%lu\n" ,BIT (dword,21 )); -printf ("AUD_CNTL_ST_B DIP_type_enable_status Generic 1 ACP DIP\t%lu\n" ,BIT (dword,22 )); +printf ("AUD_CNTL_ST_B DIP_type_enable_status Audio DIP\t%lu\n" ,BIT (dword,21 )); +printf ("AUD_CNTL_ST_B DIP_type_enable_status ACP DIP\t\t%lu\n" ,BIT (dword,22 ));printf ("AUD_CNTL_ST_B DIP_type_enable_status Generic 2 DIP\t%lu\n" ,BIT (dword,23 ));printf ("AUD_CNTL_ST_B DIP_transmission_frequency\t\t[0x%lx] %s\n" ,BITS (dword,17 ,16 ), dip_trans[BITS (dword,17 ,16 )]);
@@ -1090,8 +1090,8 @@ static void dump_cpt(void) dword =INREG (AUD_CNTL_ST_C );printf ("AUD_CNTL_ST_C DIP_Port_Select\t\t\t\t[%#lx] %s\n" ,BITS (dword,30 ,29 ), dip_port[BITS (dword,30 ,29 )]); -printf ("AUD_CNTL_ST_C DIP_type_enable_status Audio DIP\t\t%lu\n" ,BIT (dword,21 )); -printf ("AUD_CNTL_ST_C DIP_type_enable_status Generic 1 ACP DIP\t%lu\n" ,BIT (dword,22 )); +printf ("AUD_CNTL_ST_C DIP_type_enable_status Audio DIP\t%lu\n" ,BIT (dword,21 )); +printf ("AUD_CNTL_ST_C DIP_type_enable_status ACP DIP\t\t%lu\n" ,BIT (dword,22 ));printf ("AUD_CNTL_ST_C DIP_type_enable_status Generic 2 DIP\t%lu\n" ,BIT (dword,23 ));printf ("AUD_CNTL_ST_C DIP_transmission_frequency\t\t[0x%lx] %s\n" ,BITS (dword,17 ,16 ), dip_trans[BITS (dword,17 ,16 )]);
PATCH 3/18 intel_audio_dump: cleanup hex output
In reply to Wu Fengguang- no need to show the 1-bit AUD_OUT_DIG_CNVT_* as hex value
- show the Connection_select_Control_* bits as hex values
--- tools/intel_audio_dump.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tools/intel_audio_dump.c +8 -8
@@ -615,7 +615,7 @@ static void dump_ironlake(void)printf ("AUD_OUT_DIG_CNVT_A VCFG\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("AUD_OUT_DIG_CNVT_A PRE\t\t\t\t\t%lu\n" ,BIT (dword,3 ));printf ("AUD_OUT_DIG_CNVT_A Copy\t\t\t\t%lu\n" ,BIT (dword,4 )); -printf ("AUD_OUT_DIG_CNVT_A Non-Audio\t\t\t\t0x%lx\n" ,BIT (dword,5 )); +printf ("AUD_OUT_DIG_CNVT_A NonAudio\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("AUD_OUT_DIG_CNVT_A PRO\t\t\t\t\t%lu\n" ,BIT (dword,6 ));printf ("AUD_OUT_DIG_CNVT_A Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_A Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));
@@ -627,7 +627,7 @@ static void dump_ironlake(void)printf ("AUD_OUT_DIG_CNVT_B VCFG\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("AUD_OUT_DIG_CNVT_B PRE\t\t\t\t\t%lu\n" ,BIT (dword,3 ));printf ("AUD_OUT_DIG_CNVT_B Copy\t\t\t\t%lu\n" ,BIT (dword,4 )); -printf ("AUD_OUT_DIG_CNVT_B Non-Audio\t\t\t\t0x%lx\n" ,BIT (dword,5 )); +printf ("AUD_OUT_DIG_CNVT_B NonAudio\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("AUD_OUT_DIG_CNVT_B PRO\t\t\t\t\t%lu\n" ,BIT (dword,6 ));printf ("AUD_OUT_DIG_CNVT_B Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_B Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));
@@ -1000,7 +1000,7 @@ static void dump_cpt(void)printf ("AUD_OUT_DIG_CNVT_A VCFG\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("AUD_OUT_DIG_CNVT_A PRE\t\t\t\t\t%lu\n" ,BIT (dword,3 ));printf ("AUD_OUT_DIG_CNVT_A Copy\t\t\t\t%lu\n" ,BIT (dword,4 )); -printf ("AUD_OUT_DIG_CNVT_A NonAudio\t\t\t\t0x%lx\n" ,BIT (dword,5 )); +printf ("AUD_OUT_DIG_CNVT_A NonAudio\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("AUD_OUT_DIG_CNVT_A PRO\t\t\t\t\t%lu\n" ,BIT (dword,6 ));printf ("AUD_OUT_DIG_CNVT_A Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_A Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));
@@ -1012,7 +1012,7 @@ static void dump_cpt(void)printf ("AUD_OUT_DIG_CNVT_B VCFG\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("AUD_OUT_DIG_CNVT_B PRE\t\t\t\t\t%lu\n" ,BIT (dword,3 ));printf ("AUD_OUT_DIG_CNVT_B Copy\t\t\t\t%lu\n" ,BIT (dword,4 )); -printf ("AUD_OUT_DIG_CNVT_B NonAudio\t\t\t\t0x%lx\n" ,BIT (dword,5 )); +printf ("AUD_OUT_DIG_CNVT_B NonAudio\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("AUD_OUT_DIG_CNVT_B PRO\t\t\t\t\t%lu\n" ,BIT (dword,6 ));printf ("AUD_OUT_DIG_CNVT_B Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_B Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));
@@ -1024,7 +1024,7 @@ static void dump_cpt(void)printf ("AUD_OUT_DIG_CNVT_C VCFG\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("AUD_OUT_DIG_CNVT_C PRE\t\t\t\t\t%lu\n" ,BIT (dword,3 ));printf ("AUD_OUT_DIG_CNVT_C Copy\t\t\t\t%lu\n" ,BIT (dword,4 )); -printf ("AUD_OUT_DIG_CNVT_C NonAudio\t\t\t\t0x%lx\n" ,BIT (dword,5 )); +printf ("AUD_OUT_DIG_CNVT_C NonAudio\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("AUD_OUT_DIG_CNVT_C PRO\t\t\t\t\t%lu\n" ,BIT (dword,6 ));printf ("AUD_OUT_DIG_CNVT_C Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_C Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));
@@ -1061,9 +1061,9 @@ static void dump_cpt(void)printf ("AUD_OUT_STR_DESC_C Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_PINW_CONNLNG_SEL ); -printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_B\t%lu\n" ,BITS (dword,7 ,0 )); -printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_C\t%lu\n" ,BITS (dword,15 ,8 )); -printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_D\t%lu\n" ,BITS (dword,23 ,16 )); +printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_B\t%#lx\n" ,BITS (dword,7 ,0 )); +printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_C\t%#lx\n" ,BITS (dword,15 ,8 )); +printf ("AUD_PINW_CONNLNG_SEL Connection_select_Control_D\t%#lx\n" ,BITS (dword,23 ,16 )); dword =INREG (AUD_CNTL_ST_A ); printf("AUD_CNTL_ST_A DIP_Port_Select\t\t\t\t[%#lx] %s\n",
PATCH 4/18 intel_audio_dump: report effective channel count
In reply to Wu FengguangThe raw channel count is not user friendly and may be misleading.
--- tools/intel_audio_dump.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
tools/intel_audio_dump.c +9 -9
@@ -367,16 +367,16 @@ static void dump_eaglelake(void) dword =INREG (AUD_OUT_CH_STR );printf ("AUD_OUT_CH_STR stream id\t\t0x%lx\n" ,BITS (dword,7 ,4 )); -printf ("AUD_OUT_CH_STR lowest channel\t\t0x%lx\n" ,BITS (dword,3 ,0 )); +printf ("AUD_OUT_CH_STR lowest channel\t\t%lu\n" ,BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC ); -printf ("AUD_OUT_STR_DESC stream channels\t0x%lx\n" ,BITS (dword,3 ,0 )); +printf ("AUD_OUT_STR_DESC stream channels\t%lu\n" ,BITS (dword,3 ,0 ) +1 ); dword =INREG (AUD_PINW_CAP );printf ("AUD_PINW_CAP widget type\t\t0x%lx\n" ,BITS (dword,23 ,20 ));printf ("AUD_PINW_CAP sample delay\t\t0x%lx\n" ,BITS (dword,19 ,16 )); -printf ("AUD_PINW_CAP channel count\t\t0x%lx\n" , -BITS (dword,15 ,13 ) *2 +BIT (dword,0 )); +printf ("AUD_PINW_CAP channel count\t\t%lu\n" , +BITS (dword,15 ,13 ) *2 +BIT (dword,0 ) +1 );printf ("AUD_PINW_CAP HDCP\t\t\t%lu\n" ,BIT (dword,12 ));printf ("AUD_PINW_CAP L-R swap\t\t\t%lu\n" ,BIT (dword,11 ));printf ("AUD_PINW_CAP power control\t\t%lu\n" ,BIT (dword,10 ));
@@ -647,13 +647,13 @@ static void dump_ironlake(void) dword =INREG (AUD_OUT_STR_DESC_A );printf ("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 )); -printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 )); +printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 );printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 ));printf ("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_B );printf ("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 )); -printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 )); +printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 );printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 ));printf ("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 ));
@@ -1044,19 +1044,19 @@ static void dump_cpt(void) dword =INREG (AUD_OUT_STR_DESC_A );printf ("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 )); -printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 )); +printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 );printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 ));printf ("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_B );printf ("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 )); -printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 )); +printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 );printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 ));printf ("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_C );printf ("AUD_OUT_STR_DESC_C HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 )); -printf ("AUD_OUT_STR_DESC_C Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 )); +printf ("AUD_OUT_STR_DESC_C Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 );printf ("AUD_OUT_STR_DESC_C Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 ));printf ("AUD_OUT_STR_DESC_C Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 ));
PATCH 5/18 intel_audio_dump: fix ironlake Stream_ID indents
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/intel_audio_dump.c +2 -2
@@ -620,7 +620,7 @@ static void dump_ironlake(void)printf ("AUD_OUT_DIG_CNVT_A Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_A Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));printf ("AUD_OUT_DIG_CNVT_A Lowest_Channel_Number\t\t%lu\n" ,BITS (dword,19 ,16 )); -printf ("AUD_OUT_DIG_CNVT_A Stream_ID\t\t\t\t\t\t%lu\n" ,BITS (dword,23 ,20 )); +printf ("AUD_OUT_DIG_CNVT_A Stream_ID\t\t\t\t%lu\n" ,BITS (dword,23 ,20 )); dword =INREG (AUD_OUT_DIG_CNVT_B );printf ("AUD_OUT_DIG_CNVT_B V\t\t\t\t\t%lu\n" ,BIT (dword,1 ));
@@ -632,7 +632,7 @@ static void dump_ironlake(void)printf ("AUD_OUT_DIG_CNVT_B Level\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("AUD_OUT_DIG_CNVT_B Category_Code\t\t\t%lu\n" ,BITS (dword,14 ,8 ));printf ("AUD_OUT_DIG_CNVT_B Lowest_Channel_Number\t\t%lu\n" ,BITS (dword,19 ,16 )); -printf ("AUD_OUT_DIG_CNVT_B Stream_ID\t\t\t%lu\n" ,BITS (dword,23 ,20 )); +printf ("AUD_OUT_DIG_CNVT_B Stream_ID\t\t\t\t%lu\n" ,BITS (dword,23 ,20 ));printf ("AUD_OUT_CH_STR Converter_Channel_MAP PORTB PORTC PORTD\n" );for (i =0 ; i <8 ; i++) {
PATCH 6/18 intel_audio_dump: fix Digital_Port_D_Detected copy&paste error
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/intel_audio_dump.c +2 -2
@@ -537,7 +537,7 @@ static void dump_ironlake(void)printf ("HDMIB HDMIB_Enable\t\t\t\t\t%u\n" , !!(dword &SDVO_ENABLE ));printf ("HDMIB Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMIB HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); -printf ("HDMIB Digital_Port_D_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIB Digital_Port_B_Detected\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMIB Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMIB Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -545,7 +545,7 @@ static void dump_ironlake(void)printf ("HDMIC HDMIC_Enable\t\t\t\t\t%u\n" , !!(dword &SDVO_ENABLE ));printf ("HDMIC Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMIC HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); -printf ("HDMIC Digital_Port_D_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIC Digital_Port_C_Detected\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMIC Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMIC Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
PATCH 7/18 intel_audio_dump: fix Ironlake detection
In reply to Wu FengguangThe original test mistakenly calls dump_cpt() for Ironlake, due to HAS_PCH_SPLIT := IS_GEN5 || IS_GEN6 || IS_GEN7.
--- tools/intel_audio_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_audio_dump.c +1 -1
@@ -1194,7 +1194,7 @@ int main(int argc, char **argv)else intel_get_mmio (pci_dev); -if (HAS_PCH_SPLIT (devid) ||getenv ("HAS_PCH_SPLIT" )) { +if (IS_GEN6 (devid) ||IS_GEN7 (devid) ||getenv ("HAS_PCH_SPLIT" )) {intel_check_pch ();dump_cpt (); }else if (IS_GEN5 (devid))
PATCH 8/18 intel_audio_dump: fix DP control registers for CPT
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-)
tools/intel_audio_dump.c +27 -20
@@ -764,6 +764,7 @@ static void dump_ironlake(void)/* * CougarPoint registers */ +#define DP_CTL_B 0xE4100#define DP_CTL_C 0xE4200#define DP_AUX_CTL_C 0xE4210#define DP_AUX_TST_C 0xE4228
@@ -825,6 +826,12 @@ static void dump_cpt(void)dump_reg (HDMIB ,"sDVO/HDMI Port B Control" );dump_reg (HDMIC ,"HDMI Port C Control" );dump_reg (HDMID ,"HDMI Port D Control" ); +dump_reg (DP_CTL_B ,"DisplayPort B Control" ); +dump_reg (DP_CTL_C ,"DisplayPort C Control" ); +dump_reg (DP_CTL_D ,"DisplayPort D Control" ); +dump_reg (TRANS_DP_CTL_A ,"Transcoder A DisplayPort Control" ); +dump_reg (TRANS_DP_CTL_B ,"Transcoder B DisplayPort Control" ); +dump_reg (TRANS_DP_CTL_C ,"Transcoder C DisplayPort Control" );dump_reg (AUD_CONFIG_A ,"Audio Configuration - Transcoder A" );dump_reg (AUD_CONFIG_B ,"Audio Configuration - Transcoder B" );dump_reg (AUD_CONFIG_C ,"Audio Configuration - Transcoder C" );
@@ -902,29 +909,29 @@ static void dump_cpt(void)printf ("HDMID HDMI_or_DVI_Select\t\t\t\t%s\n" ,BIT (dword,9 ) ?"HDMI" :"DVI" );printf ("HDMID Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE )); - dword =INREG (TRANS_DP_CTL_A ); -printf ("TRANS_DP_CTL_A DisplayPort_Enable\t\t\t%lu\n" ,BIT (dword,31 )); -printf ("TRANS_DP_CTL_A Port_Width_Selection\t\t\t[0x%lx] %s\n" , + dword =INREG (DP_CTL_B ); +printf ("DP_CTL_B DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("DP_CTL_B Port_Width_Selection\t\t\t\t[0x%lx] %s\n" ,BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); -printf ("TRANS_DP_CTL_A Port_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); -printf ("TRANS_DP_CTL_A HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); -printf ("TRANS_DP_CTL_A Audio_Output_Enable\t\t\t%lu\n" ,BIT (dword,6 )); - - dword =INREG (TRANS_DP_CTL_B ); -printf ("TRANS_DP_CTL_B DisplayPort_Enable\t\t\t%lu\n" ,BIT (dword,31 )); -printf ("TRANS_DP_CTL_B Port_Width_Selection\t\t\t[0x%lx] %s\n" , +printf ("DP_CTL_B Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("DP_CTL_B HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("DP_CTL_B Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); + + dword =INREG (DP_CTL_C ); +printf ("DP_CTL_C DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("DP_CTL_C Port_Width_Selection\t\t\t\t[0x%lx] %s\n" ,BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); -printf ("TRANS_DP_CTL_B Port_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); -printf ("TRANS_DP_CTL_B HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); -printf ("TRANS_DP_CTL_B Audio_Output_Enable\t\t\t%lu\n" ,BIT (dword,6 )); - - dword =INREG (TRANS_DP_CTL_C ); -printf ("TRANS_DP_CTL_C DisplayPort_Enable\t\t\t%lu\n" ,BIT (dword,31 )); -printf ("TRANS_DP_CTL_C Port_Width_Selection\t\t\t[0x%lx] %s\n" , +printf ("DP_CTL_C Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("DP_CTL_C HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("DP_CTL_C Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); + + dword =INREG (DP_CTL_D ); +printf ("DP_CTL_D DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("DP_CTL_D Port_Width_Selection\t\t\t\t[0x%lx] %s\n" ,BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); -printf ("TRANS_DP_CTL_C Port_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); -printf ("TRANS_DP_CTL_C HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); -printf ("TRANS_DP_CTL_C Audio_Output_Enable\t\t\t%lu\n" ,BIT (dword,6 )); +printf ("DP_CTL_D Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("DP_CTL_D HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("DP_CTL_D Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); dword =INREG (AUD_CONFIG_A ); printf("AUD_CONFIG_A Pixel_Clock_HDMI\t\t\t\t[0x%lx] %s\n", BITS(dword, 19, 16),
PATCH 9/18 intel_audio_dump: fix DP port width for CPT
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/intel_audio_dump.c +3 -2
@@ -142,8 +142,9 @@ static char *transcoder_select[] = {static char *dp_port_width[] = { [0 ] ="x1 mode" , [1 ] ="x2 mode" , - [2 ] ="x4 mode" , - [3 ] ="reserved" , + [2 ] ="reserved" , + [3 ] ="x4 mode" , + [4 ...7 ] ="reserved" , };static void do_self_tests (void )
PATCH 10/18 intel_audio_dump: explain Bits_per_Sample
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-)
tools/intel_audio_dump.c +22 -5
@@ -147,6 +147,16 @@ static char *dp_port_width[] = { [4 ... 7] = "reserved", }; +static char *bits_per_sample[] = { + [0 ] ="reserved" , + [1 ] ="16 bits" , + [2 ] ="24 bits" , + [3 ] ="32 bits" , + [4 ] ="20 bits" , + [5 ] ="reserved" , +}; + +static void do_self_tests (void ) {if (BIT (1 ,0 ) !=1 )
@@ -372,6 +382,8 @@ static void dump_eaglelake(void) dword =INREG (AUD_OUT_STR_DESC );printf ("AUD_OUT_STR_DESC stream channels\t%lu\n" ,BITS (dword,3 ,0 ) +1 ); +printf ("AUD_OUT_STR_DESC Bits per Sample\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 ))); dword =INREG (AUD_PINW_CAP );printf ("AUD_PINW_CAP widget type\t\t0x%lx\n" ,BITS (dword,23 ,20 ));
@@ -649,13 +661,15 @@ static void dump_ironlake(void) dword =INREG (AUD_OUT_STR_DESC_A );printf ("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 ));printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 ); -printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 )); +printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 )));printf ("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_B );printf ("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 ));printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 ); -printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 )); +printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 )));printf ("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_PINW_CONNLNG_SEL );
@@ -1053,19 +1067,22 @@ static void dump_cpt(void) dword =INREG (AUD_OUT_STR_DESC_A );printf ("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 ));printf ("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 ); -printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 )); +printf ("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 )));printf ("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_B );printf ("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 ));printf ("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 ); -printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 )); +printf ("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 )));printf ("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_OUT_STR_DESC_C );printf ("AUD_OUT_STR_DESC_C HBR_enable\t\t\t\t%lu\n" ,BITS (dword,28 ,27 ));printf ("AUD_OUT_STR_DESC_C Convertor_Channel_Count\t\t%lu\n" ,BITS (dword,20 ,16 ) +1 ); -printf ("AUD_OUT_STR_DESC_C Bits_per_Sample\t\t\t%lu\n" ,BITS (dword,6 ,4 )); +printf ("AUD_OUT_STR_DESC_C Bits_per_Sample\t\t\t[%#lx] %s\n" , +BITS (dword,6 ,4 ),OPNAME (bits_per_sample,BITS (dword,6 ,4 )));printf ("AUD_OUT_STR_DESC_C Number_of_Channels_in_a_Stream\t%lu\n" ,1 +BITS (dword,3 ,0 )); dword =INREG (AUD_PINW_CONNLNG_SEL );
PATCH 11/18 intel_audio_dump: show DP control registers for Ironlake
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
tools/intel_audio_dump.c +30 -0
@@ -508,6 +508,9 @@ static void dump_ironlake(void)dump_reg (HDMIB ,"sDVO/HDMI Port B Control" );dump_reg (HDMIC ,"HDMI Port C Control" );dump_reg (HDMID ,"HDMI Port D Control" ); +dump_reg (PCH_DP_B ,"DisplayPort B Control Register" ); +dump_reg (PCH_DP_C ,"DisplayPort C Control Register" ); +dump_reg (PCH_DP_D ,"DisplayPort D Control Register" );dump_reg (AUD_CONFIG_A ,"Audio Configuration - Transcoder A" );dump_reg (AUD_CONFIG_B ,"Audio Configuration - Transcoder B" );dump_reg (AUD_CTS_ENABLE_A ,"Audio CTS Programming Enable - Transcoder A" );
@@ -570,6 +573,33 @@ static void dump_ironlake(void)printf ("HDMID Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMID Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE )); + dword =INREG (PCH_DP_B ); +printf ("PCH_DP_B DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("PCH_DP_B Transcoder_Select\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" ); +printf ("PCH_DP_B Port_Width_Selection\t\t\t\t[0x%lx] %s\n" , +BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); +printf ("PCH_DP_B Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("PCH_DP_B HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("PCH_DP_B Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); + + dword =INREG (PCH_DP_C ); +printf ("PCH_DP_C DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("PCH_DP_C Transcoder_Select\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" ); +printf ("PCH_DP_C Port_Width_Selection\t\t\t\t[0x%lx] %s\n" , +BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); +printf ("PCH_DP_C Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("PCH_DP_C HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("PCH_DP_C Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); + + dword =INREG (PCH_DP_D ); +printf ("PCH_DP_D DisplayPort_Enable\t\t\t\t%lu\n" ,BIT (dword,31 )); +printf ("PCH_DP_D Transcoder_Select\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" ); +printf ("PCH_DP_D Port_Width_Selection\t\t\t\t[0x%lx] %s\n" , +BITS (dword,21 ,19 ), dp_port_width[BITS (dword,21 ,19 )]); +printf ("PCH_DP_D Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("PCH_DP_D HDCP_Port_Select\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("PCH_DP_D Audio_Output_Enable\t\t\t\t%lu\n" ,BIT (dword,6 )); + dword =INREG (AUD_CONFIG_A );printf ("AUD_CONFIG_A Pixel_Clock\t\t\t\t[0x%lx] %s\n" ,BITS (dword,19 ,16 ),OPNAME (pixel_clock,BITS (dword,19 ,16 )));
PATCH 12/18 intel_audio_dump: show detected chipset name
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/intel_audio_dump.c +7 -2
@@ -1250,12 +1250,17 @@ int main(int argc, char **argv)intel_get_mmio (pci_dev);if (IS_GEN6 (devid) ||IS_GEN7 (devid) ||getenv ("HAS_PCH_SPLIT" )) { +printf ("%s audio registers:\n\n" , +IS_GEN6 (devid) ?"SandyBridge" :"IvyBridge" );intel_check_pch ();dump_cpt (); - }else if (IS_GEN5 (devid)) + }else if (IS_GEN5 (devid)) { +printf ("Ironlake audio registers:\n\n" );dump_ironlake (); -else + }else if (IS_G4X (devid)) { +printf ("G45 audio registers:\n\n" );dump_eaglelake (); + }return 0 ; }
PATCH 13/18 intel_audio_dump: show ELD contents for G45
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/intel_audio_dump.c +8 -0
@@ -455,6 +455,14 @@ static void dump_eaglelake(void)printf ("\t\t\t\t\t[0x%x] %u => %lu \n" , dword, i,BITS (dword,7 ,4 )); } +printf ("AUD_HDMIW_HDMIEDID HDMI ELD:\n\t" ); + dword =INREG (AUD_CNTL_ST ); + dword &= ~BITMASK (8 ,5 ); +OUTREG (AUD_CNTL_ST , dword); +for (i =0 ; i <BITS (dword,14 ,10 ) /4 ; i++) +printf ("%08x " ,htonl (INREG (AUD_HDMIW_HDMIEDID ))); +printf ("\n" ); +printf ("AUD_HDMIW_INFOFR HDMI audio Infoframe:\n\t" ); dword =INREG (AUD_CNTL_ST ); dword &= ~BITMASK (20 ,18 );
PATCH 14/18 intel_audio_dump: show ironlake ELD_access_address
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 2 ++ 1 file changed, 2 insertions(+)
tools/intel_audio_dump.c +2 -0
@@ -725,6 +725,7 @@ static void dump_ironlake(void) BITS(dword, 17, 16), dip_trans[BITS(dword, 17, 16)]);printf ("AUD_CNTL_ST_A ELD_ACK\t\t\t\t\t%lu\n" ,BIT (dword,4 ));printf ("AUD_CNTL_ST_A ELD_buffer_size\t\t\t\t%lu\n" ,BITS (dword,14 ,10 )); +printf ("AUD_CNTL_ST_A ELD_access_address\t\t\t%lu\n" ,BITS (dword,9 ,5 )); dword =INREG (AUD_CNTL_ST_B ); printf("AUD_CNTL_ST_B DIP_Port_Select\t\t\t\t[%#lx] %s\n",
@@ -736,6 +737,7 @@ static void dump_ironlake(void) BITS(dword, 17, 16), dip_trans[BITS(dword, 17, 16)]);printf ("AUD_CNTL_ST_B ELD_ACK\t\t\t\t\t%lu\n" ,BIT (dword,4 ));printf ("AUD_CNTL_ST_B ELD_buffer_size\t\t\t\t%lu\n" ,BITS (dword,14 ,10 )); +printf ("AUD_CNTL_ST_B ELD_access_address\t\t\t%lu\n" ,BITS (dword,9 ,5 )); dword =INREG (AUD_CNTL_ST2 );printf ("AUD_CNTL_ST2 CP_ReadyB\t\t\t\t\t%lu\n" ,BIT (dword,1 ));
PATCH 15/18 intel_audio_dump: show VIDEO_DIP_CTL_* for CPT
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)
tools/intel_audio_dump.c +47 -0
@@ -872,6 +872,11 @@ static void dump_ironlake(void)#define AUD_OUT_STR_DESC_D 0xE5384#define AUD_CNTL_ST_D 0xE53B4 +#define VIDEO_DIP_CTL_A 0xE0200 +#define VIDEO_DIP_CTL_B 0xE1200 +#define VIDEO_DIP_CTL_C 0xE2200 +#define VIDEO_DIP_CTL_D 0xE3200 +static void dump_cpt (void ) {
@@ -924,6 +929,48 @@ static void dump_cpt(void)printf ("\nDetails:\n\n" ); + dword =INREG (VIDEO_DIP_CTL_A ); +printf ("VIDEO_DIP_CTL_A Enable_Graphics_DIP\t\t\t%ld\n" ,BIT (dword,31 )), +printf ("VIDEO_DIP_CTL_A GCP_DIP_enable\t\t\t\t%ld\n" ,BIT (dword,25 )), +printf ("VIDEO_DIP_CTL_A Video_DIP_type_enable AVI\t\t%lu\n" ,BIT (dword,21 )); +printf ("VIDEO_DIP_CTL_A Video_DIP_type_enable Vendor\t\t%lu\n" ,BIT (dword,22 )); +printf ("VIDEO_DIP_CTL_A Video_DIP_type_enable Gamut\t\t%lu\n" ,BIT (dword,23 )); +printf ("VIDEO_DIP_CTL_A Video_DIP_type_enable Source \t\t%lu\n" ,BIT (dword,24 )); +printf ("VIDEO_DIP_CTL_A Video_DIP_buffer_index\t\t\t[0x%lx] %s\n" , +BITS (dword,20 ,19 ), video_dip_index[BITS (dword,20 ,19 )]); +printf ("VIDEO_DIP_CTL_A Video_DIP_frequency\t\t\t[0x%lx] %s\n" , +BITS (dword,17 ,16 ), video_dip_trans[BITS (dword,17 ,16 )]); +printf ("VIDEO_DIP_CTL_A Video_DIP_buffer_size\t\t\t%lu\n" ,BITS (dword,11 ,8 )); +printf ("VIDEO_DIP_CTL_A Video_DIP_access_address\t\t%lu\n" ,BITS (dword,3 ,0 )); + + dword =INREG (VIDEO_DIP_CTL_B ); +printf ("VIDEO_DIP_CTL_B Enable_Graphics_DIP\t\t\t%ld\n" ,BIT (dword,31 )), +printf ("VIDEO_DIP_CTL_B GCP_DIP_enable\t\t\t\t%ld\n" ,BIT (dword,25 )), +printf ("VIDEO_DIP_CTL_B Video_DIP_type_enable AVI\t\t%lu\n" ,BIT (dword,21 )); +printf ("VIDEO_DIP_CTL_B Video_DIP_type_enable Vendor\t\t%lu\n" ,BIT (dword,22 )); +printf ("VIDEO_DIP_CTL_B Video_DIP_type_enable Gamut\t\t%lu\n" ,BIT (dword,23 )); +printf ("VIDEO_DIP_CTL_B Video_DIP_type_enable Source \t\t%lu\n" ,BIT (dword,24 )); +printf ("VIDEO_DIP_CTL_B Video_DIP_buffer_index\t\t\t[0x%lx] %s\n" , +BITS (dword,20 ,19 ), video_dip_index[BITS (dword,20 ,19 )]); +printf ("VIDEO_DIP_CTL_B Video_DIP_frequency\t\t\t[0x%lx] %s\n" , +BITS (dword,17 ,16 ), video_dip_trans[BITS (dword,17 ,16 )]); +printf ("VIDEO_DIP_CTL_B Video_DIP_buffer_size\t\t\t%lu\n" ,BITS (dword,11 ,8 )); +printf ("VIDEO_DIP_CTL_B Video_DIP_access_address\t\t%lu\n" ,BITS (dword,3 ,0 )); + + dword =INREG (VIDEO_DIP_CTL_C ); +printf ("VIDEO_DIP_CTL_C Enable_Graphics_DIP\t\t\t%ld\n" ,BIT (dword,31 )), +printf ("VIDEO_DIP_CTL_C GCP_DIP_enable\t\t\t\t%ld\n" ,BIT (dword,25 )), +printf ("VIDEO_DIP_CTL_C Video_DIP_type_enable AVI\t\t%lu\n" ,BIT (dword,21 )); +printf ("VIDEO_DIP_CTL_C Video_DIP_type_enable Vendor\t\t%lu\n" ,BIT (dword,22 )); +printf ("VIDEO_DIP_CTL_C Video_DIP_type_enable Gamut\t\t%lu\n" ,BIT (dword,23 )); +printf ("VIDEO_DIP_CTL_C Video_DIP_type_enable Source \t\t%lu\n" ,BIT (dword,24 )); +printf ("VIDEO_DIP_CTL_C Video_DIP_buffer_index\t\t\t[0x%lx] %s\n" , +BITS (dword,20 ,19 ), video_dip_index[BITS (dword,20 ,19 )]); +printf ("VIDEO_DIP_CTL_C Video_DIP_frequency\t\t\t[0x%lx] %s\n" , +BITS (dword,17 ,16 ), video_dip_trans[BITS (dword,17 ,16 )]); +printf ("VIDEO_DIP_CTL_C Video_DIP_buffer_size\t\t\t%lu\n" ,BITS (dword,11 ,8 )); +printf ("VIDEO_DIP_CTL_C Video_DIP_access_address\t\t%lu\n" ,BITS (dword,3 ,0 )); + dword =INREG (AUD_VID_DID );printf ("AUD_VID_DID vendor id\t\t\t\t\t0x%x\n" , dword >>16 );printf ("AUD_VID_DID device id\t\t\t\t\t0x%x\n" , dword &0xffff );
PATCH 16/18 intel_audio_dump: show HDMI encoding
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
tools/intel_audio_dump.c +18 -0
@@ -156,6 +156,12 @@ static char *bits_per_sample[] = { [5] = "reserved", }; +static char *sdvo_hdmi_encoding[] = { + [0 ] ="SDVO" , + [1 ] ="reserved" , + [2 ] ="TMDS" , + [3 ] ="reserved" , +};static void do_self_tests (void ) {
@@ -562,6 +568,8 @@ static void dump_ironlake(void)printf ("HDMIB Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMIB HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMIB Digital_Port_B_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIB Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMIB Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMIB Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -570,6 +578,8 @@ static void dump_ironlake(void)printf ("HDMIC Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMIC HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMIC Digital_Port_C_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIC Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMIC Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMIC Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -578,6 +588,8 @@ static void dump_ironlake(void)printf ("HDMID Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMID HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMID Digital_Port_D_Detected\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMID Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMID Null_packets_enabled_during_Vsync\t\t\t%u\n" , !!(dword &SDVO_NULL_PACKETS_DURING_VSYNC ));printf ("HDMID Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -988,6 +1000,8 @@ static void dump_cpt(void)printf ("HDMIB sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMIB HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMIB Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIB Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMIB HDMI_or_DVI_Select\t\t\t\t%s\n" ,BIT (dword,9 ) ?"HDMI" :"DVI" );printf ("HDMIB Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -998,6 +1012,8 @@ static void dump_cpt(void)printf ("HDMIC sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMIC HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMIC Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMIC Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMIC HDMI_or_DVI_Select\t\t\t\t%s\n" ,BIT (dword,9 ) ?"HDMI" :"DVI" );printf ("HDMIC Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
@@ -1008,6 +1024,8 @@ static void dump_cpt(void)printf ("HDMID sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMID HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 ));printf ("HDMID Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 )); +printf ("HDMID Encoding\t\t\t\t\t\t[0x%lx] %s\n" , +BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);printf ("HDMID HDMI_or_DVI_Select\t\t\t\t%s\n" ,BIT (dword,9 ) ?"HDMI" :"DVI" );printf ("HDMID Audio_Output_Enable\t\t\t\t%u\n" , !!(dword &SDVO_AUDIO_ENABLE ));
PATCH 17/18 intel_audio_dump: show interrupt enable bit
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/intel_audio_dump.c +4 -0
@@ -567,6 +567,7 @@ static void dump_ironlake(void)printf ("HDMIB HDMIB_Enable\t\t\t\t\t%u\n" , !!(dword &SDVO_ENABLE ));printf ("HDMIB Transcoder_Select\t\t\t\t\t%s\n" ,BIT (dword,30 ) ?"Transcoder B" :"Transcoder A" );printf ("HDMIB HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("HDMIB SDVOB Hot Plug Interrupt Detect Enable\t\t%lu\n" ,BIT (dword,23 ));printf ("HDMIB Digital_Port_B_Detected\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMIB Encoding\t\t\t\t\t\t[0x%lx] %s\n" ,BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);
@@ -999,6 +1000,7 @@ static void dump_cpt(void) BITS(dword, 30, 29), transcoder_select[BITS(dword, 30, 29)]);printf ("HDMIB sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMIB HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("HDMIB SDVO_HPD_Interrupt_Enable\t\t\t\t%lu\n" ,BIT (dword,23 ));printf ("HDMIB Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMIB Encoding\t\t\t\t\t\t[0x%lx] %s\n" ,BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);
@@ -1011,6 +1013,7 @@ static void dump_cpt(void) BITS(dword, 30, 29), transcoder_select[BITS(dword, 30, 29)]);printf ("HDMIC sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMIC HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("HDMIC SDVO_HPD_Interrupt_Enable\t\t\t\t%lu\n" ,BIT (dword,23 ));printf ("HDMIC Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMIC Encoding\t\t\t\t\t\t[0x%lx] %s\n" ,BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);
@@ -1023,6 +1026,7 @@ static void dump_cpt(void) BITS(dword, 30, 29), transcoder_select[BITS(dword, 30, 29)]);printf ("HDMID sDVO_Border_Enable\t\t\t\t%lu\n" ,BIT (dword,7 ));printf ("HDMID HDCP_Port_Select\t\t\t\t\t%lu\n" ,BIT (dword,5 )); +printf ("HDMID SDVO_HPD_Interrupt_Enable\t\t\t\t%lu\n" ,BIT (dword,23 ));printf ("HDMID Port_Detected\t\t\t\t\t%lu\n" ,BIT (dword,2 ));printf ("HDMID Encoding\t\t\t\t\t\t[0x%lx] %s\n" ,BITS (dword,11 ,10 ), sdvo_hdmi_encoding[BITS (dword,11 ,10 )]);
PATCH 18/18 intel_audio_dump: show Gamut Metadata DIP
In reply to Wu Fengguang--- tools/intel_audio_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_audio_dump.c +1 -1
@@ -112,7 +112,7 @@ static char *dip_trans[] = {static char *video_dip_index[] = { [0 ] ="AVI DIP" , [1 ] ="Vendor-specific DIP" , - [2 ] ="Reserved" , + [2 ] ="Gamut Metadata DIP" , [3 ] ="Source Product Description DIP" , };
Am Samstag, den 12.11.2011, 11:12 +0800 schrieb Wu Fengguang:
Quoted 2 lines
A bunch of cleanups, fixes and new fields to
intel_audio_dump, tested OK on G45, Ironlake and IvyBridge.
Christopher White mentioned some lacks in the documentation like missing dependencies. Could you update that too, please?
Thanks,
Paul
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
intel-gpu-tools: Please release new version (was: [PATCH 00/18] intel-gpu-tools: intel_audio_dump updates)
In reply to Wu FengguangAm Samstag, den 12.11.2011, 11:12 +0800 schrieb Wu Fengguang:
Quoted 2 lines
A bunch of cleanups, fixes and new fields to
intel_audio_dump, tested OK on G45, Ironlake and IvyBridge.
Christopher White mentioned the last release or tag happened a long time ago.
Is a new release planned? Most of the time distributions package those more easily.
Thanks,
Paul
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx