Lines Matching refs:component

43 	struct snd_soc_component *component;  member
999 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in rt5665_hp_vol_put() local
1002 if (snd_soc_component_read(component, RT5665_STO_NG2_CTRL_1) & RT5665_NG2_EN) { in rt5665_hp_vol_put()
1003 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1, in rt5665_hp_vol_put()
1005 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1, in rt5665_hp_vol_put()
1015 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in rt5665_mono_vol_put() local
1018 if (snd_soc_component_read(component, RT5665_MONO_NG2_CTRL_1) & RT5665_NG2_EN) { in rt5665_mono_vol_put()
1019 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1, in rt5665_mono_vol_put()
1021 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1, in rt5665_mono_vol_put()
1042 int rt5665_sel_asrc_clk_src(struct snd_soc_component *component, in rt5665_sel_asrc_clk_src() argument
1113 snd_soc_component_update_bits(component, RT5665_ASRC_2, in rt5665_sel_asrc_clk_src()
1117 snd_soc_component_update_bits(component, RT5665_ASRC_3, in rt5665_sel_asrc_clk_src()
1124 static int rt5665_button_detect(struct snd_soc_component *component) in rt5665_button_detect() argument
1128 val = snd_soc_component_read(component, RT5665_4BTN_IL_CMD_1); in rt5665_button_detect()
1130 snd_soc_component_write(component, RT5665_4BTN_IL_CMD_1, val); in rt5665_button_detect()
1135 static void rt5665_enable_push_button_irq(struct snd_soc_component *component, in rt5665_enable_push_button_irq() argument
1139 snd_soc_component_write(component, RT5665_4BTN_IL_CMD_1, 0x0003); in rt5665_enable_push_button_irq()
1140 snd_soc_component_update_bits(component, RT5665_SAR_IL_CMD_9, 0x1, 0x1); in rt5665_enable_push_button_irq()
1141 snd_soc_component_write(component, RT5665_IL_CMD_1, 0x0048); in rt5665_enable_push_button_irq()
1142 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2, in rt5665_enable_push_button_irq()
1145 snd_soc_component_update_bits(component, RT5665_IRQ_CTRL_3, in rt5665_enable_push_button_irq()
1148 snd_soc_component_update_bits(component, RT5665_IRQ_CTRL_3, in rt5665_enable_push_button_irq()
1150 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2, in rt5665_enable_push_button_irq()
1152 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2, in rt5665_enable_push_button_irq()
1166 static int rt5665_headset_detect(struct snd_soc_component *component, int jack_insert) in rt5665_headset_detect() argument
1168 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_headset_detect()
1169 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in rt5665_headset_detect()
1200 rt5665->sar_adc_value = snd_soc_component_read(rt5665->component, in rt5665_headset_detect()
1208 rt5665_enable_push_button_irq(component, true); in rt5665_headset_detect()
1224 rt5665_enable_push_button_irq(component, false); in rt5665_headset_detect()
1228 dev_dbg(component->dev, "jack_type = %d\n", rt5665->jack_type); in rt5665_headset_detect()
1247 if (snd_soc_component_read(rt5665->component, RT5665_AJD1_CTRL) & 0x0010) { in rt5665_jd_check_handler()
1249 rt5665->jack_type = rt5665_headset_detect(rt5665->component, 0); in rt5665_jd_check_handler()
1260 static int rt5665_set_jack_detect(struct snd_soc_component *component, in rt5665_set_jack_detect() argument
1263 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_jack_detect()
1280 dev_warn(component->dev, "Wrong JD source\n"); in rt5665_set_jack_detect()
1295 while (!rt5665->component) { in rt5665_jack_detect_handler()
1300 while (!snd_soc_card_is_instantiated(rt5665->component->card)) { in rt5665_jack_detect_handler()
1312 val = snd_soc_component_read(rt5665->component, RT5665_AJD1_CTRL) & 0x0010; in rt5665_jack_detect_handler()
1318 rt5665_headset_detect(rt5665->component, 1); in rt5665_jack_detect_handler()
1322 btn_type = rt5665_button_detect(rt5665->component); in rt5665_jack_detect_handler()
1355 dev_err(rt5665->component->dev, in rt5665_jack_detect_handler()
1363 rt5665->jack_type = rt5665_headset_detect(rt5665->component, 0); in rt5665_jack_detect_handler()
1478 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk() local
1479 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in set_dmic_clk()
1487 dev_err(component->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
1489 snd_soc_component_update_bits(component, RT5665_DMIC_CTRL_1, in set_dmic_clk()
1498 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_charge_pump_event() local
1502 snd_soc_component_update_bits(component, RT5665_HP_CHARGE_PUMP_1, in rt5665_charge_pump_event()
1507 snd_soc_component_update_bits(component, RT5665_HP_CHARGE_PUMP_1, in rt5665_charge_pump_event()
1522 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in is_sys_clk_from_pll() local
1524 val = snd_soc_component_read(component, RT5665_GLB_CLK); in is_sys_clk_from_pll()
1536 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in is_using_asrc() local
1575 val = (snd_soc_component_read(component, reg) >> shift) & 0xf; in is_using_asrc()
1581 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1, in is_using_asrc()
2473 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_mono_event() local
2477 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1, in rt5665_mono_event()
2479 snd_soc_component_update_bits(component, RT5665_MONO_AMP_CALIB_CTRL_1, 0x40, in rt5665_mono_event()
2481 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x10, 0x10); in rt5665_mono_event()
2482 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x20, 0x20); in rt5665_mono_event()
2486 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x20, 0); in rt5665_mono_event()
2487 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x10, 0); in rt5665_mono_event()
2488 snd_soc_component_update_bits(component, RT5665_MONO_AMP_CALIB_CTRL_1, 0x40, in rt5665_mono_event()
2490 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1, in rt5665_mono_event()
2505 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_hp_event() local
2509 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1, in rt5665_hp_event()
2511 snd_soc_component_write(component, RT5665_HP_LOGIC_CTRL_2, 0x0003); in rt5665_hp_event()
2515 snd_soc_component_write(component, RT5665_HP_LOGIC_CTRL_2, 0x0002); in rt5665_hp_event()
2516 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1, in rt5665_hp_event()
2531 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_lout_event() local
2535 snd_soc_component_update_bits(component, RT5665_DEPOP_1, in rt5665_lout_event()
2540 snd_soc_component_update_bits(component, RT5665_DEPOP_1, in rt5665_lout_event()
2571 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_set_verf() local
2577 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2582 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2587 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2600 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2605 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2610 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1, in rt5665_set_verf()
2629 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5665_i2s_pin_event() local
2659 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_1, in rt5665_i2s_pin_event()
2662 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_2, in rt5665_i2s_pin_event()
2667 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_1, in rt5665_i2s_pin_event()
2670 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_2, in rt5665_i2s_pin_event()
4051 struct snd_soc_component *component = dai->component; in rt5665_set_tdm_slot() local
4095 snd_soc_component_update_bits(component, RT5665_TDM_CTRL_1, in rt5665_set_tdm_slot()
4107 struct snd_soc_component *component = dai->component; in rt5665_hw_params() local
4108 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_hw_params()
4115 dev_warn(component->dev, "Force using PLL"); in rt5665_hw_params()
4116 snd_soc_component_set_pll(component, 0, RT5665_PLL1_S_MCLK, in rt5665_hw_params()
4118 snd_soc_component_set_sysclk(component, RT5665_SCLK_S_PLL1, 0, in rt5665_hw_params()
4124 dev_err(component->dev, "Unsupported frame size: %d\n", frame_size); in rt5665_hw_params()
4159 snd_soc_component_update_bits(component, RT5665_I2S1_SDP, in rt5665_hw_params()
4167 snd_soc_component_update_bits(component, RT5665_I2S2_SDP, in rt5665_hw_params()
4174 snd_soc_component_update_bits(component, RT5665_I2S3_SDP, in rt5665_hw_params()
4178 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5665_hw_params()
4182 snd_soc_component_update_bits(component, reg_clk, mask_clk, val_clk); in rt5665_hw_params()
4183 snd_soc_component_update_bits(component, RT5665_STO1_DAC_SIL_DET, 0x3700, val_bits); in rt5665_hw_params()
4187 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1, in rt5665_hw_params()
4192 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1, in rt5665_hw_params()
4197 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1, in rt5665_hw_params()
4204 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1, in rt5665_hw_params()
4208 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1, in rt5665_hw_params()
4217 struct snd_soc_component *component = dai->component; in rt5665_set_dai_fmt() local
4218 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_dai_fmt()
4262 snd_soc_component_update_bits(component, RT5665_I2S1_SDP, in rt5665_set_dai_fmt()
4268 snd_soc_component_update_bits(component, RT5665_I2S2_SDP, in rt5665_set_dai_fmt()
4273 snd_soc_component_update_bits(component, RT5665_I2S3_SDP, in rt5665_set_dai_fmt()
4278 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5665_set_dai_fmt()
4284 static int rt5665_set_component_sysclk(struct snd_soc_component *component, int clk_id, in rt5665_set_component_sysclk() argument
4287 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_component_sysclk()
4307 dev_err(component->dev, "Invalid clock id (%d)\n", clk_id); in rt5665_set_component_sysclk()
4310 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_sysclk()
4314 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1, in rt5665_set_component_sysclk()
4318 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1, in rt5665_set_component_sysclk()
4325 dev_dbg(component->dev, "Sysclk is %dHz and clock id is %d\n", freq, clk_id); in rt5665_set_component_sysclk()
4330 static int rt5665_set_component_pll(struct snd_soc_component *component, int pll_id, in rt5665_set_component_pll() argument
4334 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_component_pll()
4343 dev_dbg(component->dev, "PLL disabled\n"); in rt5665_set_component_pll()
4347 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_pll()
4354 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_pll()
4358 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_pll()
4362 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_pll()
4366 snd_soc_component_update_bits(component, RT5665_GLB_CLK, in rt5665_set_component_pll()
4370 dev_err(component->dev, "Unknown PLL Source %d\n", source); in rt5665_set_component_pll()
4376 dev_err(component->dev, "Unsupported input clock %d\n", freq_in); in rt5665_set_component_pll()
4380 dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n", in rt5665_set_component_pll()
4384 snd_soc_component_write(component, RT5665_PLL_CTRL_1, in rt5665_set_component_pll()
4386 snd_soc_component_write(component, RT5665_PLL_CTRL_2, in rt5665_set_component_pll()
4399 struct snd_soc_component *component = dai->component; in rt5665_set_bclk_ratio() local
4400 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_bclk_ratio()
4402 dev_dbg(component->dev, "%s ratio=%d\n", __func__, ratio); in rt5665_set_bclk_ratio()
4410 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_2, in rt5665_set_bclk_ratio()
4415 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_2, in rt5665_set_bclk_ratio()
4425 static int rt5665_set_bias_level(struct snd_soc_component *component, in rt5665_set_bias_level() argument
4428 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_set_bias_level()
4458 static int rt5665_probe(struct snd_soc_component *component) in rt5665_probe() argument
4460 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_probe()
4462 rt5665->component = component; in rt5665_probe()
4469 static void rt5665_remove(struct snd_soc_component *component) in rt5665_remove() argument
4471 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_remove()
4479 static int rt5665_suspend(struct snd_soc_component *component) in rt5665_suspend() argument
4481 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_suspend()
4488 static int rt5665_resume(struct snd_soc_component *component) in rt5665_resume() argument
4490 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); in rt5665_resume()
4749 while (!snd_soc_card_is_instantiated(rt5665->component->card)) { in rt5665_calibrate_handler()