Lines Matching full:rt5682
3 // rt5682.c -- RT5682 ALSA SoC audio component driver
28 #include <sound/rt5682.h>
31 #include "rt5682.h"
56 void rt5682_apply_patch_list(struct rt5682_priv *rt5682, struct device *dev) in rt5682_apply_patch_list() argument
60 ret = regmap_multi_reg_write(rt5682->regmap, patch_list, in rt5682_apply_patch_list()
815 void rt5682_reset(struct rt5682_priv *rt5682) in rt5682_reset() argument
817 regmap_write(rt5682->regmap, RT5682_RESET, 0); in rt5682_reset()
818 if (!rt5682->is_sdw) in rt5682_reset()
819 regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1); in rt5682_reset()
829 * The ASRC function is for asynchronous MCLK and LRCK. Also, since RT5682 can
883 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_enable_push_button_irq() local
894 if (rt5682->is_sdw) in rt5682_enable_push_button_irq()
928 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_headset_detect() local
966 rt5682->jack_type = SND_JACK_HEADSET; in rt5682_headset_detect()
972 rt5682->jack_type = SND_JACK_HEADPHONE; in rt5682_headset_detect()
1005 rt5682->jack_type = 0; in rt5682_headset_detect()
1008 dev_dbg(component->dev, "jack_type = %d\n", rt5682->jack_type); in rt5682_headset_detect()
1009 return rt5682->jack_type; in rt5682_headset_detect()
1015 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_jack_detect() local
1017 rt5682->hs_jack = hs_jack; in rt5682_set_jack_detect()
1019 if (rt5682->is_sdw && !rt5682->first_hw_init) in rt5682_set_jack_detect()
1023 regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, in rt5682_set_jack_detect()
1025 regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, in rt5682_set_jack_detect()
1027 cancel_delayed_work_sync(&rt5682->jack_detect_work); in rt5682_set_jack_detect()
1032 if (!rt5682->is_sdw) { in rt5682_set_jack_detect()
1033 switch (rt5682->pdata.jd_src) { in rt5682_set_jack_detect()
1048 regmap_update_bits(rt5682->regmap, RT5682_GPIO_CTRL_1, in rt5682_set_jack_detect()
1050 regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, in rt5682_set_jack_detect()
1054 regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_2, in rt5682_set_jack_detect()
1056 regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, in rt5682_set_jack_detect()
1059 regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_4, in rt5682_set_jack_detect()
1060 0x7f7f, (rt5682->pdata.btndet_delay << 8 | in rt5682_set_jack_detect()
1061 rt5682->pdata.btndet_delay)); in rt5682_set_jack_detect()
1062 regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_5, in rt5682_set_jack_detect()
1063 0x7f7f, (rt5682->pdata.btndet_delay << 8 | in rt5682_set_jack_detect()
1064 rt5682->pdata.btndet_delay)); in rt5682_set_jack_detect()
1065 regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_6, in rt5682_set_jack_detect()
1066 0x7f7f, (rt5682->pdata.btndet_delay << 8 | in rt5682_set_jack_detect()
1067 rt5682->pdata.btndet_delay)); in rt5682_set_jack_detect()
1068 regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_7, in rt5682_set_jack_detect()
1069 0x7f7f, (rt5682->pdata.btndet_delay << 8 | in rt5682_set_jack_detect()
1070 rt5682->pdata.btndet_delay)); in rt5682_set_jack_detect()
1072 &rt5682->jack_detect_work, in rt5682_set_jack_detect()
1077 regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, in rt5682_set_jack_detect()
1079 regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, in rt5682_set_jack_detect()
1094 struct rt5682_priv *rt5682 = in rt5682_jack_detect_handler() local
1099 if (!rt5682->component || in rt5682_jack_detect_handler()
1100 !snd_soc_card_is_instantiated(rt5682->component->card)) { in rt5682_jack_detect_handler()
1103 &rt5682->jack_detect_work, msecs_to_jiffies(15)); in rt5682_jack_detect_handler()
1107 if (rt5682->is_sdw) { in rt5682_jack_detect_handler()
1108 if (pm_runtime_status_suspended(rt5682->slave->dev.parent)) { in rt5682_jack_detect_handler()
1109 dev_dbg(&rt5682->slave->dev, in rt5682_jack_detect_handler()
1116 dapm = snd_soc_component_get_dapm(rt5682->component); in rt5682_jack_detect_handler()
1119 mutex_lock(&rt5682->calibrate_mutex); in rt5682_jack_detect_handler()
1121 val = snd_soc_component_read(rt5682->component, RT5682_AJD1_CTRL) in rt5682_jack_detect_handler()
1125 if (rt5682->jack_type == 0) { in rt5682_jack_detect_handler()
1127 rt5682->jack_type = in rt5682_jack_detect_handler()
1128 rt5682_headset_detect(rt5682->component, 1); in rt5682_jack_detect_handler()
1129 rt5682->irq_work_delay_time = 0; in rt5682_jack_detect_handler()
1130 } else if ((rt5682->jack_type & SND_JACK_HEADSET) == in rt5682_jack_detect_handler()
1133 rt5682->jack_type = SND_JACK_HEADSET; in rt5682_jack_detect_handler()
1134 btn_type = rt5682_button_detect(rt5682->component); in rt5682_jack_detect_handler()
1136 * rt5682 can report three kinds of button behavior, in rt5682_jack_detect_handler()
1146 rt5682->jack_type |= SND_JACK_BTN_0; in rt5682_jack_detect_handler()
1151 rt5682->jack_type |= SND_JACK_BTN_1; in rt5682_jack_detect_handler()
1156 rt5682->jack_type |= SND_JACK_BTN_2; in rt5682_jack_detect_handler()
1161 rt5682->jack_type |= SND_JACK_BTN_3; in rt5682_jack_detect_handler()
1166 dev_err(rt5682->component->dev, in rt5682_jack_detect_handler()
1174 rt5682->jack_type = rt5682_headset_detect(rt5682->component, 0); in rt5682_jack_detect_handler()
1175 rt5682->irq_work_delay_time = 50; in rt5682_jack_detect_handler()
1178 mutex_unlock(&rt5682->calibrate_mutex); in rt5682_jack_detect_handler()
1181 snd_soc_jack_report(rt5682->hs_jack, rt5682->jack_type, in rt5682_jack_detect_handler()
1186 if (!rt5682->is_sdw) { in rt5682_jack_detect_handler()
1187 if (rt5682->jack_type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 | in rt5682_jack_detect_handler()
1189 schedule_delayed_work(&rt5682->jd_check_work, 0); in rt5682_jack_detect_handler()
1191 cancel_delayed_work_sync(&rt5682->jd_check_work); in rt5682_jack_detect_handler()
1217 static int rt5682_div_sel(struct rt5682_priv *rt5682, in rt5682_div_sel() argument
1222 if (rt5682->sysclk < target) { in rt5682_div_sel()
1223 dev_err(rt5682->component->dev, in rt5682_div_sel()
1224 "sysclk rate %d is too low\n", rt5682->sysclk); in rt5682_div_sel()
1229 dev_dbg(rt5682->component->dev, "div[%d]=%d\n", i, div[i]); in rt5682_div_sel()
1230 if (target * div[i] == rt5682->sysclk) in rt5682_div_sel()
1232 if (target * div[i + 1] > rt5682->sysclk) { in rt5682_div_sel()
1233 dev_dbg(rt5682->component->dev, in rt5682_div_sel()
1235 rt5682->sysclk); in rt5682_div_sel()
1240 if (target * div[i] < rt5682->sysclk) in rt5682_div_sel()
1241 dev_err(rt5682->component->dev, in rt5682_div_sel()
1242 "sysclk rate %d is too high\n", rt5682->sysclk); in rt5682_div_sel()
1262 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in set_dmic_clk() local
1266 if (rt5682->pdata.dmic_clk_rate) in set_dmic_clk()
1267 dmic_clk_rate = rt5682->pdata.dmic_clk_rate; in set_dmic_clk()
1269 idx = rt5682_div_sel(rt5682, dmic_clk_rate, div, ARRAY_SIZE(div)); in set_dmic_clk()
1282 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in set_filter_clk() local
1287 if (rt5682->is_sdw) in set_filter_clk()
1294 ref = 256 * rt5682->lrck[RT5682_AIF2]; in set_filter_clk()
1296 ref = 256 * rt5682->lrck[RT5682_AIF1]; in set_filter_clk()
1298 idx = rt5682_div_sel(rt5682, ref, div_f, ARRAY_SIZE(div_f)); in set_filter_clk()
1310 if (rt5682->sysclk <= 12288000 * div_o[idx]) in set_filter_clk()
1581 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in set_dmic_power() local
1584 if (rt5682->pdata.dmic_delay) in set_dmic_power()
1585 delay = rt5682->pdata.dmic_delay; in set_dmic_power()
1602 if (!rt5682->jack_type) { in set_dmic_power()
2134 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_hw_params() local
2138 rt5682->lrck[dai->id] = params_rate(params); in rt5682_hw_params()
2139 pre_div = rl6231_get_clk_info(rt5682->sysclk, rt5682->lrck[dai->id]); in rt5682_hw_params()
2149 rt5682->lrck[dai->id], pre_div, dai->id); in rt5682_hw_params()
2178 if (rt5682->master[RT5682_AIF1]) { in rt5682_hw_params()
2183 (rt5682->sysclk_src) << RT5682_I2S_CLK_SRC_SFT); in rt5682_hw_params()
2197 if (rt5682->master[RT5682_AIF2]) { in rt5682_hw_params()
2222 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_dai_fmt() local
2227 rt5682->master[dai->id] = 1; in rt5682_set_dai_fmt()
2230 rt5682->master[dai->id] = 0; in rt5682_set_dai_fmt()
2287 tdm_ctrl | rt5682->master[dai->id]); in rt5682_set_dai_fmt()
2290 if (rt5682->master[dai->id] == 0) in rt5682_set_dai_fmt()
2306 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_component_sysclk() local
2309 if (freq == rt5682->sysclk && clk_id == rt5682->sysclk_src) in rt5682_set_component_sysclk()
2336 if (rt5682->master[RT5682_AIF2]) { in rt5682_set_component_sysclk()
2342 rt5682->sysclk = freq; in rt5682_set_component_sysclk()
2343 rt5682->sysclk_src = clk_id; in rt5682_set_component_sysclk()
2355 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_component_pll() local
2360 if (source == rt5682->pll_src[pll_id] && in rt5682_set_component_pll()
2361 freq_in == rt5682->pll_in[pll_id] && in rt5682_set_component_pll()
2362 freq_out == rt5682->pll_out[pll_id]) in rt5682_set_component_pll()
2368 rt5682->pll_in[pll_id] = 0; in rt5682_set_component_pll()
2369 rt5682->pll_out[pll_id] = 0; in rt5682_set_component_pll()
2474 rt5682->pll_in[pll_id] = freq_in; in rt5682_set_component_pll()
2475 rt5682->pll_out[pll_id] = freq_out; in rt5682_set_component_pll()
2476 rt5682->pll_src[pll_id] = source; in rt5682_set_component_pll()
2484 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_bclk1_ratio() local
2486 rt5682->bclk[dai->id] = ratio; in rt5682_set_bclk1_ratio()
2516 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_bclk2_ratio() local
2518 rt5682->bclk[dai->id] = ratio; in rt5682_set_bclk2_ratio()
2542 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_set_bias_level() local
2546 regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, in rt5682_set_bias_level()
2548 regmap_update_bits(rt5682->regmap, RT5682_PWR_DIG_1, in rt5682_set_bias_level()
2554 regmap_update_bits(rt5682->regmap, RT5682_PWR_DIG_1, in rt5682_set_bias_level()
2558 regmap_update_bits(rt5682->regmap, RT5682_PWR_DIG_1, in rt5682_set_bias_level()
2560 regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, in rt5682_set_bias_level()
2575 static bool rt5682_clk_check(struct rt5682_priv *rt5682) in rt5682_clk_check() argument
2577 if (!rt5682->master[RT5682_AIF1]) { in rt5682_clk_check()
2578 dev_dbg(rt5682->i2c_dev, "sysclk/dai not set correctly\n"); in rt5682_clk_check()
2586 struct rt5682_priv *rt5682 = in rt5682_wclk_prepare() local
2592 if (!rt5682_clk_check(rt5682)) in rt5682_wclk_prepare()
2595 component = rt5682->component; in rt5682_wclk_prepare()
2624 struct rt5682_priv *rt5682 = in rt5682_wclk_unprepare() local
2630 if (!rt5682_clk_check(rt5682)) in rt5682_wclk_unprepare()
2633 component = rt5682->component; in rt5682_wclk_unprepare()
2640 if (!rt5682->jack_type) in rt5682_wclk_unprepare()
2656 struct rt5682_priv *rt5682 = in rt5682_wclk_recalc_rate() local
2661 if (!rt5682_clk_check(rt5682)) in rt5682_wclk_recalc_rate()
2666 if (rt5682->lrck[RT5682_AIF1] != CLK_48 && in rt5682_wclk_recalc_rate()
2667 rt5682->lrck[RT5682_AIF1] != CLK_44) { in rt5682_wclk_recalc_rate()
2668 dev_warn(rt5682->i2c_dev, "%s: clk %s only support %d or %d Hz output\n", in rt5682_wclk_recalc_rate()
2673 return rt5682->lrck[RT5682_AIF1]; in rt5682_wclk_recalc_rate()
2679 struct rt5682_priv *rt5682 = in rt5682_wclk_round_rate() local
2684 if (!rt5682_clk_check(rt5682)) in rt5682_wclk_round_rate()
2691 dev_warn(rt5682->i2c_dev, "%s: clk %s only support %d or %d Hz output\n", in rt5682_wclk_round_rate()
2702 struct rt5682_priv *rt5682 = in rt5682_wclk_set_rate() local
2711 if (!rt5682_clk_check(rt5682)) in rt5682_wclk_set_rate()
2714 component = rt5682->component; in rt5682_wclk_set_rate()
2725 dev_warn(rt5682->i2c_dev, in rt5682_wclk_set_rate()
2730 dev_warn(rt5682->i2c_dev, "clk %s only support %d Hz input\n", in rt5682_wclk_set_rate()
2744 rt5682->lrck[RT5682_AIF1] = rate; in rt5682_wclk_set_rate()
2746 pre_div = rl6231_get_clk_info(rt5682->sysclk, rate); in rt5682_wclk_set_rate()
2751 (rt5682->sysclk_src) << RT5682_I2S_CLK_SRC_SFT); in rt5682_wclk_set_rate()
2759 struct rt5682_priv *rt5682 = in rt5682_bclk_recalc_rate() local
2764 regmap_read(rt5682->regmap, RT5682_TDM_TCON_CTRL, &bclks_per_wclk); in rt5682_bclk_recalc_rate()
2799 struct rt5682_priv *rt5682 = in rt5682_bclk_round_rate() local
2804 if (!*parent_rate || !rt5682_clk_check(rt5682)) in rt5682_bclk_round_rate()
2822 struct rt5682_priv *rt5682 = in rt5682_bclk_set_rate() local
2829 if (!rt5682_clk_check(rt5682)) in rt5682_bclk_set_rate()
2832 component = rt5682->component; in rt5682_bclk_set_rate()
2840 dev_err(rt5682->i2c_dev, "dai %d not found in component\n", in rt5682_bclk_set_rate()
2860 int rt5682_register_dai_clks(struct rt5682_priv *rt5682) in rt5682_register_dai_clks() argument
2862 struct device *dev = rt5682->i2c_dev; in rt5682_register_dai_clks()
2863 struct rt5682_platform_data *pdata = &rt5682->pdata; in rt5682_register_dai_clks()
2871 dai_clk_hw = &rt5682->dai_clks_hw[i]; in rt5682_register_dai_clks()
2876 if (rt5682->mclk) { in rt5682_register_dai_clks()
2877 parent = __clk_get_hw(rt5682->mclk); in rt5682_register_dai_clks()
2884 parent = &rt5682->dai_clks_hw[RT5682_DAI_WCLK_IDX]; in rt5682_register_dai_clks()
2926 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_probe() local
2931 rt5682->component = component; in rt5682_probe()
2933 if (rt5682->is_sdw) { in rt5682_probe()
2934 slave = rt5682->slave; in rt5682_probe()
2952 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_remove() local
2954 rt5682_reset(rt5682); in rt5682_remove()
2960 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_suspend() local
2963 if (rt5682->is_sdw) in rt5682_suspend()
2966 if (rt5682->irq) in rt5682_suspend()
2967 disable_irq(rt5682->irq); in rt5682_suspend()
2969 cancel_delayed_work_sync(&rt5682->jack_detect_work); in rt5682_suspend()
2970 cancel_delayed_work_sync(&rt5682->jd_check_work); in rt5682_suspend()
2971 if (rt5682->hs_jack && (rt5682->jack_type & SND_JACK_HEADSET) == SND_JACK_HEADSET) { in rt5682_suspend()
3006 regcache_cache_only(rt5682->regmap, true); in rt5682_suspend()
3007 regcache_mark_dirty(rt5682->regmap); in rt5682_suspend()
3013 struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); in rt5682_resume() local
3015 if (rt5682->is_sdw) in rt5682_resume()
3018 regcache_cache_only(rt5682->regmap, false); in rt5682_resume()
3019 regcache_sync(rt5682->regmap); in rt5682_resume()
3021 if (rt5682->hs_jack && (rt5682->jack_type & SND_JACK_HEADSET) == SND_JACK_HEADSET) { in rt5682_resume()
3033 rt5682->jack_type = 0; in rt5682_resume()
3035 &rt5682->jack_detect_work, msecs_to_jiffies(0)); in rt5682_resume()
3037 if (rt5682->irq) in rt5682_resume()
3038 enable_irq(rt5682->irq); in rt5682_resume()
3082 int rt5682_parse_dt(struct rt5682_priv *rt5682, struct device *dev) in rt5682_parse_dt() argument
3086 &rt5682->pdata.dmic1_data_pin); in rt5682_parse_dt()
3088 &rt5682->pdata.dmic1_clk_pin); in rt5682_parse_dt()
3090 &rt5682->pdata.jd_src); in rt5682_parse_dt()
3092 &rt5682->pdata.btndet_delay); in rt5682_parse_dt()
3094 &rt5682->pdata.dmic_clk_rate); in rt5682_parse_dt()
3096 &rt5682->pdata.dmic_delay); in rt5682_parse_dt()
3099 rt5682->pdata.dai_clk_names, in rt5682_parse_dt()
3102 rt5682->pdata.dai_clk_names[RT5682_DAI_WCLK_IDX], in rt5682_parse_dt()
3103 rt5682->pdata.dai_clk_names[RT5682_DAI_BCLK_IDX]); in rt5682_parse_dt()
3105 rt5682->pdata.dmic_clk_driving_high = device_property_read_bool(dev, in rt5682_parse_dt()
3112 int rt5682_get_ldo1(struct rt5682_priv *rt5682, struct device *dev) in rt5682_get_ldo1() argument
3114 rt5682->ldo1_en = devm_gpiod_get_optional(dev, in rt5682_get_ldo1()
3117 if (IS_ERR(rt5682->ldo1_en)) { in rt5682_get_ldo1()
3119 return PTR_ERR(rt5682->ldo1_en); in rt5682_get_ldo1()
3126 void rt5682_calibrate(struct rt5682_priv *rt5682) in rt5682_calibrate() argument
3130 mutex_lock(&rt5682->calibrate_mutex); in rt5682_calibrate()
3132 rt5682_reset(rt5682); in rt5682_calibrate()
3133 regmap_write(rt5682->regmap, RT5682_I2C_CTRL, 0x000f); in rt5682_calibrate()
3134 regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0xa2af); in rt5682_calibrate()
3136 regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0xf2af); in rt5682_calibrate()
3137 regmap_write(rt5682->regmap, RT5682_MICBIAS_2, 0x0300); in rt5682_calibrate()
3138 regmap_write(rt5682->regmap, RT5682_GLB_CLK, 0x8000); in rt5682_calibrate()
3139 regmap_write(rt5682->regmap, RT5682_PWR_DIG_1, 0x0100); in rt5682_calibrate()
3140 regmap_write(rt5682->regmap, RT5682_HP_IMP_SENS_CTRL_19, 0x3800); in rt5682_calibrate()
3141 regmap_write(rt5682->regmap, RT5682_CHOP_DAC, 0x3000); in rt5682_calibrate()
3142 regmap_write(rt5682->regmap, RT5682_CALIB_ADC_CTRL, 0x7005); in rt5682_calibrate()
3143 regmap_write(rt5682->regmap, RT5682_STO1_ADC_MIXER, 0x686c); in rt5682_calibrate()
3144 regmap_write(rt5682->regmap, RT5682_CAL_REC, 0x0d0d); in rt5682_calibrate()
3145 regmap_write(rt5682->regmap, RT5682_HP_CALIB_CTRL_2, 0x0321); in rt5682_calibrate()
3146 regmap_write(rt5682->regmap, RT5682_HP_LOGIC_CTRL_2, 0x0004); in rt5682_calibrate()
3147 regmap_write(rt5682->regmap, RT5682_HP_CALIB_CTRL_1, 0x7c00); in rt5682_calibrate()
3148 regmap_write(rt5682->regmap, RT5682_HP_CALIB_CTRL_3, 0x06a1); in rt5682_calibrate()
3149 regmap_write(rt5682->regmap, RT5682_A_DAC1_MUX, 0x0311); in rt5682_calibrate()
3150 regmap_write(rt5682->regmap, RT5682_HP_CALIB_CTRL_1, 0x7c00); in rt5682_calibrate()
3152 regmap_write(rt5682->regmap, RT5682_HP_CALIB_CTRL_1, 0xfc00); in rt5682_calibrate()
3155 regmap_read(rt5682->regmap, RT5682_HP_CALIB_STA_1, &value); in rt5682_calibrate()
3163 dev_err(rt5682->component->dev, "HP Calibration Failure\n"); in rt5682_calibrate()
3166 regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0x002f); in rt5682_calibrate()
3167 regmap_write(rt5682->regmap, RT5682_MICBIAS_2, 0x0080); in rt5682_calibrate()
3168 regmap_write(rt5682->regmap, RT5682_GLB_CLK, 0x0000); in rt5682_calibrate()
3169 regmap_write(rt5682->regmap, RT5682_PWR_DIG_1, 0x0000); in rt5682_calibrate()
3170 regmap_write(rt5682->regmap, RT5682_CHOP_DAC, 0x2000); in rt5682_calibrate()
3171 regmap_write(rt5682->regmap, RT5682_CALIB_ADC_CTRL, 0x2005); in rt5682_calibrate()
3172 regmap_write(rt5682->regmap, RT5682_STO1_ADC_MIXER, 0xc0c4); in rt5682_calibrate()
3173 regmap_write(rt5682->regmap, RT5682_CAL_REC, 0x0c0c); in rt5682_calibrate()
3175 mutex_unlock(&rt5682->calibrate_mutex); in rt5682_calibrate()
3179 MODULE_DESCRIPTION("ASoC RT5682 driver");