Print this page
10619 audiohd ignores digital output pins such as HDMI/DP
*** 130,139 ****
--- 130,140 ----
#define AUDIOHD_PIN_NUMS 6
#define AUDIOHD_PIN_NO_CONN 0x40000000
#define AUDIOHD_PIN_IN_ENABLE 0x20
#define AUDIOHD_PIN_OUT_ENABLE 0x40
#define AUDIOHD_PIN_PRES_MASK 0x80000000
+ #define AUDIOHD_PIN_ELDV_MASK 0x40000000
#define AUDIOHD_PIN_CONTP_OFF 0x1e
#define AUDIOHD_PIN_CON_JACK 0
#define AUDIOHD_PIN_CON_FIXED 0x2
#define AUDIOHD_PIN_CONTP_MASK 0x3
#define AUDIOHD_PIN_VREF_L1 0x20
*** 340,350 ****
#define AUDIOHDC_VERB_GET_UNS_ENABLE 0xf08
#define AUDIOHDC_VERB_SET_UNS_ENABLE 0x708
#define AUDIOHDC_VERB_GET_PIN_SENSE 0xf09
- #define AUDIOHDC_VERB_GET_PIN_SENSE 0xf09
#define AUDIOHDC_VERB_EXEC_PIN_SENSE 0x709
#define AUDIOHDC_VERB_GET_BEEP_GEN 0xf0a
#define AUDIOHDC_VERB_SET_BEEP_GEN 0x70a
--- 341,350 ----
*** 368,377 ****
--- 368,386 ----
#define AUDIOHDC_VERB_SET_GPIO_DATA 0x715
#define AUDIOHDC_VERB_GET_GPIO_STCK 0xf1a
#define AUDIOHDC_VERB_SET_GPIO_STCK 0x71a
+ #define AUDIOHDC_VERB_GET_DIP_SIZE 0xf2e
+ #define AUDIOHDC_VERB_GET_ELD 0xf2f
+
+ #define AUDIOHDC_VERB_SET_DIP_INDEX 0x730
+ #define AUDIOHDC_VERB_SET_DIP_DATA 0x731
+ #define AUDIOHDC_VERB_SET_DIP_XMIT 0x732
+
+ #define AUDIOHDC_VERB_SET_ASP_CHMAP 0x734
+
#define AUDIOHDC_GPIO_ENABLE 0xff
#define AUDIOHDC_GPIO_DIRECT 0xf1
#define AUDIOHDC_GPIO_DATA_CTRL 0xff
#define AUDIOHDC_GPIO_STCK_CTRL 0xff
*** 481,490 ****
--- 490,599 ----
#define AUDIOHD_SAMP_RATE48 0x00000040
#define AUDIOHD_SAMP_RATE96 0x00000100
#define AUDIOHD_SAMP_RATE192 0x00000400
/*
+ * Data Island Packet - Size info
+ */
+ #define AUDIOHD_DIP_SIZE_AF 0x0
+ #define AUDIOHD_DIP_SIZE_ELD 0x8
+ #define AUDIOHD_DIP_SIZE_ELD_MASK 0xff
+
+ /*
+ * Data Island Packet - Data
+ */
+ #define AUDIOHD_DIP_DATA_LEN 32
+
+ /*
+ * Data Island Packet - Xmit
+ */
+ #define AUDIOHD_DIP_XMIT_STOP 0x00
+ #define AUDIOHD_DIP_XMIT_ONCE 0x80
+ #define AUDIOHD_DIP_XMIT_BEST_EFFORT 0xc0
+
+ /*
+ * EDID-like data (ELD)
+ */
+ typedef struct {
+ uint8_t sad_nchan:3;
+ uint8_t sad_format:4;
+ uint8_t sad_rsvd:1;
+ uint8_t sad_freq;
+ uint8_t sad_bitr;
+ } audiohd_sad_t;
+
+ #define AUDIOHD_SAD_FORMAT_LPCM 1
+ #define AUDIOHD_SAD_FORMAT_AC3 2
+ #define AUDIOHD_SAD_FORMAT_MPEG1 3
+ #define AUDIOHD_SAD_FORMAT_MP3 4
+ #define AUDIOHD_SAD_FORMAT_MPEG2 5
+ #define AUDIOHD_SAD_FORMAT_AAC 6
+ #define AUDIOHD_SAD_FORMAT_DTS 7
+ #define AUDIOHD_SAD_FORMAT_ATRAC 8
+ #define AUDIOHD_SAD_FORMAT_SACD 9
+ #define AUDIOHD_SAD_FORMAT_DDPLUS 10
+ #define AUDIOHD_SAD_FORMAT_DTSHD 11
+ #define AUDIOHD_SAD_FORMAT_MLP 12
+ #define AUDIOHD_SAD_FORMAT_DST 13
+ #define AUDIOHD_SAD_FORMAT_WMA 14
+
+ #define AUDIOHD_SAD_FREQ_32 0x1
+ #define AUDIOHD_SAD_FREQ_44 0x2
+ #define AUDIOHD_SAD_FREQ_48 0x4
+ #define AUDIOHD_SAD_FREQ_88 0x8
+ #define AUDIOHD_SAD_FREQ_96 0x10
+ #define AUDIOHD_SAD_FREQ_176 0x20
+ #define AUDIOHD_SAD_FREQ_192 0x40
+
+ #define AUDIOHD_SAD_BITRATE_16 0x1
+ #define AUDIOHD_SAD_BITRATE_20 0x2
+ #define AUDIOHD_SAD_BITRATE_24 0x4
+
+ typedef struct {
+ uint8_t eld_rsvd1:3;
+ uint8_t eld_ver:5;
+ uint8_t eld_rsvd2;
+ uint8_t eld_baseline_size;
+ uint8_t eld_rsvd3;
+ uint8_t eld_mnl:5;
+ uint8_t eld_cea_edid_ver:3;
+ uint8_t eld_hdcp:1;
+ uint8_t eld_s_ai:1;
+ uint8_t eld_conn_type:2;
+ uint8_t eld_sad_count:4;
+ uint8_t eld_aud_synch_delay;
+ uint8_t eld_channels;
+ uint64_t eld_port_id;
+ char eld_manufacturer_name[2];
+ char eld_product_code[2];
+ char eld_monitor_name[16];
+ audiohd_sad_t eld_cea_sad[15];
+ size_t eld_size;
+ } audiohd_eld_t;
+
+ #define AUDIOHD_ELD_HDR_LEN 4
+
+ #define AUDIOHD_ELD_VER_2 0x02
+ #define AUDIOHD_ELD_VER_NODRV 0x1f
+ #define AUDIOHD_ELD_MAX_MNL 16
+ #define AUDIOHD_ELD_CEA_861 1
+ #define AUDIOHD_ELD_CEA_861_A 2
+ #define AUDIOHD_ELD_CEA_861_BCD 3
+
+ #define AUDIOHD_ELD_CONN_HDMI 0
+ #define AUDIOHD_ELD_CONN_DP 1
+
+ #define AUDIOHD_ELD_CHAN_FLR 0x01 /* front left/right */
+ #define AUDIOHD_ELD_CHAN_LFE 0x02 /* low frequency effect */
+ #define AUDIOHD_ELD_CHAN_FC 0x04 /* front center */
+ #define AUDIOHD_ELD_CHAN_RLR 0x08 /* rear left/right */
+ #define AUDIOHD_ELD_CHAN_RC 0x10 /* rear center */
+ #define AUDIOHD_ELD_CHAN_FLRC 0x20 /* front left/right of center */
+ #define AUDIOHD_ELD_CHAN_RLRC 0x40 /* rear left/right of center */
+
+
+ /*
* buffer descriptor list entry of stream descriptor
*/
typedef struct {
uint64_t sbde_addr;
uint32_t sbde_len;
*** 517,527 ****
DTYPE_HP_OUT,
DTYPE_CD,
DTYPE_SPDIF_OUT,
DTYPE_DIGIT_OUT,
DTYPE_MODEM_SIDE,
! DTYPE_MODEM_HNAD_SIDE,
DTYPE_LINE_IN,
DTYPE_AUX,
DTYPE_MIC_IN,
DTYPE_TEL,
DTYPE_SPDIF_IN,
--- 626,636 ----
DTYPE_HP_OUT,
DTYPE_CD,
DTYPE_SPDIF_OUT,
DTYPE_DIGIT_OUT,
DTYPE_MODEM_SIDE,
! DTYPE_MODEM_HAND_SIDE,
DTYPE_LINE_IN,
DTYPE_AUX,
DTYPE_MIC_IN,
DTYPE_TEL,
DTYPE_SPDIF_IN,
*** 757,766 ****
--- 866,877 ----
int mg_gain[AUDIOHD_MAX_CONN];
int mg_wid[AUDIOHD_MAX_CONN];
int num;
int finish;
+ /* EDID-like data for HDMI/DP */
+ audiohd_eld_t *eld;
};
typedef struct {
ddi_dma_handle_t ad_dmahdl;
ddi_acc_handle_t ad_acchdl;