1 #ifndef HDA_CODEC_H 2 #define HDA_CODEC_H 3 4 typedef enum { 5 WT_AUDIO_OUTPUT = 0, 6 WT_AUDIO_INPUT = 1, 7 WT_AUDIO_MIXER = 2, 8 WT_AUDIO_SELECTOR = 3, 9 WT_PIN_COMPLEX = 4, 10 WT_POWER = 5, 11 WT_VOLUME_KNOB = 6, 12 WT_BEEP_GENERATOR = 7, 13 WT_VENDOR_DEFINED = 15 14 } hda_widget_type; 15 16 17 typedef enum { 18 PIN_DEV_LINE_OUT = 0, 19 PIN_DEV_SPEAKER, 20 PIN_DEV_HP_OUT, 21 PIN_DEV_CD, 22 PIN_DEV_SPDIF_OUT, 23 PIN_DEV_DIGITAL_OTHER_OUT, 24 PIN_DEV_MODEM_LINE_SIDE, 25 PIN_DEV_MODEM_HAND_SIDE, 26 PIN_DEV_LINE_IN, 27 PIN_DEV_AUX, 28 PIN_DEV_MIC_IN, 29 PIN_DEV_TELEPHONY, 30 PIN_DEV_SPDIF_IN, 31 PIN_DEV_DIGITAL_OTHER_IN, 32 PIN_DEV_RESERVED, 33 PIN_DEV_OTHER 34 } pin_dev_type; 35 36 37 /* Verb Helper Macro */ 38 #define MAKE_VERB(cad,nid,vid,payl) (((cad)<<28)|((nid)<<20)|(vid)|(payl)) 39 40 /* Verb IDs */ 41 #define VID_GET_PARAM 0xF0000 42 #define VID_GET_CONNSEL 0xF0100 43 #define VID_SET_CONNSEL 0x70100 44 #define VID_GET_CONNLENTRY 0xF0200 45 #define VID_GET_PROCSTATE 0xF0300 46 #define VID_SET_PROCSTATE 0x70300 47 #define VID_GET_COEFFIDX 0xD0000 48 #define VID_SET_COEFFIDX 0x50000 49 #define VID_GET_PROCCOEFF 0xC0000 50 #define VID_SET_PROCCOEFF 0x40000 51 #define VID_GET_AMPGAINMUTE 0xB0000 52 #define VID_SET_AMPGAINMUTE 0x30000 53 #define VID_GET_CONVFORMAT 0xA0000 54 #define VID_SET_CONVFORMAT 0x20000 55 #define VID_GET_DIGCVTCTRL 0xF0D00 56 #define VID_SET_DIGCVTCTRL1 0x70D00 57 #define VID_SET_DIGCVTCTRL2 0x70E00 58 #define VID_GET_POWERSTATE 0xF0500 59 #define VID_SET_POWERSTATE 0x70500 60 #define VID_GET_CVTSTRCHN 0xF0600 61 #define VID_SET_CVTSTRCHN 0x70600 62 #define VID_GET_SDISELECT 0xF0400 63 #define VID_SET_SDISELECT 0x70400 64 #define VID_GET_PINWCTRL 0xF0700 65 #define VID_SET_PINWCTRL 0x70700 66 #define VID_GET_UNSOLRESP 0xF0800 67 #define VID_SET_UNSOLRESP 0x70800 68 #define VID_GET_PINSENSE 0xF0900 69 #define VID_SET_PINSENSE 0x70900 70 #define VID_GET_EAPDBTL_EN 0xF0C00 71 #define VID_SET_EAPDBTL_EN 0x70C00 72 #define VID_GET_GPIDATA 0xF1000 73 #define VID_SET_GPIDATA 0x71000 74 #define VID_GET_GPIWAKE_EN 0xF1100 75 #define VID_SET_GPIWAKE_EN 0x71100 76 #define VID_GET_GPIUNSOL 0xF1200 77 #define VID_SET_GPIUNSOL 0x71200 78 #define VID_GET_GPISTICKY 0xF1300 79 #define VID_SET_GPISTICKY 0x71300 80 #define VID_GET_GPODATA 0xF1400 81 #define VID_SET_GPODATA 0x71400 82 #define VID_GET_GPIODATA 0xF1500 83 #define VID_SET_GPIODATA 0x71500 84 #define VID_GET_GPIO_EN 0xF1600 85 #define VID_SET_GPIO_EN 0x71600 86 #define VID_GET_GPIO_DIR 0xF1700 87 #define VID_SET_GPIO_DIR 0x71700 88 #define VID_GET_GPIOWAKE_EN 0xF1800 89 #define VID_SET_GPIOWAKE_EN 0x71800 90 #define VID_GET_GPIOUNSOL_EN 0xF1900 91 #define VID_SET_GPIOUNSOL_EN 0x71900 92 #define VID_GET_GPIOSTICKY 0xF1A00 93 #define VID_SET_GPIOSTICKY 0x71A00 94 #define VID_GET_BEEPGEN 0xF0A00 95 #define VID_SET_BEEPGEN 0x70A00 96 #define VID_GET_VOLUMEKNOB 0xF0F00 97 #define VID_SET_VOLUMEKNOB 0x70F00 98 #define VID_GET_SUBSYSTEMID 0xF2000 99 #define VID_SET_SUBSYSTEMID1 0x72000 100 #define VID_SET_SUBSYSTEMID2 0x72100 101 #define VID_SET_SUBSYSTEMID3 0x72200 102 #define VID_SET_SUBSYSTEMID4 0x72300 103 #define VID_GET_CFGDEFAULT 0xF1C00 104 #define VID_SET_CFGDEFAULT1 0x71C00 105 #define VID_SET_CFGDEFAULT2 0x71D00 106 #define VID_SET_CFGDEFAULT3 0x71E00 107 #define VID_SET_CFGDEFAULT4 0x71F00 108 #define VID_GET_STRIPECTRL 0xF2400 109 #define VID_SET_STRIPECTRL 0x72000 110 #define VID_FUNCTION_RESET 0x7FF00 111 112 /* Parameter IDs */ 113 #define PID_VENDORID 0x00 114 #define PID_REVISIONID 0x02 115 #define PID_SUBORD_NODE_COUNT 0x04 116 #define PID_FUNCGRP_TYPE 0x05 117 #define PID_AUDIO_FG_CAP 0x08 118 #define PID_AUDIO_WIDGET_CAP 0x09 119 #define PID_PCM_SUPPORT 0x0A 120 #define PID_STREAM_SUPPORT 0x0B 121 #define PID_PIN_CAP 0x0C 122 #define PID_INPUT_AMP_CAP 0x0D 123 #define PID_CONNLIST_LEN 0x0E 124 #define PID_POWERSTATE_SUPPORT 0x0F 125 #define PID_PROCESSING_CAP 0x10 126 #define PID_GPIO_COUNT 0x11 127 #define PID_OUTPUT_AMP_CAP 0x12 128 #define PID_VOLUMEKNOB_CAP 0x13 129 130 #endif /* HDA_CODEC_H */ 131