hda_proc - Add a number of new settings to proc codec output
PATCH 1/1 hda_proc - Add a number of new settings to proc codec output
This patch adds additional output to the /proc codec#X info. The following pieces of information are added to the output:
- Balanced, L/R swap, trigger, impedance sense pin capabilities - Vref pin capabilities - Current Vref pin widget control setting - Default configuration association, sequence, and misc bit test - EAPD/BTL bits conveying balanced mode, EAPD, and L/R swap - Power state modified to show state name as well as setting vs actual value - GPIO parameter output on Audio Function Group, including enumeration of IO
pins which are indicated present (Any I and O pins are not output at this time)
- Stripe and L/R swap widget capabilities
- All digital converter bits: enable, validity, validity config, preemphasis, copyright, non-audio, professional, generation level, and content category
- Converter stream and channel values for in/out widgets - SDI select value for in widgets - Unsolicited response widget capability tag and enabled bit - Delay widget capability value - Processing widget capability benign bit and number of coefficients - Realtek Define Registers: processing coefficient, coefficient index
pci/hda/hda_codec.h +42 -0
@@ -84,7 +84,9 @@ enum {#define AC_VERB_GET_GPIO_DATA 0x0f15#define AC_VERB_GET_GPIO_MASK 0x0f16#define AC_VERB_GET_GPIO_DIRECTION 0x0f17 +#define AC_VERB_GET_GPIO_WAKE_MASK 0x0f18#define AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK 0x0f19 +#define AC_VERB_GET_GPIO_STICKY_MASK 0x0f1a#define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c/* f20: AFG/MFG */ #define AC_VERB_GET_SUBSYSTEM_ID 0x0f20
@@ -112,7 +114,9 @@ enum {#define AC_VERB_SET_GPIO_DATA 0x715#define AC_VERB_SET_GPIO_MASK 0x716#define AC_VERB_SET_GPIO_DIRECTION 0x717 +#define AC_VERB_SET_GPIO_WAKE_MASK 0x718#define AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK 0x719 +#define AC_VERB_SET_GPIO_STICKY_MASK 0x71a#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_0 0x71c#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1 0x71d#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2 0x71e
@@ -185,6 +189,27 @@ enum {#define AC_SUPFMT_FLOAT32 (1<<1)#define AC_SUPFMT_AC3 (1<<2) +/* GP I/O count */ +#define AC_GPIO_IO_COUNT (0xff<<0) +#define AC_GPIO_O_COUNT (0xff<<8) +#define AC_GPIO_O_COUNT_SHIFT 8 +#define AC_GPIO_I_COUNT (0xff<<16) +#define AC_GPIO_I_COUNT_SHIFT 16 +#define AC_GPIO_UNSOLICITED (1<<30) +#define AC_GPIO_WAKE (1<<31) + +/* Converter stream, channel */ +#define AC_CONV_CHANNEL (0xf<<0) +#define AC_CONV_STREAM (0xf<<4) +#define AC_CONV_STREAM_SHIFT 4 + +/* Input converter SDI select */ +#define AC_SDI_SELECT (0xf<<0) + +/* Unsolicited response */ +#define AC_UNSOL_TAG (0x3f<<0) +#define AC_UNSOL_ENABLED (1<<7) +/* Pin widget capabilies */ #define AC_PINCAP_IMP_SENSE (1<<0)/* impedance sense capable */ #define AC_PINCAP_TRIG_REQ (1<<1)/* trigger required */
@@ -230,6 +255,9 @@ enum {#define AC_PWRST_D3SUP (1<<3)/* Power state values */ +#define AC_PWRST_SETTING (0xf<<0) +#define AC_PWRST_ACTUAL (0xf<<4) +#define AC_PWRST_ACTUAL_SHIFT 4#define AC_PWRST_D0 0x00#define AC_PWRST_D1 0x01#define AC_PWRST_D2 0x02
@@ -238,6 +266,7 @@ enum {/* Processing capabilies */ #define AC_PCAP_BENIGN (1<<0)#define AC_PCAP_NUM_COEF (0xff<<8) +#define AC_PCAP_NUM_COEF_SHIFT 8/* Volume knobs capabilities */ #define AC_KNBCAP_NUM_STEPS (0x7f<<0)
@@ -273,6 +302,9 @@ enum {#define AC_DIG1_NONAUDIO (1<<5)#define AC_DIG1_PROFESSIONAL (1<<6)#define AC_DIG1_LEVEL (1<<7) + +/* DIGITAL2 bits */ +#define AC_DIG2_CC (0x7f<<0)/* Pin widget control - 8bit */ #define AC_PINCTL_VREFEN (0x7<<0)
@@ -288,12 +320,22 @@ enum {/* Unsolicited response - 8bit */ #define AC_USRSP_EN (1<<7) +/* Pin sense - 32bit */ +#define AC_PINSENSE_IMPEDANCE_MASK (0x7fffffff) +#define AC_PINSENSE_PRESENCE (1<<31) + +/* EAPD/BTL enable - 32bit */ +#define AC_EAPDBTL_BALANCED (1<<0) +#define AC_EAPDBTL_EAPD (1<<1) +#define AC_EAPDBTL_LR_SWAP (1<<2) +/* configuration default - 32bit */ #define AC_DEFCFG_SEQUENCE (0xf<<0)#define AC_DEFCFG_DEF_ASSOC (0xf<<4)#define AC_DEFCFG_ASSOC_SHIFT 4#define AC_DEFCFG_MISC (0xf<<8)#define AC_DEFCFG_MISC_SHIFT 8 +#define AC_DEFCFG_MISC_NO_PRESENCE (1<<0)#define AC_DEFCFG_COLOR (0xf<<12)#define AC_DEFCFG_COLOR_SHIFT 12#define AC_DEFCFG_CONN_TYPE (0xf<<16)
pci/hda/hda_proc.c +236 -17
323 lines not on this page · raw message
Takashi,
Please refer to the second post of the patch and disregard the first one. I noticed the EAPD status was being printed in the wrong location (my chipset doesn't have EAPD, so I didn't realize until it was too late), so I changed it in the second post.
Thanks,
-Andrew
At Fri, 18 Jan 2008 02:05:43 -0400,
Quoted 22 lines · Andrew Paprocki
This patch adds additional output to the /proc codec#X info. The following pieces of information are added to the output:
(quoted diff) +0
-15- Balanced, L/R swap, trigger, impedance sense pin capabilities - Vref pin capabilities - Current Vref pin widget control setting - Default configuration association, sequence, and misc bit test - EAPD/BTL bits conveying balanced mode, EAPD, and L/R swap - Power state modified to show state name as well as setting vs actual value - GPIO parameter output on Audio Function Group, including enumeration of IO pins which are indicated present (Any I and O pins are not output at this time) - Stripe and L/R swap widget capabilities - All digital converter bits: enable, validity, validity config, preemphasis, copyright, non-audio, professional, generation level, and content category - Converter stream and channel values for in/out widgets - SDI select value for in widgets - Unsolicited response widget capability tag and enabled bit - Delay widget capability value - Processing widget capability benign bit and number of coefficients - Realtek Define Registers: processing coefficient, coefficient index
Quoted 1 line
Signed-off-by Andrew Paprocki <[email protected]>
Thanks. Applied with a bit of modifications (tab/space fixes and code clean ups).
Takashi