Lines Matching +full:0 +full:xf01

38 	if (ret < 0)  in rt700_index_write()
51 *value = 0; in rt700_index_read()
53 if (ret < 0) in rt700_index_read()
62 unsigned int btn_type = 0, val80, val81; in rt700_button_detect()
66 if (ret < 0) in rt700_button_detect()
69 if (ret < 0) in rt700_button_detect()
72 val80 &= 0x0381; in rt700_button_detect()
73 val81 &= 0xff00; in rt700_button_detect()
76 case 0x0200: in rt700_button_detect()
77 case 0x0100: in rt700_button_detect()
78 case 0x0080: in rt700_button_detect()
81 case 0x0001: in rt700_button_detect()
86 case 0x8000: in rt700_button_detect()
87 case 0x4000: in rt700_button_detect()
88 case 0x2000: in rt700_button_detect()
91 case 0x1000: in rt700_button_detect()
92 case 0x0800: in rt700_button_detect()
93 case 0x0400: in rt700_button_detect()
96 case 0x0200: in rt700_button_detect()
97 case 0x0100: in rt700_button_detect()
107 unsigned int buf, loop = 0; in rt700_headset_detect()
109 unsigned int jack_status = 0, reg; in rt700_headset_detect()
113 if (ret < 0) in rt700_headset_detect()
117 (buf & RT700_COMBOJACK_AUTO_DET_STATUS) == 0) { in rt700_headset_detect()
123 if (ret < 0) in rt700_headset_detect()
128 if ((jack_status & (1 << 31)) == 0) in rt700_headset_detect()
141 return 0; in rt700_headset_detect()
159 int btn_type = 0, ret; in rt700_jack_detect_handler()
160 unsigned int jack_status = 0, reg; in rt700_jack_detect_handler()
170 if (ret < 0) in rt700_jack_detect_handler()
176 if (rt700->jack_type == 0) { in rt700_jack_detect_handler()
178 if (ret < 0) in rt700_jack_detect_handler()
188 rt700->jack_type = 0; in rt700_jack_detect_handler()
192 "in %s, jack_type=0x%x\n", __func__, rt700->jack_type); in rt700_jack_detect_handler()
194 "in %s, btn_type=0x%x\n", __func__, btn_type); in rt700_jack_detect_handler()
222 int btn_type = 0, ret; in rt700_btn_check_handler()
223 unsigned int jack_status = 0, reg; in rt700_btn_check_handler()
227 if (ret < 0) in rt700_btn_check_handler()
237 rt700->jack_type = 0; in rt700_btn_check_handler()
242 if (ret < 0) in rt700_btn_check_handler()
245 if ((reg & 0xf0) == 0xf0) in rt700_btn_check_handler()
246 btn_type = 0; in rt700_btn_check_handler()
249 "%s, btn_type=0x%x\n", __func__, btn_type); in rt700_btn_check_handler()
285 RT700_SET_MIC2_UNSOLICITED_ENABLE, 0x82); in rt700_jack_init()
287 RT700_SET_HP_UNSOLICITED_ENABLE, 0x81); in rt700_jack_init()
289 RT700_SET_INLINE_UNSOLICITED_ENABLE, 0x83); in rt700_jack_init()
290 rt700_index_write(rt700->regmap, 0x10, 0x2420); in rt700_jack_init()
291 rt700_index_write(rt700->regmap, 0x19, 0x2e11); in rt700_jack_init()
299 RT700_SET_MIC2_UNSOLICITED_ENABLE, 0x00); in rt700_jack_init()
301 RT700_SET_HP_UNSOLICITED_ENABLE, 0x00); in rt700_jack_init()
303 RT700_SET_INLINE_UNSOLICITED_ENABLE, 0x00); in rt700_jack_init()
323 if (ret < 0) { in rt700_set_jack_detect()
331 return 0; in rt700_set_jack_detect()
339 return 0; in rt700_set_jack_detect()
351 val_h |= 0x20; in rt700_get_gain()
374 val_h = 0x80; in rt700_set_amp_gain_put()
376 val_h = 0x0; in rt700_set_amp_gain_put()
383 val_ll = (mc->max - ucontrol->value.integer.value[0]) << 7; in rt700_set_amp_gain_put()
385 read_ll = read_ll & 0x7f; in rt700_set_amp_gain_put()
389 val_ll = ((ucontrol->value.integer.value[0]) & 0x7f); in rt700_set_amp_gain_put()
393 read_ll = read_ll & 0x80; in rt700_set_amp_gain_put()
406 read_rl = read_rl & 0x7f; in rt700_set_amp_gain_put()
410 val_lr = ((ucontrol->value.integer.value[1]) & 0x7f); in rt700_set_amp_gain_put()
414 read_rl = read_rl & 0x80; in rt700_set_amp_gain_put()
418 for (i = 0; i < 3; i++) { /* retry 3 times at most */ in rt700_set_amp_gain_put()
439 val_h = 0x80; in rt700_set_amp_gain_put()
441 val_h = 0x0; in rt700_set_amp_gain_put()
452 return 0; in rt700_set_amp_gain_put()
468 val_h = 0x80; in rt700_set_amp_gain_get()
470 val_h = 0x0; in rt700_set_amp_gain_get()
476 read_ll = !((read_ll & 0x80) >> RT700_MUTE_SFT); in rt700_set_amp_gain_get()
477 read_rl = !((read_rl & 0x80) >> RT700_MUTE_SFT); in rt700_set_amp_gain_get()
480 read_ll = read_ll & 0x7f; in rt700_set_amp_gain_get()
481 read_rl = read_rl & 0x7f; in rt700_set_amp_gain_get()
483 ucontrol->value.integer.value[0] = read_ll; in rt700_set_amp_gain_get()
486 return 0; in rt700_set_amp_gain_get()
489 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -6525, 75, 0);
490 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -1725, 75, 0);
491 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0);
496 RT700_DIR_OUT_SFT, 0x57, 0,
508 RT700_DIR_IN_SFT, 0x3f, 0,
512 RT700_DIR_IN_SFT, 0x3f, 0,
516 RT700_DIR_IN_SFT, 3, 0,
526 unsigned int reg, val = 0, nid; in rt700_mux_get()
538 /* vid = 0xf01 */ in rt700_mux_get()
541 if (ret < 0) in rt700_mux_get()
544 ucontrol->value.enumerated.item[0] = val; in rt700_mux_get()
546 return 0; in rt700_mux_get()
559 unsigned int val, val2 = 0, change, reg, nid; in rt700_mux_put()
562 if (item[0] >= e->items) in rt700_mux_put()
574 /* Verb ID = 0x701h */ in rt700_mux_put()
575 val = snd_soc_enum_item_to_val(e, item[0]) << e->shift_l; in rt700_mux_put()
579 if (ret < 0) in rt700_mux_put()
583 change = 0; in rt700_mux_put()
593 item[0], e, NULL); in rt700_mux_put()
606 rt700_adc22_enum, SND_SOC_NOPM, 0, adc_mux_text);
609 rt700_adc23_enum, SND_SOC_NOPM, 0, adc_mux_text);
625 rt700_hp_enum, SND_SOC_NOPM, 0, out_mux_text);
641 RT700_SET_STREAMID_DAC1, 0x10); in rt700_dac_front_event()
645 RT700_SET_STREAMID_DAC1, 0x00); in rt700_dac_front_event()
648 return 0; in rt700_dac_front_event()
661 RT700_SET_STREAMID_DAC2, 0x10); in rt700_dac_surround_event()
665 RT700_SET_STREAMID_DAC2, 0x00); in rt700_dac_surround_event()
668 return 0; in rt700_dac_surround_event()
681 RT700_SET_STREAMID_ADC1, 0x10); in rt700_adc_09_event()
685 RT700_SET_STREAMID_ADC1, 0x00); in rt700_adc_09_event()
688 return 0; in rt700_adc_09_event()
701 RT700_SET_STREAMID_ADC2, 0x10); in rt700_adc_08_event()
705 RT700_SET_STREAMID_ADC2, 0x00); in rt700_adc_08_event()
708 return 0; in rt700_adc_08_event()
717 unsigned int val_h = (1 << RT700_DIR_OUT_SFT) | (0x3 << 4); in rt700_hpo_mux_event()
722 val_l = 0x00; in rt700_hpo_mux_event()
733 return 0; in rt700_hpo_mux_event()
742 unsigned int val_h = (1 << RT700_DIR_OUT_SFT) | (0x3 << 4); in rt700_spk_pga_event()
747 val_l = 0x00; in rt700_spk_pga_event()
757 return 0; in rt700_spk_pga_event()
768 SND_SOC_DAPM_DAC_E("DAC Front", NULL, SND_SOC_NOPM, 0, 0,
771 SND_SOC_DAPM_DAC_E("DAC Surround", NULL, SND_SOC_NOPM, 0, 0,
774 SND_SOC_DAPM_MUX_E("HPO Mux", SND_SOC_NOPM, 0, 0, &rt700_hp_mux,
777 SND_SOC_DAPM_PGA_E("SPK PGA", SND_SOC_NOPM, 0, 0, NULL, 0,
780 SND_SOC_DAPM_ADC_E("ADC 09", NULL, SND_SOC_NOPM, 0, 0,
783 SND_SOC_DAPM_ADC_E("ADC 08", NULL, SND_SOC_NOPM, 0, 0,
786 SND_SOC_DAPM_MUX("ADC 22 Mux", SND_SOC_NOPM, 0, 0,
788 SND_SOC_DAPM_MUX("ADC 23 Mux", SND_SOC_NOPM, 0, 0,
790 SND_SOC_DAPM_AIF_IN("DP1RX", "DP1 Playback", 0, SND_SOC_NOPM, 0, 0),
791 SND_SOC_DAPM_AIF_IN("DP3RX", "DP3 Playback", 0, SND_SOC_NOPM, 0, 0),
792 SND_SOC_DAPM_AIF_OUT("DP2TX", "DP2 Capture", 0, SND_SOC_NOPM, 0, 0),
793 SND_SOC_DAPM_AIF_OUT("DP4TX", "DP4 Capture", 0, SND_SOC_NOPM, 0, 0),
826 if (ret < 0 && ret != -EACCES) in rt700_probe()
829 return 0; in rt700_probe()
858 return 0; in rt700_set_bias_level()
880 return 0; in rt700_set_sdw_stream()
894 return 0; in rt700_set_sdw_stream()
918 unsigned int val = 0; in rt700_pcm_hw_params()
967 /* bit 3:0 Number of Channel */ in rt700_pcm_hw_params()
980 val |= (0x1 << 4); in rt700_pcm_hw_params()
983 val |= (0x2 << 4); in rt700_pcm_hw_params()
986 val |= (0x3 << 4); in rt700_pcm_hw_params()
989 val |= (0x4 << 4); in rt700_pcm_hw_params()
1014 return 0; in rt700_pcm_hw_free()
1086 value = 0x0; in rt700_clock_config()
1089 value = 0x1; in rt700_clock_config()
1092 value = 0x2; in rt700_clock_config()
1095 value = 0x3; in rt700_clock_config()
1098 value = 0x4; in rt700_clock_config()
1101 value = 0x5; in rt700_clock_config()
1107 regmap_write(rt700->regmap, 0xe0, value); in rt700_clock_config()
1108 regmap_write(rt700->regmap, 0xf0, value); in rt700_clock_config()
1112 return 0; in rt700_clock_config()
1162 return 0; in rt700_io_init()
1189 regmap_write(rt700->regmap, 0xff01, 0x0000); in rt700_io_init()
1190 regmap_write(rt700->regmap, 0x7520, 0x001a); in rt700_io_init()
1191 regmap_write(rt700->regmap, 0x7420, 0xc003); in rt700_io_init()
1196 regmap_write(rt700->regmap, RT700_SET_PIN_HP, 0x40); in rt700_io_init()
1197 regmap_write(rt700->regmap, RT700_SET_PIN_SPK, 0x40); in rt700_io_init()
1199 regmap_write(rt700->regmap, RT700_SET_PIN_DMIC1, 0x20); in rt700_io_init()
1200 regmap_write(rt700->regmap, RT700_SET_PIN_DMIC2, 0x20); in rt700_io_init()
1201 regmap_write(rt700->regmap, RT700_SET_PIN_MIC2, 0x20); in rt700_io_init()
1204 regmap_write(rt700->regmap, 0x4f12, 0x91); in rt700_io_init()
1205 regmap_write(rt700->regmap, 0x4e12, 0xd6); in rt700_io_init()
1206 regmap_write(rt700->regmap, 0x4d12, 0x11); in rt700_io_init()
1207 regmap_write(rt700->regmap, 0x4c12, 0x20); in rt700_io_init()
1208 regmap_write(rt700->regmap, 0x4f13, 0x91); in rt700_io_init()
1209 regmap_write(rt700->regmap, 0x4e13, 0xd6); in rt700_io_init()
1210 regmap_write(rt700->regmap, 0x4d13, 0x11); in rt700_io_init()
1211 regmap_write(rt700->regmap, 0x4c13, 0x21); in rt700_io_init()
1213 regmap_write(rt700->regmap, 0x4f19, 0x02); in rt700_io_init()
1214 regmap_write(rt700->regmap, 0x4e19, 0xa1); in rt700_io_init()
1215 regmap_write(rt700->regmap, 0x4d19, 0x90); in rt700_io_init()
1216 regmap_write(rt700->regmap, 0x4c19, 0x80); in rt700_io_init()
1219 regmap_write(rt700->regmap, 0x371b, 0x40); in rt700_io_init()
1220 regmap_write(rt700->regmap, 0x731b, 0xb0); in rt700_io_init()
1221 regmap_write(rt700->regmap, 0x839b, 0x00); in rt700_io_init()
1224 rt700_index_write(rt700->regmap, 0x4a, 0x201b); in rt700_io_init()
1225 rt700_index_write(rt700->regmap, 0x45, 0x5089); in rt700_io_init()
1226 rt700_index_write(rt700->regmap, 0x6b, 0x5064); in rt700_io_init()
1227 rt700_index_write(rt700->regmap, 0x48, 0xd249); in rt700_io_init()
1253 return 0; in rt700_io_init()