Lines Matching refs:component
627 static int rt5682s_button_detect(struct snd_soc_component *component) in rt5682s_button_detect() argument
631 val = snd_soc_component_read(component, RT5682S_4BTN_IL_CMD_1); in rt5682s_button_detect()
633 snd_soc_component_write(component, RT5682S_4BTN_IL_CMD_1, val); in rt5682s_button_detect()
634 dev_dbg(component->dev, "%s btn_type=%x\n", __func__, btn_type); in rt5682s_button_detect()
635 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_2, in rt5682s_button_detect()
647 static void rt5682s_sar_power_mode(struct snd_soc_component *component, int mode) in rt5682s_sar_power_mode() argument
649 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_sar_power_mode()
655 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_3, in rt5682s_sar_power_mode()
657 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_sar_power_mode()
660 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_sar_power_mode()
665 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_sar_power_mode()
668 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_2, in rt5682s_sar_power_mode()
672 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_3, in rt5682s_sar_power_mode()
674 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_sar_power_mode()
677 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_sar_power_mode()
680 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_sar_power_mode()
685 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_sar_power_mode()
688 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_sar_power_mode()
694 dev_err(component->dev, "Invalid SAR Power mode: %d\n", mode); in rt5682s_sar_power_mode()
701 static void rt5682s_enable_push_button_irq(struct snd_soc_component *component) in rt5682s_enable_push_button_irq() argument
703 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_13, in rt5682s_enable_push_button_irq()
705 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_enable_push_button_irq()
709 snd_soc_component_write(component, RT5682S_IL_CMD_1, 0x0040); in rt5682s_enable_push_button_irq()
710 snd_soc_component_update_bits(component, RT5682S_4BTN_IL_CMD_2, in rt5682s_enable_push_button_irq()
713 snd_soc_component_update_bits(component, RT5682S_IRQ_CTRL_3, in rt5682s_enable_push_button_irq()
717 static void rt5682s_disable_push_button_irq(struct snd_soc_component *component) in rt5682s_disable_push_button_irq() argument
719 snd_soc_component_update_bits(component, RT5682S_IRQ_CTRL_3, in rt5682s_disable_push_button_irq()
721 snd_soc_component_update_bits(component, RT5682S_4BTN_IL_CMD_2, in rt5682s_disable_push_button_irq()
723 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_13, in rt5682s_disable_push_button_irq()
725 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_disable_push_button_irq()
740 static int rt5682s_headset_detect(struct snd_soc_component *component, int jack_insert) in rt5682s_headset_detect() argument
742 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_headset_detect()
747 rt5682s_disable_push_button_irq(component); in rt5682s_headset_detect()
748 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_headset_detect()
751 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_headset_detect()
754 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_headset_detect()
757 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_3, in rt5682s_headset_detect()
759 snd_soc_component_write(component, RT5682S_SAR_IL_CMD_3, 0x0365); in rt5682s_headset_detect()
760 snd_soc_component_update_bits(component, RT5682S_HP_CHARGE_PUMP_2, in rt5682s_headset_detect()
763 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_13, in rt5682s_headset_detect()
765 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_3, in rt5682s_headset_detect()
767 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_headset_detect()
770 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_headset_detect()
776 val = snd_soc_component_read(component, RT5682S_CBJ_CTRL_2) in rt5682s_headset_detect()
781 dev_dbg(component->dev, "%s, val=%d, count=%d\n", __func__, val, count); in rt5682s_headset_detect()
787 snd_soc_component_write(component, RT5682S_SAR_IL_CMD_3, 0x024c); in rt5682s_headset_detect()
788 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_headset_detect()
790 snd_soc_component_update_bits(component, RT5682S_SAR_IL_CMD_1, in rt5682s_headset_detect()
792 rt5682s_enable_push_button_irq(component); in rt5682s_headset_detect()
793 rt5682s_sar_power_mode(component, SAR_PWR_SAVING); in rt5682s_headset_detect()
799 snd_soc_component_update_bits(component, RT5682S_HP_CHARGE_PUMP_2, in rt5682s_headset_detect()
804 rt5682s_sar_power_mode(component, SAR_PWR_OFF); in rt5682s_headset_detect()
805 rt5682s_disable_push_button_irq(component); in rt5682s_headset_detect()
806 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_headset_detect()
810 snd_soc_component_update_bits(component, in rt5682s_headset_detect()
814 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_3, in rt5682s_headset_detect()
816 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_1, in rt5682s_headset_detect()
818 snd_soc_component_update_bits(component, RT5682S_CBJ_CTRL_3, in rt5682s_headset_detect()
823 dev_dbg(component->dev, "jack_type = %d\n", jack_type); in rt5682s_headset_detect()
835 if (!rt5682s->component || in rt5682s_jack_detect_handler()
836 !snd_soc_card_is_instantiated(rt5682s->component->card)) { in rt5682s_jack_detect_handler()
843 dapm = snd_soc_component_get_dapm(rt5682s->component); in rt5682s_jack_detect_handler()
849 val = snd_soc_component_read(rt5682s->component, RT5682S_AJD1_CTRL) in rt5682s_jack_detect_handler()
855 rt5682s->jack_type = rt5682s_headset_detect(rt5682s->component, 1); in rt5682s_jack_detect_handler()
860 btn_type = rt5682s_button_detect(rt5682s->component); in rt5682s_jack_detect_handler()
892 dev_err(rt5682s->component->dev, in rt5682s_jack_detect_handler()
899 rt5682s->jack_type = rt5682s_headset_detect(rt5682s->component, 0); in rt5682s_jack_detect_handler()
923 if (snd_soc_component_read(rt5682s->component, RT5682S_AJD1_CTRL) & RT5682S_JDH_RS_MASK) { in rt5682s_jd_check_handler()
941 static int rt5682s_set_jack_detect(struct snd_soc_component *component, in rt5682s_set_jack_detect() argument
944 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_jack_detect()
1008 dev_warn(component->dev, "Wrong JD source\n"); in rt5682s_set_jack_detect()
1054 int rt5682s_sel_asrc_clk_src(struct snd_soc_component *component, in rt5682s_sel_asrc_clk_src() argument
1068 snd_soc_component_update_bits(component, RT5682S_PLL_TRACK_2, in rt5682s_sel_asrc_clk_src()
1073 snd_soc_component_update_bits(component, RT5682S_PLL_TRACK_3, in rt5682s_sel_asrc_clk_src()
1077 snd_soc_component_update_bits(component, RT5682S_PLL_TRACK_11, in rt5682s_sel_asrc_clk_src()
1090 dev_err(rt5682s->component->dev, in rt5682s_div_sel()
1096 dev_dbg(rt5682s->component->dev, "div[%d]=%d\n", i, div[i]); in rt5682s_div_sel()
1100 dev_dbg(rt5682s->component->dev, in rt5682s_div_sel()
1107 dev_err(rt5682s->component->dev, in rt5682s_div_sel()
1142 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk() local
1143 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in set_dmic_clk()
1152 snd_soc_component_update_bits(component, RT5682S_DMIC_CTRL_1, in set_dmic_clk()
1161 struct snd_soc_component *component = rt5682s->component; in rt5682s_set_pllb_power() local
1164 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_3, in rt5682s_set_pllb_power()
1167 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_3, in rt5682s_set_pllb_power()
1170 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_3, in rt5682s_set_pllb_power()
1181 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_pllb_event() local
1182 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in set_pllb_event()
1198 struct snd_soc_component *component = rt5682s->component; in rt5682s_set_filter_clk() local
1205 snd_soc_component_update_bits(component, reg, in rt5682s_set_filter_clk()
1214 snd_soc_component_update_bits(component, RT5682S_ADDA_CLK_1, in rt5682s_set_filter_clk()
1222 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_filter_clk() local
1223 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in set_filter_clk()
1226 val = snd_soc_component_read(component, RT5682S_GPIO_CTRL_1) in set_filter_clk()
1247 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_power() local
1248 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in set_dmic_power()
1256 val = (snd_soc_component_read(component, RT5682S_GLB_CLK) in set_dmic_power()
1259 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in set_dmic_power()
1269 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in set_dmic_power()
1280 struct snd_soc_component *component = rt5682s->component; in rt5682s_set_i2s() local
1304 dev_err(component->dev, "get pre_div failed\n"); in rt5682s_set_i2s()
1308 dev_dbg(component->dev, "lrck is %dHz and pre_div is %d for iis %d master\n", in rt5682s_set_i2s()
1310 snd_soc_component_update_bits(component, c_reg, c_mask, pre_div << c_sft); in rt5682s_set_i2s()
1313 snd_soc_component_update_bits(component, p_reg, p_mask, on << p_sft); in rt5682s_set_i2s()
1319 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_i2s_event() local
1320 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in set_i2s_event()
1337 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in is_sys_clk_from_plla() local
1338 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in is_sys_clk_from_plla()
1350 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in is_sys_clk_from_pllb() local
1351 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in is_sys_clk_from_pllb()
1363 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in is_using_asrc() local
1378 val = (snd_soc_component_read(component, reg) >> sft) & 0xf; in is_using_asrc()
1391 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5682s_hp_amp_event() local
1395 snd_soc_component_update_bits(component, RT5682S_DEPOP_1, in rt5682s_hp_amp_event()
1399 snd_soc_component_update_bits(component, RT5682S_DEPOP_1, in rt5682s_hp_amp_event()
1404 snd_soc_component_write(component, RT5682S_BIAS_CUR_CTRL_11, 0x6666); in rt5682s_hp_amp_event()
1405 snd_soc_component_write(component, RT5682S_BIAS_CUR_CTRL_12, 0xa82a); in rt5682s_hp_amp_event()
1407 snd_soc_component_update_bits(component, RT5682S_HP_CTRL_2, in rt5682s_hp_amp_event()
1412 snd_soc_component_update_bits(component, RT5682S_HP_AMP_DET_CTL_1, in rt5682s_hp_amp_event()
1417 snd_soc_component_update_bits(component, RT5682S_HP_CTRL_2, in rt5682s_hp_amp_event()
1420 snd_soc_component_update_bits(component, RT5682S_HP_AMP_DET_CTL_1, in rt5682s_hp_amp_event()
1422 snd_soc_component_update_bits(component, RT5682S_DEPOP_1, in rt5682s_hp_amp_event()
1425 snd_soc_component_update_bits(component, RT5682S_DEPOP_1, in rt5682s_hp_amp_event()
1436 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5682s_stereo1_adc_mixl_event() local
1437 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_stereo1_adc_mixl_event()
1446 snd_soc_component_update_bits(component, RT5682S_STO1_ADC_DIG_VOL, in rt5682s_stereo1_adc_mixl_event()
1450 snd_soc_component_update_bits(component, RT5682S_STO1_ADC_DIG_VOL, in rt5682s_stereo1_adc_mixl_event()
1461 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in sar_power_event() local
1462 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in sar_power_event()
1469 rt5682s_sar_power_mode(component, SAR_PWR_NORMAL); in sar_power_event()
1472 rt5682s_sar_power_mode(component, SAR_PWR_SAVING); in sar_power_event()
1983 struct snd_soc_component *component = dai->component; in rt5682s_set_tdm_slot() local
1987 snd_soc_component_update_bits(component, in rt5682s_set_tdm_slot()
1990 snd_soc_component_update_bits(component, in rt5682s_set_tdm_slot()
1997 dev_err(component->dev, "Invalid or oversized Tx slots.\n"); in rt5682s_set_tdm_slot()
2022 snd_soc_component_update_bits(component, RT5682S_TDM_CTRL, in rt5682s_set_tdm_slot()
2052 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_tdm_slot()
2054 snd_soc_component_update_bits(component, RT5682S_I2S1_SDP, in rt5682s_set_tdm_slot()
2063 struct snd_soc_component *component = dai->component; in rt5682s_hw_params() local
2064 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_hw_params()
2072 dev_err(component->dev, "Unsupported frame size: %d\n", frame_size); in rt5682s_hw_params()
2101 snd_soc_component_update_bits(component, RT5682S_I2S1_SDP, in rt5682s_hw_params()
2104 snd_soc_component_update_bits(component, RT5682S_I2S1_SDP, in rt5682s_hw_params()
2107 snd_soc_component_update_bits(component, RT5682S_I2S1_SDP, in rt5682s_hw_params()
2111 snd_soc_component_update_bits(component, RT5682S_I2S2_SDP, in rt5682s_hw_params()
2114 snd_soc_component_update_bits(component, RT5682S_I2S2_SDP, in rt5682s_hw_params()
2117 snd_soc_component_update_bits(component, RT5682S_I2S2_SDP, in rt5682s_hw_params()
2121 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5682s_hw_params()
2130 struct snd_soc_component *component = dai->component; in rt5682s_set_dai_fmt() local
2131 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_dai_fmt()
2190 snd_soc_component_update_bits(component, RT5682S_I2S1_SDP, in rt5682s_set_dai_fmt()
2192 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_dai_fmt()
2201 snd_soc_component_update_bits(component, RT5682S_I2S2_SDP, in rt5682s_set_dai_fmt()
2206 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5682s_set_dai_fmt()
2212 static int rt5682s_set_component_sysclk(struct snd_soc_component *component, in rt5682s_set_component_sysclk() argument
2215 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_component_sysclk()
2235 dev_err(component->dev, "Invalid clock id (%d)\n", clk_id); in rt5682s_set_component_sysclk()
2239 snd_soc_component_update_bits(component, RT5682S_GLB_CLK, in rt5682s_set_component_sysclk()
2241 snd_soc_component_update_bits(component, RT5682S_ADDA_CLK_1, in rt5682s_set_component_sysclk()
2243 snd_soc_component_update_bits(component, RT5682S_I2S2_M_CLK_CTRL_1, in rt5682s_set_component_sysclk()
2249 dev_dbg(component->dev, "Sysclk is %dHz and clock id is %d\n", in rt5682s_set_component_sysclk()
2329 static int rt5682s_set_component_pll(struct snd_soc_component *component, in rt5682s_set_component_pll() argument
2333 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_component_pll()
2341 dev_dbg(component->dev, "PLL disabled\n"); in rt5682s_set_component_pll()
2344 snd_soc_component_update_bits(component, RT5682S_GLB_CLK, in rt5682s_set_component_pll()
2351 snd_soc_component_update_bits(component, RT5682S_GLB_CLK, in rt5682s_set_component_pll()
2355 snd_soc_component_update_bits(component, RT5682S_GLB_CLK, in rt5682s_set_component_pll()
2359 dev_err(component->dev, "Unknown PLL Source %d\n", source); in rt5682s_set_component_pll()
2369 dev_dbg(component->dev, in rt5682s_set_component_pll()
2373 dev_err(component->dev, in rt5682s_set_component_pll()
2380 dev_dbg(component->dev, in rt5682s_set_component_pll()
2384 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_1, in rt5682s_set_component_pll()
2386 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_2, in rt5682s_set_component_pll()
2389 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_6, in rt5682s_set_component_pll()
2396 dev_dbg(component->dev, in rt5682s_set_component_pll()
2401 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_3, in rt5682s_set_component_pll()
2403 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_4, in rt5682s_set_component_pll()
2406 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_6, in rt5682s_set_component_pll()
2416 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_7, in rt5682s_set_component_pll()
2429 struct snd_soc_component *component = dai->component; in rt5682s_set_bclk1_ratio() local
2430 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_bclk1_ratio()
2436 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_bclk1_ratio()
2440 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_bclk1_ratio()
2444 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_bclk1_ratio()
2448 snd_soc_component_update_bits(component, RT5682S_TDM_TCON_CTRL_1, in rt5682s_set_bclk1_ratio()
2461 struct snd_soc_component *component = dai->component; in rt5682s_set_bclk2_ratio() local
2462 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_bclk2_ratio()
2468 snd_soc_component_update_bits(component, RT5682S_ADDA_CLK_2, in rt5682s_set_bclk2_ratio()
2472 snd_soc_component_update_bits(component, RT5682S_ADDA_CLK_2, in rt5682s_set_bclk2_ratio()
2483 static int rt5682s_set_bias_level(struct snd_soc_component *component, in rt5682s_set_bias_level() argument
2486 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_set_bias_level()
2494 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) in rt5682s_set_bias_level()
2519 dev_dbg(rt5682s->component->dev, "dai clk fmt not set correctly\n"); in rt5682s_clk_check()
2529 struct snd_soc_component *component = rt5682s->component; in rt5682s_wclk_prepare() local
2537 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_wclk_prepare()
2541 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_wclk_prepare()
2545 snd_soc_component_update_bits(component, RT5682S_PWR_DIG_1, in rt5682s_wclk_prepare()
2566 struct snd_soc_component *component = rt5682s->component; in rt5682s_wclk_unprepare() local
2574 snd_soc_component_update_bits(component, RT5682S_PWR_ANLG_1, in rt5682s_wclk_unprepare()
2579 snd_soc_component_update_bits(component, RT5682S_PWR_DIG_1, in rt5682s_wclk_unprepare()
2595 struct snd_soc_component *component = rt5682s->component; in rt5682s_wclk_recalc_rate() local
2605 dev_warn(component->dev, "%s: clk %s only support %d or %d Hz output\n", in rt5682s_wclk_recalc_rate()
2618 struct snd_soc_component *component = rt5682s->component; in rt5682s_wclk_round_rate() local
2628 dev_warn(component->dev, "%s: clk %s only support %d or %d Hz output\n", in rt5682s_wclk_round_rate()
2641 struct snd_soc_component *component = rt5682s->component; in rt5682s_wclk_set_rate() local
2658 dev_warn(component->dev, in rt5682s_wclk_set_rate()
2663 dev_warn(component->dev, "clk %s only support %d Hz input\n", in rt5682s_wclk_set_rate()
2671 rt5682s_set_component_pll(component, RT5682S_PLL2, RT5682S_PLL_S_MCLK, in rt5682s_wclk_set_rate()
2674 rt5682s_set_component_sysclk(component, RT5682S_SCLK_S_PLL2, 0, in rt5682s_wclk_set_rate()
2687 struct snd_soc_component *component = rt5682s->component; in rt5682s_bclk_recalc_rate() local
2690 bclks_per_wclk = snd_soc_component_read(component, RT5682S_TDM_TCON_CTRL_1); in rt5682s_bclk_recalc_rate()
2749 struct snd_soc_component *component = rt5682s->component; in rt5682s_bclk_set_rate() local
2758 for_each_component_dais(component, dai) in rt5682s_bclk_set_rate()
2762 dev_err(component->dev, "dai %d not found in component\n", in rt5682s_bclk_set_rate()
2782 static int rt5682s_register_dai_clks(struct snd_soc_component *component) in rt5682s_register_dai_clks() argument
2784 struct device *dev = component->dev; in rt5682s_register_dai_clks()
2785 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_register_dai_clks()
2843 static int rt5682s_dai_probe_clks(struct snd_soc_component *component) in rt5682s_dai_probe_clks() argument
2845 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_dai_probe_clks()
2849 rt5682s->mclk = devm_clk_get_optional(component->dev, "mclk"); in rt5682s_dai_probe_clks()
2854 ret = rt5682s_register_dai_clks(component); in rt5682s_dai_probe_clks()
2864 static inline int rt5682s_dai_probe_clks(struct snd_soc_component *component) in rt5682s_dai_probe_clks() argument
2870 static int rt5682s_probe(struct snd_soc_component *component) in rt5682s_probe() argument
2872 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_probe()
2874 rt5682s->component = component; in rt5682s_probe()
2876 return rt5682s_dai_probe_clks(component); in rt5682s_probe()
2879 static void rt5682s_remove(struct snd_soc_component *component) in rt5682s_remove() argument
2881 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_remove()
2887 static int rt5682s_suspend(struct snd_soc_component *component) in rt5682s_suspend() argument
2889 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_suspend()
2898 rt5682s->jack_type = rt5682s_headset_detect(component, 0); in rt5682s_suspend()
2906 static int rt5682s_resume(struct snd_soc_component *component) in rt5682s_resume() argument
2908 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component); in rt5682s_resume()
3019 dev_err(rt5682s->component->dev, "HP Calibration Failure\n"); in rt5682s_calibrate()