Lines Matching +full:0 +full:x84c0
39 { RT5631_SPK_OUT_VOL, 0x8888 },
40 { RT5631_HP_OUT_VOL, 0x8080 },
41 { RT5631_MONO_AXO_1_2_VOL, 0xa080 },
42 { RT5631_AUX_IN_VOL, 0x0808 },
43 { RT5631_ADC_REC_MIXER, 0xf0f0 },
44 { RT5631_VDAC_DIG_VOL, 0x0010 },
45 { RT5631_OUTMIXER_L_CTRL, 0xffc0 },
46 { RT5631_OUTMIXER_R_CTRL, 0xffc0 },
47 { RT5631_AXO1MIXER_CTRL, 0x88c0 },
48 { RT5631_AXO2MIXER_CTRL, 0x88c0 },
49 { RT5631_DIG_MIC_CTRL, 0x3000 },
50 { RT5631_MONO_INPUT_VOL, 0x8808 },
51 { RT5631_SPK_MIXER_CTRL, 0xf8f8 },
52 { RT5631_SPK_MONO_OUT_CTRL, 0xfc00 },
53 { RT5631_SPK_MONO_HP_OUT_CTRL, 0x4440 },
54 { RT5631_SDP_CTRL, 0x8000 },
55 { RT5631_MONO_SDP_CTRL, 0x8000 },
56 { RT5631_STEREO_AD_DA_CLK_CTRL, 0x2010 },
57 { RT5631_GEN_PUR_CTRL_REG, 0x0e00 },
58 { RT5631_INT_ST_IRQ_CTRL_2, 0x071a },
59 { RT5631_MISC_CTRL, 0x2040 },
60 { RT5631_DEPOP_FUN_CTRL_2, 0x8000 },
61 { RT5631_SOFT_VOL_CTRL, 0x07e0 },
62 { RT5631_ALC_CTRL_1, 0x0206 },
63 { RT5631_ALC_CTRL_3, 0x2000 },
64 { RT5631_PSEUDO_SPATL_CTRL, 0x0553 },
93 return snd_soc_component_write(component, RT5631_RESET, 0); in rt5631_reset()
169 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
170 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0);
171 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
172 /* {0, +20, +24, +30, +35, +40, +44, +50, +52}dB */
174 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
175 1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0),
176 2, 2, TLV_DB_SCALE_ITEM(2400, 0, 0),
177 3, 5, TLV_DB_SCALE_ITEM(3000, 500, 0),
178 6, 6, TLV_DB_SCALE_ITEM(4400, 0, 0),
179 7, 7, TLV_DB_SCALE_ITEM(5000, 0, 0),
180 8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0)
189 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag; in rt5631_dmic_get()
191 return 0; in rt5631_dmic_get()
200 rt5631->dmic_used_flag = ucontrol->value.integer.value[0]; in rt5631_dmic_put()
201 return 0; in rt5631_dmic_put()
229 RT5631_MIC1_BOOST_SHIFT, 8, 0, mic_bst_tlv),
232 RT5631_MIC2_BOOST_SHIFT, 8, 0, mic_bst_tlv),
255 RT5631_L_EN_SHIFT, RT5631_R_EN_SHIFT, 1, 0),
272 SOC_SINGLE_EXT("DMIC Switch", 0, 0, 1, 0,
373 RT5631_EN_ONE_BIT_DEPOP, 0); in onebit_depop_power_stage()
377 snd_soc_component_write(component, RT5631_SOFT_VOL_CTRL, 0); in onebit_depop_power_stage()
379 snd_soc_component_write(component, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); in onebit_depop_power_stage()
382 rt5631_write_index(component, RT5631_TEST_MODE_CTRL, 0x84c0); in onebit_depop_power_stage()
383 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x309f); in onebit_depop_power_stage()
384 rt5631_write_index(component, RT5631_CP_INTL_REG2, 0x6530); in onebit_depop_power_stage()
390 snd_soc_component_write(component, RT5631_DEPOP_FUN_CTRL_2, 0); in onebit_depop_power_stage()
412 RT5631_EN_ONE_BIT_DEPOP, 0); in onebit_depop_mute_stage()
416 snd_soc_component_write(component, RT5631_SOFT_VOL_CTRL, 0); in onebit_depop_mute_stage()
418 snd_soc_component_write(component, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); in onebit_depop_mute_stage()
422 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x307f); in onebit_depop_mute_stage()
424 RT5631_L_MUTE | RT5631_R_MUTE, 0); in onebit_depop_mute_stage()
455 snd_soc_component_write(component, RT5631_SOFT_VOL_CTRL, 0); in depop_seq_power_stage()
457 snd_soc_component_write(component, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); in depop_seq_power_stage()
460 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x303e); in depop_seq_power_stage()
479 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x303F); in depop_seq_power_stage()
490 RT5631_PWR_HP_DEPOP_DIS, 0); in depop_seq_power_stage()
503 RT5631_PWR_HP_R_AMP, 0); in depop_seq_power_stage()
528 snd_soc_component_write(component, RT5631_SOFT_VOL_CTRL, 0); in depop_seq_mute_stage()
530 snd_soc_component_write(component, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); in depop_seq_mute_stage()
535 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x302f); in depop_seq_mute_stage()
542 RT5631_L_MUTE | RT5631_R_MUTE, 0); in depop_seq_mute_stage()
546 rt5631_write_index(component, RT5631_SPK_INTL_CTRL, 0x302f); in depop_seq_mute_stage()
572 onebit_depop_mute_stage(component, 0); in hp_event()
573 onebit_depop_power_stage(component, 0); in hp_event()
575 depop_seq_mute_stage(component, 0); in hp_event()
576 depop_seq_power_stage(component, 0); in hp_event()
594 return 0; in hp_event()
630 return 0; in set_dmic_params()
868 RT5631_PWR_PLL1_BIT, 0, NULL, 0),
882 RT5631_PWR_MICBIAS1_VOL_BIT, 0),
884 RT5631_PWR_MICBIAS2_VOL_BIT, 0),
888 RT5631_PWR_MIC1_BOOT_GAIN_BIT, 0, NULL, 0),
890 RT5631_PWR_MIC2_BOOT_GAIN_BIT, 0, NULL, 0),
892 RT5631_PWR_MONO_IN_P_VOL_BIT, 0, NULL, 0),
894 RT5631_PWR_MONO_IN_N_VOL_BIT, 0, NULL, 0),
896 RT5631_PWR_AXIL_IN_VOL_BIT, 0, NULL, 0),
898 RT5631_PWR_AXIR_IN_VOL_BIT, 0, NULL, 0),
901 SND_SOC_DAPM_MIXER("MONO_IN", SND_SOC_NOPM, 0, 0, NULL, 0),
905 RT5631_PWR_RECMIXER_L_BIT, 0,
906 &rt5631_recmixl_mixer_controls[0],
909 RT5631_PWR_RECMIXER_R_BIT, 0,
910 &rt5631_recmixr_mixer_controls[0],
914 SND_SOC_DAPM_MIXER("ADC Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
918 RT5631_DMIC_ENA_SHIFT, 0,
922 RT5631_ADC_DATA_SEL_MIC1_SHIFT, 0, NULL, 0),
924 RT5631_ADC_DATA_SEL_MIC2_SHIFT, 0, NULL, 0),
928 RT5631_PWR_MANAG_ADD1, RT5631_PWR_ADC_L_CLK_BIT, 0),
930 RT5631_PWR_MANAG_ADD1, RT5631_PWR_ADC_R_CLK_BIT, 0),
934 RT5631_PWR_MAIN_I2S_BIT, 0, NULL, 0),
936 RT5631_PWR_DAC_REF_BIT, 0, NULL, 0),
941 RT5631_PWR_MANAG_ADD1, RT5631_PWR_DAC_L_CLK_BIT, 0),
943 RT5631_PWR_MANAG_ADD1, RT5631_PWR_DAC_R_CLK_BIT, 0),
945 SND_SOC_NOPM, 0, 0),
946 SND_SOC_DAPM_PGA("Voice DAC Boost", SND_SOC_NOPM, 0, 0, NULL, 0),
949 RT5631_PWR_DAC_L_TO_MIXER_BIT, 0, NULL, 0),
951 RT5631_PWR_DAC_R_TO_MIXER_BIT, 0, NULL, 0),
955 RT5631_PWR_SPKMIXER_L_BIT, 0,
956 &rt5631_spkmixl_mixer_controls[0],
960 RT5631_PWR_OUTMIXER_L_BIT, 0,
961 &rt5631_outmixl_mixer_controls[0],
965 RT5631_PWR_OUTMIXER_R_BIT, 0,
966 &rt5631_outmixr_mixer_controls[0],
970 RT5631_PWR_SPKMIXER_R_BIT, 0,
971 &rt5631_spkmixr_mixer_controls[0],
976 RT5631_PWR_SPK_L_VOL_BIT, 0,
979 RT5631_PWR_HP_L_OUT_VOL_BIT, 0,
982 RT5631_PWR_LOUT_VOL_BIT, 0,
985 RT5631_PWR_ROUT_VOL_BIT, 0,
988 RT5631_PWR_HP_R_OUT_VOL_BIT, 0,
991 RT5631_PWR_SPK_R_VOL_BIT, 0,
995 SND_SOC_DAPM_PGA_S("Left DAC_HP", 0, SND_SOC_NOPM, 0, 0, NULL, 0),
996 SND_SOC_DAPM_PGA_S("Right DAC_HP", 0, SND_SOC_NOPM, 0, 0, NULL, 0),
999 SND_SOC_DAPM_PGA_S("HP Depop", 1, SND_SOC_NOPM, 0, 0,
1004 RT5631_PWR_AXO1MIXER_BIT, 0,
1005 &rt5631_AXO1MIX_mixer_controls[0],
1008 SND_SOC_DAPM_MIXER("SPOLMIX Mixer", SND_SOC_NOPM, 0, 0,
1009 &rt5631_spolmix_mixer_controls[0],
1013 RT5631_PWR_MONOMIXER_BIT, 0,
1014 &rt5631_monomix_mixer_controls[0],
1017 SND_SOC_DAPM_MIXER("SPORMIX Mixer", SND_SOC_NOPM, 0, 0,
1018 &rt5631_spormix_mixer_controls[0],
1022 RT5631_PWR_AXO2MIXER_BIT, 0,
1023 &rt5631_AXO2MIX_mixer_controls[0],
1027 SND_SOC_DAPM_MUX("SPOL Mux", SND_SOC_NOPM, 0, 0,
1029 SND_SOC_DAPM_MUX("SPOR Mux", SND_SOC_NOPM, 0, 0,
1031 SND_SOC_DAPM_MUX("MONO Mux", SND_SOC_NOPM, 0, 0,
1033 SND_SOC_DAPM_MUX("HPL Mux", SND_SOC_NOPM, 0, 0,
1035 SND_SOC_DAPM_MUX("HPR Mux", SND_SOC_NOPM, 0, 0,
1040 RT5631_PWR_MONO_DEPOP_DIS_BIT, 0, NULL, 0),
1042 RT5631_PWR_CLASS_D_BIT, 0, NULL, 0),
1224 {2048000, 8192000, 0x0ea0},
1225 {3686400, 8192000, 0x4e27},
1226 {12000000, 8192000, 0x456b},
1227 {13000000, 8192000, 0x495f},
1228 {13100000, 8192000, 0x0320},
1229 {2048000, 11289600, 0xf637},
1230 {3686400, 11289600, 0x2f22},
1231 {12000000, 11289600, 0x3e2f},
1232 {13000000, 11289600, 0x4d5b},
1233 {13100000, 11289600, 0x363b},
1234 {2048000, 16384000, 0x1ea0},
1235 {3686400, 16384000, 0x9e27},
1236 {12000000, 16384000, 0x452b},
1237 {13000000, 16384000, 0x542f},
1238 {13100000, 16384000, 0x03a0},
1239 {2048000, 16934400, 0xe625},
1240 {3686400, 16934400, 0x9126},
1241 {12000000, 16934400, 0x4d2c},
1242 {13000000, 16934400, 0x742f},
1243 {13100000, 16934400, 0x3c27},
1244 {2048000, 22579200, 0x2aa0},
1245 {3686400, 22579200, 0x2f20},
1246 {12000000, 22579200, 0x7e2f},
1247 {13000000, 22579200, 0x742f},
1248 {13100000, 22579200, 0x3c27},
1249 {2048000, 24576000, 0x2ea0},
1250 {3686400, 24576000, 0xee27},
1251 {12000000, 24576000, 0x2915},
1252 {13000000, 24576000, 0x772e},
1253 {13100000, 24576000, 0x0d20},
1254 {26000000, 24576000, 0x2027},
1255 {26000000, 22579200, 0x392f},
1256 {24576000, 22579200, 0x0921},
1257 {24576000, 24576000, 0x02a0},
1261 {256000, 2048000, 0x46f0},
1262 {256000, 4096000, 0x3ea0},
1263 {352800, 5644800, 0x3ea0},
1264 {512000, 8192000, 0x3ea0},
1265 {1024000, 8192000, 0x46f0},
1266 {705600, 11289600, 0x3ea0},
1267 {1024000, 16384000, 0x3ea0},
1268 {1411200, 22579200, 0x3ea0},
1269 {1536000, 24576000, 0x3ea0},
1270 {2048000, 16384000, 0x1ea0},
1271 {2822400, 22579200, 0x1ea0},
1272 {2822400, 45158400, 0x5ec0},
1273 {5644800, 45158400, 0x46f0},
1274 {3072000, 24576000, 0x1ea0},
1275 {3072000, 49152000, 0x5ec0},
1276 {6144000, 49152000, 0x46f0},
1277 {705600, 11289600, 0x3ea0},
1278 {705600, 8467200, 0x3ab0},
1279 {24576000, 24576000, 0x02a0},
1280 {1411200, 11289600, 0x1690},
1281 {2822400, 11289600, 0x0a90},
1282 {1536000, 12288000, 0x1690},
1283 {3072000, 12288000, 0x0a90},
1288 {2048000, 8000 * 32, 8000, 0x1000},
1289 {2048000, 8000 * 64, 8000, 0x0000},
1290 {2822400, 11025 * 32, 11025, 0x1000},
1291 {2822400, 11025 * 64, 11025, 0x0000},
1292 {4096000, 16000 * 32, 16000, 0x1000},
1293 {4096000, 16000 * 64, 16000, 0x0000},
1294 {5644800, 22050 * 32, 22050, 0x1000},
1295 {5644800, 22050 * 64, 22050, 0x0000},
1296 {8192000, 32000 * 32, 32000, 0x1000},
1297 {8192000, 32000 * 64, 32000, 0x0000},
1298 {11289600, 44100 * 32, 44100, 0x1000},
1299 {11289600, 44100 * 64, 44100, 0x0000},
1300 {12288000, 48000 * 32, 48000, 0x1000},
1301 {12288000, 48000 * 64, 48000, 0x0000},
1302 {22579200, 88200 * 32, 88200, 0x1000},
1303 {22579200, 88200 * 64, 88200, 0x0000},
1304 {24576000, 96000 * 32, 96000, 0x1000},
1305 {24576000, 96000 * 64, 96000, 0x0000},
1307 {4096000, 8000 * 32, 8000, 0x3000},
1308 {4096000, 8000 * 64, 8000, 0x2000},
1309 {5644800, 11025 * 32, 11025, 0x3000},
1310 {5644800, 11025 * 64, 11025, 0x2000},
1311 {8192000, 16000 * 32, 16000, 0x3000},
1312 {8192000, 16000 * 64, 16000, 0x2000},
1313 {11289600, 22050 * 32, 22050, 0x3000},
1314 {11289600, 22050 * 64, 22050, 0x2000},
1315 {16384000, 32000 * 32, 32000, 0x3000},
1316 {16384000, 32000 * 64, 32000, 0x2000},
1317 {22579200, 44100 * 32, 44100, 0x3000},
1318 {22579200, 44100 * 64, 44100, 0x2000},
1319 {24576000, 48000 * 32, 48000, 0x3000},
1320 {24576000, 48000 * 64, 48000, 0x2000},
1321 {45158400, 88200 * 32, 88200, 0x3000},
1322 {45158400, 88200 * 64, 88200, 0x2000},
1323 {49152000, 96000 * 32, 96000, 0x3000},
1324 {49152000, 96000 * 64, 96000, 0x2000},
1326 {24576000, 8000 * 32, 8000, 0x7080},
1327 {24576000, 8000 * 64, 8000, 0x6080},
1328 {24576000, 16000 * 32, 16000, 0x5080},
1329 {24576000, 16000 * 64, 16000, 0x4080},
1330 {24576000, 24000 * 32, 24000, 0x5000},
1331 {24576000, 24000 * 64, 24000, 0x4000},
1332 {24576000, 32000 * 32, 32000, 0x3080},
1333 {24576000, 32000 * 64, 32000, 0x2080},
1334 {22579200, 11025 * 32, 11025, 0x7000},
1335 {22579200, 11025 * 64, 11025, 0x6000},
1336 {22579200, 22050 * 32, 22050, 0x5000},
1337 {22579200, 22050 * 64, 22050, 0x4000},
1344 for (i = 0; i < ARRAY_SIZE(coeff_div); i++) { in get_coeff()
1358 unsigned int iface = 0; in rt5631_hifi_pcm_params()
1363 if (rt5631->bclk_rate < 0) { in rt5631_hifi_pcm_params()
1375 if (coeff < 0) { in rt5631_hifi_pcm_params()
1401 return 0; in rt5631_hifi_pcm_params()
1409 unsigned int iface = 0; in rt5631_hifi_codec_set_dai_fmt()
1419 rt5631->master = 0; in rt5631_hifi_codec_set_dai_fmt()
1453 return 0; in rt5631_hifi_codec_set_dai_fmt()
1466 return 0; in rt5631_hifi_codec_set_dai_sysclk()
1488 return 0; in rt5631_codec_set_dai_pll()
1492 for (i = 0; i < ARRAY_SIZE(codec_master_pll_div); i++) in rt5631_codec_set_dai_pll()
1507 ret = 0; in rt5631_codec_set_dai_pll()
1511 for (i = 0; i < ARRAY_SIZE(codec_slave_pll_div); i++) in rt5631_codec_set_dai_pll()
1526 ret = 0; in rt5631_codec_set_dai_pll()
1562 snd_soc_component_write(component, RT5631_PWR_MANAG_ADD1, 0x0000); in rt5631_set_bias_level()
1563 snd_soc_component_write(component, RT5631_PWR_MANAG_ADD2, 0x0000); in rt5631_set_bias_level()
1564 snd_soc_component_write(component, RT5631_PWR_MANAG_ADD3, 0x0000); in rt5631_set_bias_level()
1565 snd_soc_component_write(component, RT5631_PWR_MANAG_ADD4, 0x0000); in rt5631_set_bias_level()
1572 return 0; in rt5631_set_bias_level()
1581 if (val & 0x0002) in rt5631_probe()
1584 rt5631->codec_version = 0; in rt5631_probe()
1594 snd_soc_component_write(component, RT5631_INT_ST_IRQ_CTRL_2, 0x0f18); in rt5631_probe()
1598 0x2000, 0x2000); in rt5631_probe()
1601 0x2000, 0); in rt5631_probe()
1618 return 0; in rt5631_probe()
1673 { "rt5631", 0 },
1674 { "alc5631", 0 },
1725 return 0; in rt5631_i2c_remove()