Lines Matching +full:8 +full:- +full:15

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * rt5616.h -- RT5616 ALSA SoC audio driver
17 /* I/O - Output */
21 /* I/O - Input */
24 /* I/O - ADC/DAC/DMIC */
28 /* Mixer - D-D */
33 /* Mixer - ADC */
38 /* Mixer - DAC */
57 /* Format - ADC/DAC */
62 /* Function - Analog */
75 /* Function - Digital */
152 #define RT5616_L_MUTE (0x1 << 15)
153 #define RT5616_L_MUTE_SFT 15
160 #define RT5616_L_VOL_MASK (0x3f << 8)
161 #define RT5616_L_VOL_SFT 8
166 #define RT5616_EN_DFO (0x1 << 15)
172 #define RT5616_BST_MASK2 (0xf<<8)
173 #define RT5616_BST_SFT2 8
180 #define RT5616_INL_VOL_MASK (0x1f << 8)
181 #define RT5616_INL_VOL_SFT 8
190 #define RT5616_DAC_L1_VOL_MASK (0xff << 8)
191 #define RT5616_DAC_L1_VOL_SFT 8
196 #define RT5616_DAC_L2_VOL_MASK (0xff << 8)
197 #define RT5616_DAC_L2_VOL_SFT 8
202 #define RT5616_ADC_L_VOL_MASK (0x7f << 8)
203 #define RT5616_ADC_L_VOL_SFT 8
208 #define RT5616_M_MONO_ADC_L (0x1 << 15)
209 #define RT5616_M_MONO_ADC_L_SFT 15
210 #define RT5616_MONO_ADC_L_VOL_MASK (0x7f << 8)
211 #define RT5616_MONO_ADC_L_VOL_SFT 8
232 #define RT5616_M_ADCMIX_L (0x1 << 15)
233 #define RT5616_M_ADCMIX_L_SFT 15
248 #define RT5616_DAC_R1_STO_L_VOL_MASK (0x1 << 8)
249 #define RT5616_DAC_R1_STO_L_VOL_SFT 8
286 #define RT5616_M_STO_L_DAC_L (0x1 << 15)
287 #define RT5616_M_STO_L_DAC_L_SFT 15
300 #define RT5616_DAC_R2_DAC_R_VOL_MASK (0x1 << 8)
301 #define RT5616_DAC_R2_DAC_R_VOL_SFT 8
304 #define RT5616_RXDP_SRC_MASK (0x1 << 15)
305 #define RT5616_RXDP_SRC_SFT 15
306 #define RT5616_RXDP_SRC_NOR (0x0 << 15)
307 #define RT5616_RXDP_SRC_DIV3 (0x1 << 15)
333 #define RT5616_RXDC_SEL_MASK (0x3 << 8)
334 #define RT5616_RXDC_SEL_SFT 8
335 #define RT5616_RXDC_SEL_NOR (0x0 << 8)
336 #define RT5616_RXDC_SEL_L2R (0x1 << 8)
337 #define RT5616_RXDC_SEL_R2L (0x2 << 8)
338 #define RT5616_RXDC_SEL_SWAP (0x3 << 8)
429 #define RT5616_G_DAC_L2_SM_L_MASK (0x3 << 8)
430 #define RT5616_G_DAC_L2_SM_L_SFT 8
451 #define RT5616_G_DAC_R2_SM_R_MASK (0x3 << 8)
452 #define RT5616_G_DAC_R2_SM_R_SFT 8
467 #define RT5616_M_DAC_R1_SPM_L (0x1 << 15)
468 #define RT5616_M_DAC_R1_SPM_L_SFT 15
491 #define RT5616_M_DAC_R2_MM (0x1 << 15)
492 #define RT5616_M_DAC_R2_MM_SFT 15
565 #define RT5616_M_DAC_L1_LM (0x1 << 15)
566 #define RT5616_M_DAC_L1_LM_SFT 15
577 #define RT5616_PWR_I2S1 (0x1 << 15)
578 #define RT5616_PWR_I2S1_BIT 15
591 #define RT5616_PWR_ADC_STO1_F (0x1 << 15)
592 #define RT5616_PWR_ADC_STO1_F_BIT 15
597 #define RT5616_PWR_VREF1 (0x1 << 15)
598 #define RT5616_PWR_VREF1_BIT 15
626 #define RT5616_PWR_BST1 (0x1 << 15)
627 #define RT5616_PWR_BST1_BIT 15
648 #define RT5616_PWR_OM_L (0x1 << 15)
649 #define RT5616_PWR_OM_L_BIT 15
668 #define RT5616_PWR_IN1_R (0x1 << 8)
669 #define RT5616_PWR_IN1_R_BIT 8
676 #define RT5616_I2S_MS_MASK (0x1 << 15)
677 #define RT5616_I2S_MS_SFT 15
678 #define RT5616_I2S_MS_M (0x0 << 15)
679 #define RT5616_I2S_MS_S (0x1 << 15)
685 #define RT5616_I2S_I_CP_MASK (0x3 << 8)
686 #define RT5616_I2S_I_CP_SFT 8
687 #define RT5616_I2S_I_CP_OFF (0x0 << 8)
688 #define RT5616_I2S_I_CP_U_LAW (0x1 << 8)
689 #define RT5616_I2S_I_CP_A_LAW (0x2 << 8)
739 #define RT5616_TDM_INTEL_SEL_MASK (0x1 << 15)
740 #define RT5616_TDM_INTEL_SEL_SFT 15
741 #define RT5616_TDM_INTEL_SEL_64 (0x0 << 15)
742 #define RT5616_TDM_INTEL_SEL_50 (0x1 << 15)
763 #define RT5616_TDM_ADC_START_SEL_MASK (0x1 << 8)
764 #define RT5616_TDM_ADC_START_SEL_SFT 8
765 #define RT5616_TDM_ADC_START_SEL_SL0 (0x0 << 8)
766 #define RT5616_TDM_ADC_START_SEL_SL4 (0x1 << 8)
793 #define RT5616_TDM_LRCK_POL_SEL_MASK (0x1 << 15)
794 #define RT5616_TDM_LRCK_POL_SEL_SFT 15
795 #define RT5616_TDM_LRCK_POL_SEL_NOR (0x0 << 15)
796 #define RT5616_TDM_LRCK_POL_SEL_INV (0x1 << 15)
815 #define RT5616_TDM_TRAN_EDGE_SEL_MASK (0x1 << 8)
816 #define RT5616_TDM_TRAN_EDGE_SEL_SFT 8
817 #define RT5616_TDM_TRAN_EDGE_SEL_POS (0x0 << 8)
818 #define RT5616_TDM_TRAN_EDGE_SEL_NEG (0x1 << 8)
861 #define RT5616_STO1_T_MASK (0x1 << 15)
862 #define RT5616_STO1_T_SFT 15
863 #define RT5616_STO1_T_SCLK (0x0 << 15)
864 #define RT5616_STO1_T_LRCK1 (0x1 << 15)
879 #define RT5616_STO1_ASRC_EN (0x1 << 15)
880 #define RT5616_STO1_ASRC_EN_SFT 15
912 #define RT5616_I2S2_RATE_MASK (0xf << 8)
913 #define RT5616_I2S2_RATE_SFT 8
930 #define RT5616_I2S2_PD_MASK (0x7 << 8)
931 #define RT5616_I2S2_PD_SFT 8
936 #define RT5616_FSI2_RATE_MASK (0xf << 8)
937 #define RT5616_FSI2_RATE_SFT 8
944 #define RT5616_HP_OC_TH_MASK (0x3 << 8)
945 #define RT5616_HP_OC_TH_SFT 8
946 #define RT5616_HP_OC_TH_90 (0x0 << 8)
947 #define RT5616_HP_OC_TH_105 (0x1 << 8)
948 #define RT5616_HP_OC_TH_120 (0x2 << 8)
949 #define RT5616_HP_OC_TH_135 (0x3 << 8)
952 #define RT5616_SMT_TRIG_MASK (0x1 << 15)
953 #define RT5616_SMT_TRIG_SFT 15
954 #define RT5616_SMT_TRIG_DIS (0x0 << 15)
955 #define RT5616_SMT_TRIG_EN (0x1 << 15)
960 #define RT5616_HP_R_SMT_MASK (0x1 << 8)
961 #define RT5616_HP_R_SMT_SFT 8
962 #define RT5616_HP_R_SMT_DIS (0x0 << 8)
963 #define RT5616_HP_R_SMT_EN (0x1 << 8)
1014 #define RT5616_MRES_MASK (0x3 << 8)
1015 #define RT5616_MRES_SFT 8
1016 #define RT5616_MRES_15MO (0x0 << 8)
1017 #define RT5616_MRES_25MO (0x1 << 8)
1018 #define RT5616_MRES_35MO (0x2 << 8)
1019 #define RT5616_MRES_45MO (0x3 << 8)
1034 #define RT5616_CP_FQ1_MASK (0x7 << 8)
1035 #define RT5616_CP_FQ1_SFT 8
1058 #define RT5616_PM_HP_MASK (0x3 << 8)
1059 #define RT5616_PM_HP_SFT 8
1060 #define RT5616_PM_HP_LV (0x0 << 8)
1061 #define RT5616_PM_HP_MV (0x1 << 8)
1062 #define RT5616_PM_HP_HV (0x2 << 8)
1071 #define RT5616_MIC1_BS_MASK (0x1 << 15)
1072 #define RT5616_MIC1_BS_SFT 15
1073 #define RT5616_MIC1_BS_9AV (0x0 << 15)
1074 #define RT5616_MIC1_BS_75AV (0x1 << 15)
1104 #define RT5616_JD_MODE_SEL_MASK (0x3 << 8)
1105 #define RT5616_JD_MODE_SEL_SFT 8
1106 #define RT5616_JD_MODE_SEL_M0 (0x0 << 8)
1107 #define RT5616_JD_MODE_SEL_M1 (0x1 << 8)
1108 #define RT5616_JD_MODE_SEL_M2 (0x2 << 8)
1126 #define RT5616_EQ_SRC_MASK (0x1 << 15)
1127 #define RT5616_EQ_SRC_SFT 15
1128 #define RT5616_EQ_SRC_DAC (0x0 << 15)
1129 #define RT5616_EQ_SRC_ADC (0x1 << 15)
1136 #define RT5616_EQ_DITH_MASK (0x3 << 8)
1137 #define RT5616_EQ_DITH_SFT 8
1138 #define RT5616_EQ_DITH_NOR (0x0 << 8)
1139 #define RT5616_EQ_DITH_LSB (0x1 << 8)
1140 #define RT5616_EQ_DITH_LSB_1 (0x2 << 8)
1141 #define RT5616_EQ_DITH_LSB_2 (0x3 << 8)
1160 #define RT5616_EQ_HPF1_M_MASK (0x1 << 8)
1161 #define RT5616_EQ_HPF1_M_SFT 8
1162 #define RT5616_EQ_HPF1_M_HI (0x0 << 8)
1163 #define RT5616_EQ_HPF1_M_1ST (0x1 << 8)
1199 #define RT5616_MT_MASK (0x1 << 15)
1200 #define RT5616_MT_SFT 15
1201 #define RT5616_MT_DIS (0x0 << 15)
1202 #define RT5616_MT_EN (0x1 << 15)
1205 #define RT5616_DRC_AGC_P_MASK (0x1 << 15)
1206 #define RT5616_DRC_AGC_P_SFT 15
1207 #define RT5616_DRC_AGC_P_DAC (0x0 << 15)
1208 #define RT5616_DRC_AGC_P_ADC (0x1 << 15)
1215 #define RT5616_DRC_AGC_AR_MASK (0x1f << 8)
1216 #define RT5616_DRC_AGC_AR_SFT 8
1229 #define RT5616_DRC_AGC_POB_MASK (0x3f << 8)
1230 #define RT5616_DRC_AGC_POB_SFT 8
1282 #define RT5616_JD_SPL_TRG_MASK (0x1 << 8)
1283 #define RT5616_JD_SPL_TRG_SFT 8
1284 #define RT5616_JD_SPL_TRG_LO (0x0 << 8)
1285 #define RT5616_JD_SPL_TRG_HI (0x1 << 8)
1311 #define RT5616_JD3_IRQ_EN (0x1 << 8)
1312 #define RT5616_JD3_IRQ_EN_SFT 8
1319 #define RT5616_IRQ_JD_MASK (0x1 << 15)
1320 #define RT5616_IRQ_JD_SFT 15
1321 #define RT5616_IRQ_JD_BP (0x0 << 15)
1322 #define RT5616_IRQ_JD_NOR (0x1 << 15)
1333 #define RT5616_JD1_1_EN_STKY (0x1 << 8)
1334 #define RT5616_JD1_1_EN_STKY_SFT 8
1351 #define RT5616_IRQ_MB1_OC_MASK (0x1 << 15)
1352 #define RT5616_IRQ_MB1_OC_SFT 15
1353 #define RT5616_IRQ_MB1_OC_BP (0x0 << 15)
1354 #define RT5616_IRQ_MB1_OC_NOR (0x1 << 15)
1370 #define RT5616_STA_JD3 (0x1 << 15)
1371 #define RT5616_STA_JD3_BIT 15
1384 #define RT5616_STA_GP1 (0x1 << 8)
1385 #define RT5616_STA_GP1_BIT 8
1396 #define RT5616_GP1_PIN_MASK (0x1 << 15)
1397 #define RT5616_GP1_PIN_SFT 15
1398 #define RT5616_GP1_PIN_GPIO1 (0x0 << 15)
1399 #define RT5616_GP1_PIN_IRQ (0x1 << 15)
1408 #define RT5616_I2S2_SEL_MASK (0x1 << 8)
1409 #define RT5616_I2S2_SEL_SFT 8
1410 #define RT5616_I2S2_SEL_I2S (0x0 << 8)
1411 #define RT5616_I2S2_SEL_GPIO (0x1 << 8)
1458 #define RT5616_GP3_DR_MASK (0x1 << 8)
1459 #define RT5616_GP3_DR_SFT 8
1460 #define RT5616_GP3_DR_IN (0x0 << 8)
1461 #define RT5616_GP3_DR_OUT (0x1 << 8)
1496 #define RT5616_GP8_DR_MASK (0x1 << 8)
1497 #define RT5616_GP8_DR_SFT 8
1498 #define RT5616_GP8_DR_IN (0x0 << 8)
1499 #define RT5616_GP8_DR_OUT (0x1 << 8)
1534 #define RT5616_SCB_SWAP_MASK (0x1 << 15)
1535 #define RT5616_SCB_SWAP_SFT 15
1536 #define RT5616_SCB_SWAP_DIS (0x0 << 15)
1537 #define RT5616_SCB_SWAP_EN (0x1 << 15)
1544 #define RT5616_BB_MASK (0x1 << 15)
1545 #define RT5616_BB_SFT 15
1546 #define RT5616_BB_DIS (0x0 << 15)
1547 #define RT5616_BB_EN (0x1 << 15)
1556 #define RT5616_M_BB_R_MASK (0x1 << 8)
1557 #define RT5616_M_BB_R_SFT 8
1566 #define RT5616_M_MP3_L_MASK (0x1 << 15)
1567 #define RT5616_M_MP3_L_SFT 15
1574 #define RT5616_EG_MP3_MASK (0x1f << 8)
1575 #define RT5616_EG_MP3_SFT 8
1590 #define RT5616_OG_MP3_MASK (0x1f << 8)
1591 #define RT5616_OG_MP3_SFT 8
1596 #define RT5616_3D_CF_MASK (0x1 << 15)
1597 #define RT5616_3D_CF_SFT 15
1598 #define RT5616_3D_CF_DIS (0x0 << 15)
1599 #define RT5616_3D_CF_EN (0x1 << 15)
1616 #define RT5616_M_3D_D2H_MASK (0x1 << 8)
1617 #define RT5616_M_3D_D2H_SFT 8
1624 #define RT5616_2ND_HPF_MASK (0x1 << 15)
1625 #define RT5616_2ND_HPF_SFT 15
1626 #define RT5616_2ND_HPF_DIS (0x0 << 15)
1627 #define RT5616_2ND_HPF_EN (0x1 << 15)
1630 #define RT5616_HPF_CF_R_MASK (0x7 << 8)
1631 #define RT5616_HPF_CF_R_SFT 8
1642 #define RT5616_HPF_CF_L_NUM_MASK (0x3f << 8)
1643 #define RT5616_HPF_CF_L_NUM_SFT 8
1685 #define RT5616_SV_MASK (0x1 << 15)
1686 #define RT5616_SV_SFT 15
1687 #define RT5616_SV_DIS (0x0 << 15)
1688 #define RT5616_SV_EN (0x1 << 15)
1715 #define RT5616_ZCD_HP_MASK (0x1 << 15)
1716 #define RT5616_ZCD_HP_SFT 15
1717 #define RT5616_ZCD_HP_DIS (0x0 << 15)
1718 #define RT5616_ZCD_HP_EN (0x1 << 15)
1721 #define RT5616_I2S2_MS_SP_MASK (0x1 << 8)
1722 #define RT5616_I2S2_MS_SP_SEL 8
1723 #define RT5616_I2S2_MS_SP_64 (0x0 << 8)
1724 #define RT5616_I2S2_MS_SP_50 (0x1 << 8)
1734 #define RT5616_3D_SPK_MASK (0x1 << 15)
1735 #define RT5616_3D_SPK_SFT 15
1736 #define RT5616_3D_SPK_DIS (0x0 << 15)
1737 #define RT5616_3D_SPK_EN (0x1 << 15)
1740 #define RT5616_3D_SPK_CG_MASK (0x1f << 8)
1741 #define RT5616_3D_SPK_CG_SFT 8
1746 #define RT5616_WND_MASK (0x1 << 15)
1747 #define RT5616_WND_SFT 15
1748 #define RT5616_WND_DIS (0x0 << 15)
1749 #define RT5616_WND_EN (0x1 << 15)
1771 /* Wind Noise Detection Control 8 (0x73) */
1772 #define RT5616_WND_WIND_MASK (0x1 << 13) /* Read-Only */
1774 #define RT5616_WND_STRONG_MASK (0x1 << 12) /* Read-Only */