Lines Matching +full:mic2 +full:- +full:src

1 // SPDX-License-Identifier: GPL-2.0-only
3 // rt711-sdca.c -- rt711 SDCA ALSA SoC audio driver
21 #include <sound/soc-dapm.h>
26 #include "rt711-sdca.h"
32 struct regmap *regmap = rt711->mbq_regmap; in rt711_sdca_index_write()
37 dev_err(&rt711->slave->dev, in rt711_sdca_index_write()
48 struct regmap *regmap = rt711->mbq_regmap; in rt711_sdca_index_read()
53 dev_err(&rt711->slave->dev, in rt711_sdca_index_read()
87 struct regmap *regmap = rt711->regmap; in rt711_sdca_calibration()
91 mutex_lock(&rt711->calibrate_mutex); in rt711_sdca_calibration()
94 regmap_read(rt711->regmap, RT711_RC_CAL_STATUS, &val); in rt711_sdca_calibration()
102 ret = regmap_read(rt711->regmap, RT711_RC_CAL_STATUS, &val); in rt711_sdca_calibration()
107 dev_err(dev, "%s, RC calibration time-out!\n", __func__); in rt711_sdca_calibration()
125 if (rt711->hw_ver == RT711_VER_VD0) in rt711_sdca_calibration()
148 dev_err(dev, "%s, calibration time-out!\n", __func__); in rt711_sdca_calibration()
151 ret = -ETIMEDOUT; in rt711_sdca_calibration()
158 /* release HP-JD and trigger FSM */ in rt711_sdca_calibration()
162 mutex_unlock(&rt711->calibrate_mutex); in rt711_sdca_calibration()
174 ret = regmap_read(rt711->regmap, in rt711_sdca_button_detect()
185 ret = regmap_read(rt711->regmap, in rt711_sdca_button_detect()
192 ret = regmap_read(rt711->regmap, in rt711_sdca_button_detect()
238 regmap_write(rt711->regmap, in rt711_sdca_button_detect()
251 ret = regmap_read(rt711->regmap, in rt711_sdca_headset_detect()
259 rt711->jack_type = 0; in rt711_sdca_headset_detect()
262 rt711->jack_type = SND_JACK_HEADPHONE; in rt711_sdca_headset_detect()
265 rt711->jack_type = SND_JACK_HEADSET; in rt711_sdca_headset_detect()
271 ret = regmap_write(rt711->regmap, in rt711_sdca_headset_detect()
278 dev_dbg(&rt711->slave->dev, in rt711_sdca_headset_detect()
294 if (!rt711->hs_jack) in rt711_sdca_jack_detect_handler()
297 if (!rt711->component->card || !rt711->component->card->instantiated) in rt711_sdca_jack_detect_handler()
301 if (rt711->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) { in rt711_sdca_jack_detect_handler()
308 if (rt711->scp_sdca_stat2 & SDW_SCP_SDCA_INT_SDCA_8) in rt711_sdca_jack_detect_handler()
311 if (rt711->jack_type == 0) in rt711_sdca_jack_detect_handler()
314 dev_dbg(&rt711->slave->dev, in rt711_sdca_jack_detect_handler()
315 "in %s, jack_type=0x%x\n", __func__, rt711->jack_type); in rt711_sdca_jack_detect_handler()
316 dev_dbg(&rt711->slave->dev, in rt711_sdca_jack_detect_handler()
318 dev_dbg(&rt711->slave->dev, in rt711_sdca_jack_detect_handler()
320 rt711->scp_sdca_stat1, rt711->scp_sdca_stat2); in rt711_sdca_jack_detect_handler()
322 snd_soc_jack_report(rt711->hs_jack, rt711->jack_type | btn_type, in rt711_sdca_jack_detect_handler()
329 snd_soc_jack_report(rt711->hs_jack, rt711->jack_type, in rt711_sdca_jack_detect_handler()
335 &rt711->jack_btn_check_work, msecs_to_jiffies(200)); in rt711_sdca_jack_detect_handler()
347 ret = regmap_read(rt711->regmap, in rt711_sdca_btn_check_handler()
356 ret = regmap_read(rt711->regmap, in rt711_sdca_btn_check_handler()
363 ret = regmap_read(rt711->regmap, in rt711_sdca_btn_check_handler()
405 rt711->jack_type = 0; in rt711_sdca_btn_check_handler()
407 dev_dbg(&rt711->slave->dev, "%s, btn_type=0x%x\n", __func__, btn_type); in rt711_sdca_btn_check_handler()
408 snd_soc_jack_report(rt711->hs_jack, rt711->jack_type | btn_type, in rt711_sdca_btn_check_handler()
415 snd_soc_jack_report(rt711->hs_jack, rt711->jack_type, in rt711_sdca_btn_check_handler()
421 &rt711->jack_btn_check_work, msecs_to_jiffies(200)); in rt711_sdca_btn_check_handler()
432 mutex_lock(&rt711->calibrate_mutex); in rt711_sdca_jack_init()
434 if (rt711->hs_jack) { in rt711_sdca_jack_init()
449 switch (rt711->jd_src) { in rt711_sdca_jack_init()
466 dev_warn(rt711->component->dev, "Wrong JD source\n"); in rt711_sdca_jack_init()
471 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0); in rt711_sdca_jack_init()
473 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt711_sdca_jack_init()
474 dev_dbg(&rt711->slave->dev, "in %s enable\n", __func__); in rt711_sdca_jack_init()
480 dev_dbg(&rt711->slave->dev, "in %s disable\n", __func__); in rt711_sdca_jack_init()
483 mutex_unlock(&rt711->calibrate_mutex); in rt711_sdca_jack_init()
492 rt711->hs_jack = hs_jack; in rt711_sdca_set_jack_detect()
494 ret = pm_runtime_resume_and_get(component->dev); in rt711_sdca_set_jack_detect()
496 if (ret != -EACCES) { in rt711_sdca_set_jack_detect()
497 dev_err(component->dev, "%s: failed to resume %d\n", __func__, ret); in rt711_sdca_set_jack_detect()
502 dev_dbg(component->dev, "%s: skipping jack init for now\n", __func__); in rt711_sdca_set_jack_detect()
508 pm_runtime_mark_last_busy(component->dev); in rt711_sdca_set_jack_detect()
509 pm_runtime_put_autosuspend(component->dev); in rt711_sdca_set_jack_detect()
520 (struct soc_mixer_control *)kcontrol->private_value; in rt711_sdca_set_gain_put()
526 if (strstr(ucontrol->id.name, "FU1E Capture Volume") || in rt711_sdca_set_gain_put()
527 strstr(ucontrol->id.name, "FU0F Capture Volume")) in rt711_sdca_set_gain_put()
530 regmap_read(rt711->mbq_regmap, mc->reg, &lvalue); in rt711_sdca_set_gain_put()
531 regmap_read(rt711->mbq_regmap, mc->rreg, &rvalue); in rt711_sdca_set_gain_put()
535 gain_l_val = ucontrol->value.integer.value[0]; in rt711_sdca_set_gain_put()
536 if (gain_l_val > mc->max) in rt711_sdca_set_gain_put()
537 gain_l_val = mc->max; in rt711_sdca_set_gain_put()
540 if (mc->shift == 8) /* boost gain */ in rt711_sdca_set_gain_put()
541 gain_l_val = (gain_l_val * 10) << mc->shift; in rt711_sdca_set_gain_put()
543 if (adc_vol_flag && gain_l_val > mc->shift) in rt711_sdca_set_gain_put()
544 gain_l_val = (gain_l_val - mc->shift) * 75; in rt711_sdca_set_gain_put()
546 gain_l_val = (mc->shift - gain_l_val) * 75; in rt711_sdca_set_gain_put()
549 if (!(adc_vol_flag && read_l > mc->shift)) { in rt711_sdca_set_gain_put()
557 gain_r_val = ucontrol->value.integer.value[1]; in rt711_sdca_set_gain_put()
558 if (gain_r_val > mc->max) in rt711_sdca_set_gain_put()
559 gain_r_val = mc->max; in rt711_sdca_set_gain_put()
562 if (mc->shift == 8) /* boost gain */ in rt711_sdca_set_gain_put()
563 gain_r_val = (gain_r_val * 10) << mc->shift; in rt711_sdca_set_gain_put()
565 if (adc_vol_flag && gain_r_val > mc->shift) in rt711_sdca_set_gain_put()
566 gain_r_val = (gain_r_val - mc->shift) * 75; in rt711_sdca_set_gain_put()
568 gain_r_val = (mc->shift - gain_r_val) * 75; in rt711_sdca_set_gain_put()
571 if (!(adc_vol_flag && read_r > mc->shift)) { in rt711_sdca_set_gain_put()
585 regmap_write(rt711->mbq_regmap, mc->reg, gain_l_val); in rt711_sdca_set_gain_put()
588 regmap_write(rt711->mbq_regmap, mc->rreg, gain_r_val); in rt711_sdca_set_gain_put()
590 regmap_read(rt711->mbq_regmap, mc->reg, &read_l); in rt711_sdca_set_gain_put()
591 regmap_read(rt711->mbq_regmap, mc->rreg, &read_r); in rt711_sdca_set_gain_put()
596 return i == 3 ? -EIO : changed; in rt711_sdca_set_gain_put()
605 (struct soc_mixer_control *)kcontrol->private_value; in rt711_sdca_set_gain_get()
609 if (strstr(ucontrol->id.name, "FU1E Capture Volume") || in rt711_sdca_set_gain_get()
610 strstr(ucontrol->id.name, "FU0F Capture Volume")) in rt711_sdca_set_gain_get()
613 regmap_read(rt711->mbq_regmap, mc->reg, &read_l); in rt711_sdca_set_gain_get()
614 regmap_read(rt711->mbq_regmap, mc->rreg, &read_r); in rt711_sdca_set_gain_get()
617 if (mc->shift == 8) /* boost gain */ in rt711_sdca_set_gain_get()
618 ctl_l = (read_l >> mc->shift) / 10; in rt711_sdca_set_gain_get()
622 ctl_l = 0xffff & ~(read_l - 1); in rt711_sdca_set_gain_get()
629 ctl_l = mc->shift - (ctl_l / 75); in rt711_sdca_set_gain_get()
631 ctl_l = mc->shift + (ctl_l / 75); in rt711_sdca_set_gain_get()
633 ctl_l = mc->max - (ctl_l / 75); in rt711_sdca_set_gain_get()
638 if (mc->shift == 8) /* boost gain */ in rt711_sdca_set_gain_get()
639 ctl_r = (read_r >> mc->shift) / 10; in rt711_sdca_set_gain_get()
643 ctl_r = 0xffff & ~(read_r - 1); in rt711_sdca_set_gain_get()
650 ctl_r = mc->shift - (ctl_r / 75); in rt711_sdca_set_gain_get()
652 ctl_r = mc->shift + (ctl_r / 75); in rt711_sdca_set_gain_get()
654 ctl_r = mc->max - (ctl_r / 75); in rt711_sdca_set_gain_get()
659 ucontrol->value.integer.value[0] = ctl_l; in rt711_sdca_set_gain_get()
660 ucontrol->value.integer.value[1] = ctl_r; in rt711_sdca_set_gain_get()
670 ch_l = (rt711->fu0f_dapm_mute || rt711->fu0f_mixer_l_mute) ? 0x01 : 0x00; in rt711_sdca_set_fu0f_capture_ctl()
671 ch_r = (rt711->fu0f_dapm_mute || rt711->fu0f_mixer_r_mute) ? 0x01 : 0x00; in rt711_sdca_set_fu0f_capture_ctl()
673 err = regmap_write(rt711->regmap, in rt711_sdca_set_fu0f_capture_ctl()
679 err = regmap_write(rt711->regmap, in rt711_sdca_set_fu0f_capture_ctl()
693 ch_l = (rt711->fu1e_dapm_mute || rt711->fu1e_mixer_l_mute) ? 0x01 : 0x00; in rt711_sdca_set_fu1e_capture_ctl()
694 ch_r = (rt711->fu1e_dapm_mute || rt711->fu1e_mixer_r_mute) ? 0x01 : 0x00; in rt711_sdca_set_fu1e_capture_ctl()
696 err = regmap_write(rt711->regmap, in rt711_sdca_set_fu1e_capture_ctl()
702 err = regmap_write(rt711->regmap, in rt711_sdca_set_fu1e_capture_ctl()
717 ucontrol->value.integer.value[0] = !rt711->fu1e_mixer_l_mute; in rt711_sdca_fu1e_capture_get()
718 ucontrol->value.integer.value[1] = !rt711->fu1e_mixer_r_mute; in rt711_sdca_fu1e_capture_get()
729 if (rt711->fu1e_mixer_l_mute != !ucontrol->value.integer.value[0] || in rt711_sdca_fu1e_capture_put()
730 rt711->fu1e_mixer_r_mute != !ucontrol->value.integer.value[1]) in rt711_sdca_fu1e_capture_put()
733 rt711->fu1e_mixer_l_mute = !ucontrol->value.integer.value[0]; in rt711_sdca_fu1e_capture_put()
734 rt711->fu1e_mixer_r_mute = !ucontrol->value.integer.value[1]; in rt711_sdca_fu1e_capture_put()
748 ucontrol->value.integer.value[0] = !rt711->fu0f_mixer_l_mute; in rt711_sdca_fu0f_capture_get()
749 ucontrol->value.integer.value[1] = !rt711->fu0f_mixer_r_mute; in rt711_sdca_fu0f_capture_get()
760 if (rt711->fu0f_mixer_l_mute != !ucontrol->value.integer.value[0] || in rt711_sdca_fu0f_capture_put()
761 rt711->fu0f_mixer_r_mute != !ucontrol->value.integer.value[1]) in rt711_sdca_fu0f_capture_put()
764 rt711->fu0f_mixer_l_mute = !ucontrol->value.integer.value[0]; in rt711_sdca_fu0f_capture_put()
765 rt711->fu0f_mixer_r_mute = !ucontrol->value.integer.value[1]; in rt711_sdca_fu0f_capture_put()
773 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -6525, 75, 0);
774 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -1725, 75, 0);
817 if (strstr(ucontrol->id.name, "ADC 22 Mux")) in rt711_sdca_mux_get()
819 else if (strstr(ucontrol->id.name, "ADC 23 Mux")) in rt711_sdca_mux_get()
822 return -EINVAL; in rt711_sdca_mux_get()
827 ucontrol->value.enumerated.item[0] = (val >> mask_sft) & 0x7; in rt711_sdca_mux_get()
840 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in rt711_sdca_mux_put()
841 unsigned int *item = ucontrol->value.enumerated.item; in rt711_sdca_mux_put()
844 if (item[0] >= e->items) in rt711_sdca_mux_put()
845 return -EINVAL; in rt711_sdca_mux_put()
847 if (strstr(ucontrol->id.name, "ADC 22 Mux")) in rt711_sdca_mux_put()
849 else if (strstr(ucontrol->id.name, "ADC 23 Mux")) in rt711_sdca_mux_put()
852 return -EINVAL; in rt711_sdca_mux_put()
854 val = snd_soc_enum_item_to_val(e, item[0]) << e->shift_l; in rt711_sdca_mux_put()
877 "MIC2",
901 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_fu05_event()
907 regmap_write(rt711->regmap, in rt711_sdca_fu05_event()
911 regmap_write(rt711->regmap, in rt711_sdca_fu05_event()
917 regmap_write(rt711->regmap, in rt711_sdca_fu05_event()
921 regmap_write(rt711->regmap, in rt711_sdca_fu05_event()
934 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_fu0f_event()
939 rt711->fu0f_dapm_mute = false; in rt711_sdca_fu0f_event()
943 rt711->fu0f_dapm_mute = true; in rt711_sdca_fu0f_event()
954 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_fu1e_event()
959 rt711->fu1e_dapm_mute = false; in rt711_sdca_fu1e_event()
963 rt711->fu1e_dapm_mute = true; in rt711_sdca_fu1e_event()
974 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_pde28_event()
980 regmap_write(rt711->regmap, in rt711_sdca_pde28_event()
986 regmap_write(rt711->regmap, in rt711_sdca_pde28_event()
999 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_pde29_event()
1005 regmap_write(rt711->regmap, in rt711_sdca_pde29_event()
1011 regmap_write(rt711->regmap, in rt711_sdca_pde29_event()
1024 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_pde2a_event()
1030 regmap_write(rt711->regmap, in rt711_sdca_pde2a_event()
1036 regmap_write(rt711->regmap, in rt711_sdca_pde2a_event()
1049 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_line1_power_event()
1055 regmap_read(rt711->regmap, in rt711_sdca_line1_power_event()
1059 regmap_write(rt711->regmap, in rt711_sdca_line1_power_event()
1063 regmap_write(rt711->regmap, in rt711_sdca_line1_power_event()
1069 regmap_write(rt711->regmap, in rt711_sdca_line1_power_event()
1074 regmap_write(rt711->regmap, in rt711_sdca_line1_power_event()
1088 snd_soc_dapm_to_component(w->dapm); in rt711_sdca_line2_power_event()
1094 regmap_write(rt711->regmap, in rt711_sdca_line2_power_event()
1098 regmap_write(rt711->regmap, in rt711_sdca_line2_power_event()
1104 regmap_write(rt711->regmap, in rt711_sdca_line2_power_event()
1108 regmap_write(rt711->regmap, in rt711_sdca_line2_power_event()
1120 SND_SOC_DAPM_INPUT("MIC2"),
1178 {"ADC 22 Mux", "MIC2", "MIC2"},
1182 {"ADC 23 Mux", "MIC2", "MIC2"},
1189 device_property_read_u32(dev, "realtek,jd-src", &rt711->jd_src); in rt711_sdca_parse_dt()
1199 rt711_sdca_parse_dt(rt711, &rt711->slave->dev); in rt711_sdca_probe()
1200 rt711->component = component; in rt711_sdca_probe()
1202 ret = pm_runtime_resume(component->dev); in rt711_sdca_probe()
1203 if (ret < 0 && ret != -EACCES) in rt711_sdca_probe()
1231 return -ENOMEM; in rt711_sdca_set_sdw_stream()
1233 stream->sdw_stream = sdw_stream; in rt711_sdca_set_sdw_stream()
1237 dai->playback_dma_data = stream; in rt711_sdca_set_sdw_stream()
1239 dai->capture_dma_data = stream; in rt711_sdca_set_sdw_stream()
1258 struct snd_soc_component *component = dai->component; in rt711_sdca_pcm_hw_params()
1267 dev_dbg(dai->dev, "%s %s", __func__, dai->name); in rt711_sdca_pcm_hw_params()
1271 return -EINVAL; in rt711_sdca_pcm_hw_params()
1273 if (!rt711->slave) in rt711_sdca_pcm_hw_params()
1274 return -EINVAL; in rt711_sdca_pcm_hw_params()
1277 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in rt711_sdca_pcm_hw_params()
1282 if (dai->id == RT711_AIF1) in rt711_sdca_pcm_hw_params()
1284 else if (dai->id == RT711_AIF2) in rt711_sdca_pcm_hw_params()
1287 return -EINVAL; in rt711_sdca_pcm_hw_params()
1296 port_config.ch_mask = GENMASK(num_channels - 1, 0); in rt711_sdca_pcm_hw_params()
1299 retval = sdw_stream_add_slave(rt711->slave, &stream_config, in rt711_sdca_pcm_hw_params()
1300 &port_config, 1, stream->sdw_stream); in rt711_sdca_pcm_hw_params()
1302 dev_err(dai->dev, "Unable to configure port\n"); in rt711_sdca_pcm_hw_params()
1307 dev_err(component->dev, "Unsupported channels %d\n", in rt711_sdca_pcm_hw_params()
1309 return -EINVAL; in rt711_sdca_pcm_hw_params()
1327 dev_err(component->dev, "Rate %d is not supported\n", in rt711_sdca_pcm_hw_params()
1329 return -EINVAL; in rt711_sdca_pcm_hw_params()
1333 regmap_write(rt711->regmap, in rt711_sdca_pcm_hw_params()
1336 regmap_write(rt711->regmap, in rt711_sdca_pcm_hw_params()
1339 regmap_write(rt711->regmap, in rt711_sdca_pcm_hw_params()
1349 struct snd_soc_component *component = dai->component; in rt711_sdca_pcm_hw_free()
1354 if (!rt711->slave) in rt711_sdca_pcm_hw_free()
1355 return -EINVAL; in rt711_sdca_pcm_hw_free()
1357 sdw_stream_remove_slave(rt711->slave, stream->sdw_stream); in rt711_sdca_pcm_hw_free()
1375 .name = "rt711-sdca-aif1",
1394 .name = "rt711-sdca-aif2",
1415 return -ENOMEM; in rt711_sdca_init()
1418 rt711->slave = slave; in rt711_sdca_init()
1419 rt711->regmap = regmap; in rt711_sdca_init()
1420 rt711->mbq_regmap = mbq_regmap; in rt711_sdca_init()
1422 mutex_init(&rt711->calibrate_mutex); in rt711_sdca_init()
1423 mutex_init(&rt711->disable_irq_lock); in rt711_sdca_init()
1425 INIT_DELAYED_WORK(&rt711->jack_detect_work, rt711_sdca_jack_detect_handler); in rt711_sdca_init()
1426 INIT_DELAYED_WORK(&rt711->jack_btn_check_work, rt711_sdca_btn_check_handler); in rt711_sdca_init()
1432 rt711->hw_init = false; in rt711_sdca_init()
1433 rt711->first_hw_init = false; in rt711_sdca_init()
1434 rt711->fu0f_dapm_mute = true; in rt711_sdca_init()
1435 rt711->fu1e_dapm_mute = true; in rt711_sdca_init()
1436 rt711->fu0f_mixer_l_mute = rt711->fu0f_mixer_r_mute = true; in rt711_sdca_init()
1437 rt711->fu1e_mixer_l_mute = rt711->fu1e_mixer_r_mute = true; in rt711_sdca_init()
1440 rt711->jd_src = RT711_JD2; in rt711_sdca_init()
1447 dev_dbg(&slave->dev, "%s\n", __func__); in rt711_sdca_init()
1459 regmap_write(rt711->regmap, 0x2f5a, 0x01); in rt711_sdca_vd0_io_init()
1467 regmap_write(rt711->regmap, 0x2f50, 0x02); in rt711_sdca_vd0_io_init()
1490 regmap_write(rt711->regmap, 0x2f5a, 0x05); in rt711_sdca_vd1_io_init()
1511 rt711->disable_irq = false; in rt711_sdca_io_init()
1513 if (rt711->hw_init) in rt711_sdca_io_init()
1516 if (rt711->first_hw_init) { in rt711_sdca_io_init()
1517 regcache_cache_only(rt711->regmap, false); in rt711_sdca_io_init()
1518 regcache_cache_bypass(rt711->regmap, true); in rt711_sdca_io_init()
1519 regcache_cache_only(rt711->mbq_regmap, false); in rt711_sdca_io_init()
1520 regcache_cache_bypass(rt711->mbq_regmap, true); in rt711_sdca_io_init()
1527 pm_runtime_set_autosuspend_delay(&slave->dev, 3000); in rt711_sdca_io_init()
1528 pm_runtime_use_autosuspend(&slave->dev); in rt711_sdca_io_init()
1531 pm_runtime_set_active(&slave->dev); in rt711_sdca_io_init()
1534 pm_runtime_mark_last_busy(&slave->dev); in rt711_sdca_io_init()
1536 pm_runtime_enable(&slave->dev); in rt711_sdca_io_init()
1539 pm_runtime_get_noresume(&slave->dev); in rt711_sdca_io_init()
1544 rt711->hw_ver = val & 0xf; in rt711_sdca_io_init()
1546 if (rt711->hw_ver == RT711_VER_VD0) in rt711_sdca_io_init()
1565 regmap_write(rt711->regmap, in rt711_sdca_io_init()
1572 if (rt711->hs_jack) in rt711_sdca_io_init()
1575 if (rt711->first_hw_init) { in rt711_sdca_io_init()
1576 regcache_cache_bypass(rt711->regmap, false); in rt711_sdca_io_init()
1577 regcache_mark_dirty(rt711->regmap); in rt711_sdca_io_init()
1578 regcache_cache_bypass(rt711->mbq_regmap, false); in rt711_sdca_io_init()
1579 regcache_mark_dirty(rt711->mbq_regmap); in rt711_sdca_io_init()
1581 rt711->first_hw_init = true; in rt711_sdca_io_init()
1584 rt711->hw_init = true; in rt711_sdca_io_init()
1586 pm_runtime_mark_last_busy(&slave->dev); in rt711_sdca_io_init()
1587 pm_runtime_put_autosuspend(&slave->dev); in rt711_sdca_io_init()
1589 dev_dbg(&slave->dev, "%s hw_init complete\n", __func__); in rt711_sdca_io_init()