.. | .. |
---|
2 | 2 | /* |
---|
3 | 3 | * ALSA SoC TLV320AIC31xx CODEC Driver Definitions |
---|
4 | 4 | * |
---|
5 | | - * Copyright (C) 2014-2017 Texas Instruments Incorporated - http://www.ti.com/ |
---|
| 5 | + * Copyright (C) 2014-2017 Texas Instruments Incorporated - https://www.ti.com/ |
---|
6 | 6 | */ |
---|
7 | 7 | |
---|
8 | 8 | #ifndef _TLV320AIC31XX_H |
---|
.. | .. |
---|
19 | 19 | #define AIC31XX_STEREO_CLASS_D_BIT BIT(1) |
---|
20 | 20 | #define AIC31XX_MINIDSP_BIT BIT(2) |
---|
21 | 21 | #define DAC31XX_BIT BIT(3) |
---|
| 22 | + |
---|
| 23 | +#define AIC31XX_JACK_MASK (SND_JACK_HEADPHONE | \ |
---|
| 24 | + SND_JACK_HEADSET | \ |
---|
| 25 | + SND_JACK_BTN_0) |
---|
22 | 26 | |
---|
23 | 27 | enum aic31xx_type { |
---|
24 | 28 | AIC3100 = 0, |
---|
.. | .. |
---|
173 | 177 | #define AIC31XX_HPRDRVPWRSTATUS_MASK BIT(1) |
---|
174 | 178 | #define AIC31XX_SPRDRVPWRSTATUS_MASK BIT(0) |
---|
175 | 179 | |
---|
| 180 | +/* AIC31XX_OFFLAG */ |
---|
| 181 | +#define AIC31XX_DAC_OF_LEFT BIT(7) |
---|
| 182 | +#define AIC31XX_DAC_OF_RIGHT BIT(6) |
---|
| 183 | +#define AIC31XX_DAC_OF_SHIFTER BIT(5) |
---|
| 184 | +#define AIC31XX_ADC_OF BIT(3) |
---|
| 185 | +#define AIC31XX_ADC_OF_SHIFTER BIT(1) |
---|
| 186 | + |
---|
176 | 187 | /* AIC31XX_INTRDACFLAG */ |
---|
177 | 188 | #define AIC31XX_HPLSCDETECT BIT(7) |
---|
178 | 189 | #define AIC31XX_HPRSCDETECT BIT(6) |
---|
.. | .. |
---|
191 | 202 | #define AIC31XX_SC BIT(3) |
---|
192 | 203 | #define AIC31XX_ENGINE BIT(2) |
---|
193 | 204 | |
---|
194 | | -/* AIC31XX_DACSETUP */ |
---|
195 | | -#define AIC31XX_SOFTSTEP_MASK GENMASK(1, 0) |
---|
| 205 | +/* AIC31XX_GPIO1 */ |
---|
| 206 | +#define AIC31XX_GPIO1_FUNC_MASK GENMASK(5, 2) |
---|
| 207 | +#define AIC31XX_GPIO1_FUNC_SHIFT 2 |
---|
| 208 | +#define AIC31XX_GPIO1_DISABLED 0x00 |
---|
| 209 | +#define AIC31XX_GPIO1_INPUT 0x01 |
---|
| 210 | +#define AIC31XX_GPIO1_GPI 0x02 |
---|
| 211 | +#define AIC31XX_GPIO1_GPO 0x03 |
---|
| 212 | +#define AIC31XX_GPIO1_CLKOUT 0x04 |
---|
| 213 | +#define AIC31XX_GPIO1_INT1 0x05 |
---|
| 214 | +#define AIC31XX_GPIO1_INT2 0x06 |
---|
| 215 | +#define AIC31XX_GPIO1_ADC_WCLK 0x07 |
---|
| 216 | +#define AIC31XX_GPIO1_SBCLK 0x08 |
---|
| 217 | +#define AIC31XX_GPIO1_SWCLK 0x09 |
---|
| 218 | +#define AIC31XX_GPIO1_ADC_MOD_CLK 0x10 |
---|
| 219 | +#define AIC31XX_GPIO1_SDOUT 0x11 |
---|
196 | 220 | |
---|
197 | 221 | /* AIC31XX_DACMUTE */ |
---|
198 | 222 | #define AIC31XX_DACMUTE_MASK GENMASK(3, 2) |
---|
199 | 223 | |
---|
| 224 | +/* AIC31XX_HSDETECT */ |
---|
| 225 | +#define AIC31XX_HSD_ENABLE BIT(7) |
---|
| 226 | +#define AIC31XX_HSD_TYPE_MASK GENMASK(6, 5) |
---|
| 227 | +#define AIC31XX_HSD_TYPE_SHIFT 5 |
---|
| 228 | +#define AIC31XX_HSD_NONE 0x00 |
---|
| 229 | +#define AIC31XX_HSD_HP 0x01 |
---|
| 230 | +#define AIC31XX_HSD_HS 0x03 |
---|
| 231 | + |
---|
| 232 | +/* AIC31XX_HPDRIVER */ |
---|
| 233 | +#define AIC31XX_HPD_OCMV_MASK GENMASK(4, 3) |
---|
| 234 | +#define AIC31XX_HPD_OCMV_SHIFT 3 |
---|
| 235 | +#define AIC31XX_HPD_OCMV_1_35V 0x0 |
---|
| 236 | +#define AIC31XX_HPD_OCMV_1_5V 0x1 |
---|
| 237 | +#define AIC31XX_HPD_OCMV_1_65V 0x2 |
---|
| 238 | +#define AIC31XX_HPD_OCMV_1_8V 0x3 |
---|
| 239 | + |
---|
200 | 240 | /* AIC31XX_MICBIAS */ |
---|
201 | 241 | #define AIC31XX_MICBIAS_MASK GENMASK(1, 0) |
---|
202 | 242 | #define AIC31XX_MICBIAS_SHIFT 0 |
---|