Lines Matching defs:component

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