Lines Matching +full:0 +full:xf01

38 	if (ret < 0)  in rt711_index_write()
51 *value = 0; in rt711_index_read()
53 if (ret < 0) in rt711_index_read()
67 if (ret < 0) in rt711_index_update_bits()
78 regmap_write(regmap, RT711_FUNC_RESET, 0); in rt711_reset()
86 unsigned int val, loop = 0; in rt711_calibration()
89 int ret = 0; in rt711_calibration()
99 0xf, 0x0); in rt711_calibration()
126 RT711_FSM_CTL, 0xf, RT711_DEPOP_CTL); in rt711_calibration()
138 unsigned int btn_type = 0, val80, val81; in rt711_button_detect()
143 if (ret < 0) in rt711_button_detect()
147 if (ret < 0) in rt711_button_detect()
150 val80 &= 0x0381; in rt711_button_detect()
151 val81 &= 0xff00; in rt711_button_detect()
154 case 0x0200: in rt711_button_detect()
155 case 0x0100: in rt711_button_detect()
156 case 0x0080: in rt711_button_detect()
159 case 0x0001: in rt711_button_detect()
164 case 0x8000: in rt711_button_detect()
165 case 0x4000: in rt711_button_detect()
166 case 0x2000: in rt711_button_detect()
169 case 0x1000: in rt711_button_detect()
170 case 0x0800: in rt711_button_detect()
171 case 0x0400: in rt711_button_detect()
174 case 0x0200: in rt711_button_detect()
175 case 0x0100: in rt711_button_detect()
185 unsigned int buf, loop = 0; in rt711_headset_detect()
187 unsigned int jack_status = 0, reg; in rt711_headset_detect()
191 if (ret < 0) in rt711_headset_detect()
195 (buf & RT711_COMBOJACK_AUTO_DET_STATUS) == 0) { in rt711_headset_detect()
201 if (ret < 0) in rt711_headset_detect()
206 if (ret < 0) in rt711_headset_detect()
208 if ((jack_status & (1 << 31)) == 0) in rt711_headset_detect()
221 return 0; in rt711_headset_detect()
239 int btn_type = 0, ret; in rt711_jack_detect_handler()
240 unsigned int jack_status = 0, reg; in rt711_jack_detect_handler()
257 if (ret < 0) in rt711_jack_detect_handler()
263 if (rt711->jack_type == 0) { in rt711_jack_detect_handler()
265 if (ret < 0) in rt711_jack_detect_handler()
275 rt711->jack_type = 0; in rt711_jack_detect_handler()
279 "in %s, jack_type=0x%x\n", __func__, rt711->jack_type); in rt711_jack_detect_handler()
281 "in %s, btn_type=0x%x\n", __func__, btn_type); in rt711_jack_detect_handler()
309 int btn_type = 0, ret; in rt711_btn_check_handler()
310 unsigned int jack_status = 0, reg; in rt711_btn_check_handler()
314 if (ret < 0) in rt711_btn_check_handler()
324 rt711->jack_type = 0; in rt711_btn_check_handler()
330 if (ret < 0) in rt711_btn_check_handler()
333 if ((reg & 0xf0) == 0xf0) in rt711_btn_check_handler()
334 btn_type = 0; in rt711_btn_check_handler()
337 "%s, btn_type=0x%x\n", __func__, btn_type); in rt711_btn_check_handler()
374 RT711_SET_MIC2_UNSOLICITED_ENABLE, 0x82); in rt711_jack_init()
376 RT711_SET_HP_UNSOLICITED_ENABLE, 0x81); in rt711_jack_init()
378 RT711_SET_INLINE_UNSOLICITED_ENABLE, 0x83); in rt711_jack_init()
380 0x10, 0x2420); in rt711_jack_init()
382 0x19, 0x2e11); in rt711_jack_init()
440 RT711_SET_MIC2_UNSOLICITED_ENABLE, 0x00); in rt711_jack_init()
442 RT711_SET_HP_UNSOLICITED_ENABLE, 0x00); in rt711_jack_init()
444 RT711_SET_INLINE_UNSOLICITED_ENABLE, 0x00); in rt711_jack_init()
465 if (ret < 0) { in rt711_set_jack_detect()
473 return 0; in rt711_set_jack_detect()
481 return 0; in rt711_set_jack_detect()
493 val_h |= 0x20; in rt711_get_gain()
518 val_h = 0x80; in rt711_set_amp_gain_put()
520 val_h = 0x0; in rt711_set_amp_gain_put()
527 val_ll = (mc->max - ucontrol->value.integer.value[0]) in rt711_set_amp_gain_put()
530 read_ll = read_ll & 0x7f; in rt711_set_amp_gain_put()
534 val_ll = ((ucontrol->value.integer.value[0]) & 0x7f); in rt711_set_amp_gain_put()
552 read_rl = read_rl & 0x7f; in rt711_set_amp_gain_put()
556 val_lr = ((ucontrol->value.integer.value[1]) & 0x7f); in rt711_set_amp_gain_put()
564 for (i = 0; i < 3; i++) { /* retry 3 times at most */ in rt711_set_amp_gain_put()
586 val_h = 0x80; in rt711_set_amp_gain_put()
588 val_h = 0x0; in rt711_set_amp_gain_put()
601 return 0; in rt711_set_amp_gain_put()
618 val_h = 0x80; in rt711_set_amp_gain_get()
620 val_h = 0x0; in rt711_set_amp_gain_get()
626 read_ll = !((read_ll & 0x80) >> RT711_MUTE_SFT); in rt711_set_amp_gain_get()
627 read_rl = !((read_rl & 0x80) >> RT711_MUTE_SFT); in rt711_set_amp_gain_get()
630 read_ll = read_ll & 0x7f; in rt711_set_amp_gain_get()
631 read_rl = read_rl & 0x7f; in rt711_set_amp_gain_get()
633 ucontrol->value.integer.value[0] = read_ll; in rt711_set_amp_gain_get()
636 return 0; in rt711_set_amp_gain_get()
639 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -6525, 75, 0);
640 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -1725, 75, 0);
641 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0);
646 RT711_DIR_OUT_SFT, 0x57, 0,
658 RT711_DIR_IN_SFT, 0x3f, 0,
662 RT711_DIR_IN_SFT, 0x3f, 0,
666 RT711_DIR_IN_SFT, 3, 0,
670 RT711_DIR_IN_SFT, 3, 0,
674 RT711_DIR_IN_SFT, 3, 0,
684 unsigned int reg, val = 0, nid; in rt711_mux_get()
694 /* vid = 0xf01 */ in rt711_mux_get()
697 if (ret < 0) { in rt711_mux_get()
703 ucontrol->value.enumerated.item[0] = val; in rt711_mux_get()
705 return 0; in rt711_mux_get()
718 unsigned int val, val2 = 0, change, reg, nid; in rt711_mux_put()
721 if (item[0] >= e->items) in rt711_mux_put()
731 /* Verb ID = 0x701h */ in rt711_mux_put()
732 val = snd_soc_enum_item_to_val(e, item[0]) << e->shift_l; in rt711_mux_put()
736 if (ret < 0) { in rt711_mux_put()
743 change = 0; in rt711_mux_put()
753 item[0], e, NULL); in rt711_mux_put()
766 rt711_adc22_enum, SND_SOC_NOPM, 0, adc_mux_text);
769 rt711_adc23_enum, SND_SOC_NOPM, 0, adc_mux_text);
785 unsigned int val_h = (1 << RT711_DIR_OUT_SFT) | (0x3 << 4); in rt711_dac_surround_event()
791 RT711_SET_STREAMID_DAC2, 0x10); in rt711_dac_surround_event()
793 val_l = 0x00; in rt711_dac_surround_event()
804 RT711_SET_STREAMID_DAC2, 0x00); in rt711_dac_surround_event()
807 return 0; in rt711_dac_surround_event()
820 RT711_SET_STREAMID_ADC1, 0x10); in rt711_adc_09_event()
824 RT711_SET_STREAMID_ADC1, 0x00); in rt711_adc_09_event()
827 return 0; in rt711_adc_09_event()
840 RT711_SET_STREAMID_ADC2, 0x10); in rt711_adc_08_event()
844 RT711_SET_STREAMID_ADC2, 0x00); in rt711_adc_08_event()
847 return 0; in rt711_adc_08_event()
858 SND_SOC_DAPM_DAC_E("DAC Surround", NULL, SND_SOC_NOPM, 0, 0,
861 SND_SOC_DAPM_ADC_E("ADC 09", NULL, SND_SOC_NOPM, 0, 0,
864 SND_SOC_DAPM_ADC_E("ADC 08", NULL, SND_SOC_NOPM, 0, 0,
867 SND_SOC_DAPM_MUX("ADC 22 Mux", SND_SOC_NOPM, 0, 0,
869 SND_SOC_DAPM_MUX("ADC 23 Mux", SND_SOC_NOPM, 0, 0,
872 SND_SOC_DAPM_AIF_IN("DP3RX", "DP3 Playback", 0, SND_SOC_NOPM, 0, 0),
873 SND_SOC_DAPM_AIF_OUT("DP2TX", "DP2 Capture", 0, SND_SOC_NOPM, 0, 0),
874 SND_SOC_DAPM_AIF_OUT("DP4TX", "DP4 Capture", 0, SND_SOC_NOPM, 0, 0),
924 return 0; in rt711_set_bias_level()
932 return 0; in rt711_parse_dt()
944 if (ret < 0 && ret != -EACCES) in rt711_probe()
947 return 0; in rt711_probe()
969 return 0; in rt711_set_sdw_stream()
983 return 0; in rt711_set_sdw_stream()
1007 unsigned int val = 0; in rt711_pcm_hw_params()
1049 /* bit 3:0 Number of Channel */ in rt711_pcm_hw_params()
1062 val |= (0x1 << 4); in rt711_pcm_hw_params()
1065 val |= (0x2 << 4); in rt711_pcm_hw_params()
1068 val |= (0x3 << 4); in rt711_pcm_hw_params()
1071 val |= (0x4 << 4); in rt711_pcm_hw_params()
1097 return 0; in rt711_pcm_hw_free()
1162 value = 0x0; in rt711_clock_config()
1165 value = 0x1; in rt711_clock_config()
1168 value = 0x2; in rt711_clock_config()
1171 value = 0x3; in rt711_clock_config()
1174 value = 0x4; in rt711_clock_config()
1177 value = 0x5; in rt711_clock_config()
1183 regmap_write(rt711->regmap, 0xe0, value); in rt711_clock_config()
1184 regmap_write(rt711->regmap, 0xf0, value); in rt711_clock_config()
1188 return 0; in rt711_clock_config()
1248 return 0; in rt711_io_init()
1280 regmap_write(rt711->regmap, RT711_SET_PIN_MIC2, 0x25); in rt711_io_init()
1281 regmap_write(rt711->regmap, RT711_SET_PIN_HP, 0xc0); in rt711_io_init()
1282 regmap_write(rt711->regmap, RT711_SET_PIN_DMIC1, 0x20); in rt711_io_init()
1283 regmap_write(rt711->regmap, RT711_SET_PIN_DMIC2, 0x20); in rt711_io_init()
1284 regmap_write(rt711->regmap, RT711_SET_PIN_LINE1, 0x20); in rt711_io_init()
1285 regmap_write(rt711->regmap, RT711_SET_PIN_LINE2, 0x20); in rt711_io_init()
1288 regmap_write(rt711->regmap, RT711_SET_GAIN_HP_H, 0xa080); in rt711_io_init()
1289 regmap_write(rt711->regmap, RT711_SET_GAIN_HP_H, 0x9080); in rt711_io_init()
1290 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC2_H, 0x6080); in rt711_io_init()
1291 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC2_H, 0x5080); in rt711_io_init()
1292 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC1_H, 0x6080); in rt711_io_init()
1293 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC1_H, 0x5080); in rt711_io_init()
1296 regmap_write(rt711->regmap, 0x4f12, 0x91); in rt711_io_init()
1297 regmap_write(rt711->regmap, 0x4e12, 0xd6); in rt711_io_init()
1298 regmap_write(rt711->regmap, 0x4d12, 0x11); in rt711_io_init()
1299 regmap_write(rt711->regmap, 0x4c12, 0x20); in rt711_io_init()
1300 regmap_write(rt711->regmap, 0x4f13, 0x91); in rt711_io_init()
1301 regmap_write(rt711->regmap, 0x4e13, 0xd6); in rt711_io_init()
1302 regmap_write(rt711->regmap, 0x4d13, 0x11); in rt711_io_init()
1303 regmap_write(rt711->regmap, 0x4c13, 0x21); in rt711_io_init()
1304 regmap_write(rt711->regmap, 0x4c21, 0xf0); in rt711_io_init()
1305 regmap_write(rt711->regmap, 0x4d21, 0x11); in rt711_io_init()
1306 regmap_write(rt711->regmap, 0x4e21, 0x11); in rt711_io_init()
1307 regmap_write(rt711->regmap, 0x4f21, 0x01); in rt711_io_init()
1311 RT711_TX_RX_MUX_CTL, 0x0154); in rt711_io_init()
1315 RT711_DIGITAL_MISC_CTRL4, 0x201b); in rt711_io_init()
1317 RT711_COMBO_JACK_AUTO_CTL1, 0x5089); in rt711_io_init()
1319 RT711_VREFOUT_CTL, 0x5064); in rt711_io_init()
1321 RT711_INLINE_CMD_CTL, 0xd249); in rt711_io_init()
1351 return 0; in rt711_io_init()