0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _ES8316_H
0009 #define _ES8316_H
0010
0011
0012
0013
0014
0015
0016 #define ES8316_RESET 0x00
0017
0018
0019 #define ES8316_CLKMGR_CLKSW 0x01
0020 #define ES8316_CLKMGR_CLKSEL 0x02
0021 #define ES8316_CLKMGR_ADCOSR 0x03
0022 #define ES8316_CLKMGR_ADCDIV1 0x04
0023 #define ES8316_CLKMGR_ADCDIV2 0x05
0024 #define ES8316_CLKMGR_DACDIV1 0x06
0025 #define ES8316_CLKMGR_DACDIV2 0x07
0026 #define ES8316_CLKMGR_CPDIV 0x08
0027
0028
0029 #define ES8316_SERDATA1 0x09
0030 #define ES8316_SERDATA_ADC 0x0a
0031 #define ES8316_SERDATA_DAC 0x0b
0032
0033
0034 #define ES8316_SYS_VMIDSEL 0x0c
0035 #define ES8316_SYS_PDN 0x0d
0036 #define ES8316_SYS_LP1 0x0e
0037 #define ES8316_SYS_LP2 0x0f
0038 #define ES8316_SYS_VMIDLOW 0x10
0039 #define ES8316_SYS_VSEL 0x11
0040 #define ES8316_SYS_REF 0x12
0041
0042
0043 #define ES8316_HPMIX_SEL 0x13
0044 #define ES8316_HPMIX_SWITCH 0x14
0045 #define ES8316_HPMIX_PDN 0x15
0046 #define ES8316_HPMIX_VOL 0x16
0047
0048
0049 #define ES8316_CPHP_OUTEN 0x17
0050 #define ES8316_CPHP_ICAL_VOL 0x18
0051 #define ES8316_CPHP_PDN1 0x19
0052 #define ES8316_CPHP_PDN2 0x1a
0053 #define ES8316_CPHP_LDOCTL 0x1b
0054
0055
0056 #define ES8316_CAL_TYPE 0x1c
0057 #define ES8316_CAL_SET 0x1d
0058 #define ES8316_CAL_HPLIV 0x1e
0059 #define ES8316_CAL_HPRIV 0x1f
0060 #define ES8316_CAL_HPLMV 0x20
0061 #define ES8316_CAL_HPRMV 0x21
0062
0063
0064 #define ES8316_ADC_PDN_LINSEL 0x22
0065 #define ES8316_ADC_PGAGAIN 0x23
0066 #define ES8316_ADC_D2SEPGA 0x24
0067 #define ES8316_ADC_DMIC 0x25
0068 #define ES8316_ADC_MUTE 0x26
0069 #define ES8316_ADC_VOLUME 0x27
0070 #define ES8316_ADC_ALC1 0x29
0071 #define ES8316_ADC_ALC2 0x2a
0072 #define ES8316_ADC_ALC3 0x2b
0073 #define ES8316_ADC_ALC4 0x2c
0074 #define ES8316_ADC_ALC5 0x2d
0075 #define ES8316_ADC_ALC_NG 0x2e
0076
0077
0078 #define ES8316_DAC_PDN 0x2f
0079 #define ES8316_DAC_SET1 0x30
0080 #define ES8316_DAC_SET2 0x31
0081 #define ES8316_DAC_SET3 0x32
0082 #define ES8316_DAC_VOLL 0x33
0083 #define ES8316_DAC_VOLR 0x34
0084
0085
0086 #define ES8316_GPIO_SEL 0x4d
0087 #define ES8316_GPIO_DEBOUNCE 0x4e
0088 #define ES8316_GPIO_FLAG 0x4f
0089
0090
0091 #define ES8316_TESTMODE 0x50
0092 #define ES8316_TEST1 0x51
0093 #define ES8316_TEST2 0x52
0094 #define ES8316_TEST3 0x53
0095
0096
0097
0098
0099
0100
0101 #define ES8316_RESET_CSM_ON 0x80
0102
0103
0104 #define ES8316_CLKMGR_CLKSW_MCLK_ON 0x40
0105 #define ES8316_CLKMGR_CLKSW_BCLK_ON 0x20
0106
0107
0108 #define ES8316_SERDATA1_MASTER 0x80
0109 #define ES8316_SERDATA1_BCLK_INV 0x20
0110
0111
0112 #define ES8316_SERDATA2_FMT_MASK 0x3
0113 #define ES8316_SERDATA2_FMT_I2S 0x00
0114 #define ES8316_SERDATA2_FMT_LEFTJ 0x01
0115 #define ES8316_SERDATA2_FMT_RIGHTJ 0x02
0116 #define ES8316_SERDATA2_FMT_PCM 0x03
0117 #define ES8316_SERDATA2_ADCLRP 0x20
0118 #define ES8316_SERDATA2_LEN_MASK 0x1c
0119 #define ES8316_SERDATA2_LEN_24 0x00
0120 #define ES8316_SERDATA2_LEN_20 0x04
0121 #define ES8316_SERDATA2_LEN_18 0x08
0122 #define ES8316_SERDATA2_LEN_16 0x0c
0123 #define ES8316_SERDATA2_LEN_32 0x10
0124
0125
0126 #define ES8316_GPIO_ENABLE_INTERRUPT 0x02
0127
0128
0129 #define ES8316_GPIO_FLAG_GM_NOT_SHORTED 0x02
0130 #define ES8316_GPIO_FLAG_HP_NOT_INSERTED 0x04
0131
0132 #endif