Lines Matching defs:component

44 	struct snd_soc_component *component;
1000 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1003 if (snd_soc_component_read(component, RT5665_STO_NG2_CTRL_1) & RT5665_NG2_EN) {
1004 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1,
1006 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1,
1016 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1019 if (snd_soc_component_read(component, RT5665_MONO_NG2_CTRL_1) & RT5665_NG2_EN) {
1020 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1,
1022 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1,
1031 * @component: SoC audio component device.
1043 int rt5665_sel_asrc_clk_src(struct snd_soc_component *component,
1114 snd_soc_component_update_bits(component, RT5665_ASRC_2,
1118 snd_soc_component_update_bits(component, RT5665_ASRC_3,
1125 static int rt5665_button_detect(struct snd_soc_component *component)
1129 val = snd_soc_component_read(component, RT5665_4BTN_IL_CMD_1);
1131 snd_soc_component_write(component, RT5665_4BTN_IL_CMD_1, val);
1136 static void rt5665_enable_push_button_irq(struct snd_soc_component *component,
1140 snd_soc_component_write(component, RT5665_4BTN_IL_CMD_1, 0x0003);
1141 snd_soc_component_update_bits(component, RT5665_SAR_IL_CMD_9, 0x1, 0x1);
1142 snd_soc_component_write(component, RT5665_IL_CMD_1, 0x0048);
1143 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2,
1146 snd_soc_component_update_bits(component, RT5665_IRQ_CTRL_3,
1149 snd_soc_component_update_bits(component, RT5665_IRQ_CTRL_3,
1151 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2,
1153 snd_soc_component_update_bits(component, RT5665_4BTN_IL_CMD_2,
1160 * @component: SoC audio component device.
1167 static int rt5665_headset_detect(struct snd_soc_component *component, int jack_insert)
1169 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
1170 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
1201 rt5665->sar_adc_value = snd_soc_component_read(rt5665->component,
1209 rt5665_enable_push_button_irq(component, true);
1225 rt5665_enable_push_button_irq(component, false);
1229 dev_dbg(component->dev, "jack_type = %d\n", rt5665->jack_type);
1248 if (snd_soc_component_read(rt5665->component, RT5665_AJD1_CTRL) & 0x0010) {
1250 rt5665->jack_type = rt5665_headset_detect(rt5665->component, 0);
1261 static int rt5665_set_jack_detect(struct snd_soc_component *component,
1264 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
1281 dev_warn(component->dev, "Wrong JD source\n");
1296 while (!rt5665->component) {
1301 while (!rt5665->component->card->instantiated) {
1313 val = snd_soc_component_read(rt5665->component, RT5665_AJD1_CTRL) & 0x0010;
1319 rt5665_headset_detect(rt5665->component, 1);
1323 btn_type = rt5665_button_detect(rt5665->component);
1356 dev_err(rt5665->component->dev,
1364 rt5665->jack_type = rt5665_headset_detect(rt5665->component, 0);
1479 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1480 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
1488 dev_err(component->dev, "Failed to set DMIC clock\n");
1490 snd_soc_component_update_bits(component, RT5665_DMIC_CTRL_1,
1499 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1503 snd_soc_component_update_bits(component, RT5665_HP_CHARGE_PUMP_1,
1508 snd_soc_component_update_bits(component, RT5665_HP_CHARGE_PUMP_1,
1523 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1525 val = snd_soc_component_read(component, RT5665_GLB_CLK);
1537 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1576 val = (snd_soc_component_read(component, reg) >> shift) & 0xf;
1582 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1,
2474 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
2478 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1,
2480 snd_soc_component_update_bits(component, RT5665_MONO_AMP_CALIB_CTRL_1, 0x40,
2482 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x10, 0x10);
2483 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x20, 0x20);
2487 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x20, 0);
2488 snd_soc_component_update_bits(component, RT5665_MONO_OUT, 0x10, 0);
2489 snd_soc_component_update_bits(component, RT5665_MONO_AMP_CALIB_CTRL_1, 0x40,
2491 snd_soc_component_update_bits(component, RT5665_MONO_NG2_CTRL_1,
2506 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
2510 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1,
2512 snd_soc_component_write(component, RT5665_HP_LOGIC_CTRL_2, 0x0003);
2516 snd_soc_component_write(component, RT5665_HP_LOGIC_CTRL_2, 0x0002);
2517 snd_soc_component_update_bits(component, RT5665_STO_NG2_CTRL_1,
2532 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
2536 snd_soc_component_update_bits(component, RT5665_DEPOP_1,
2541 snd_soc_component_update_bits(component, RT5665_DEPOP_1,
2572 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
2578 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2583 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2588 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2601 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2606 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2611 snd_soc_component_update_bits(component, RT5665_PWR_ANLG_1,
2630 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
2660 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_1,
2663 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_2,
2668 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_1,
2671 snd_soc_component_update_bits(component, RT5665_GPIO_CTRL_2,
4052 struct snd_soc_component *component = dai->component;
4096 snd_soc_component_update_bits(component, RT5665_TDM_CTRL_1,
4108 struct snd_soc_component *component = dai->component;
4109 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4116 dev_warn(component->dev, "Force using PLL");
4117 snd_soc_component_set_pll(component, 0, RT5665_PLL1_S_MCLK,
4119 snd_soc_component_set_sysclk(component, RT5665_SCLK_S_PLL1, 0,
4125 dev_err(component->dev, "Unsupported frame size: %d\n", frame_size);
4160 snd_soc_component_update_bits(component, RT5665_I2S1_SDP,
4168 snd_soc_component_update_bits(component, RT5665_I2S2_SDP,
4175 snd_soc_component_update_bits(component, RT5665_I2S3_SDP,
4179 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id);
4183 snd_soc_component_update_bits(component, reg_clk, mask_clk, val_clk);
4184 snd_soc_component_update_bits(component, RT5665_STO1_DAC_SIL_DET, 0x3700, val_bits);
4188 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1,
4193 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1,
4198 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_1,
4205 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1,
4209 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1,
4218 struct snd_soc_component *component = dai->component;
4219 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4263 snd_soc_component_update_bits(component, RT5665_I2S1_SDP,
4269 snd_soc_component_update_bits(component, RT5665_I2S2_SDP,
4274 snd_soc_component_update_bits(component, RT5665_I2S3_SDP,
4279 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id);
4285 static int rt5665_set_component_sysclk(struct snd_soc_component *component, int clk_id,
4288 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4308 dev_err(component->dev, "Invalid clock id (%d)\n", clk_id);
4311 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4315 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1,
4319 snd_soc_component_update_bits(component, RT5665_I2S_M_CLK_CTRL_1,
4326 dev_dbg(component->dev, "Sysclk is %dHz and clock id is %d\n", freq, clk_id);
4331 static int rt5665_set_component_pll(struct snd_soc_component *component, int pll_id,
4335 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4344 dev_dbg(component->dev, "PLL disabled\n");
4348 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4355 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4359 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4363 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4367 snd_soc_component_update_bits(component, RT5665_GLB_CLK,
4371 dev_err(component->dev, "Unknown PLL Source %d\n", source);
4377 dev_err(component->dev, "Unsupport input clock %d\n", freq_in);
4381 dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n",
4385 snd_soc_component_write(component, RT5665_PLL_CTRL_1,
4387 snd_soc_component_write(component, RT5665_PLL_CTRL_2,
4400 struct snd_soc_component *component = dai->component;
4401 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4403 dev_dbg(component->dev, "%s ratio=%d\n", __func__, ratio);
4411 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_2,
4416 snd_soc_component_update_bits(component, RT5665_ADDA_CLK_2,
4426 static int rt5665_set_bias_level(struct snd_soc_component *component,
4429 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4459 static int rt5665_probe(struct snd_soc_component *component)
4461 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4463 rt5665->component = component;
4470 static void rt5665_remove(struct snd_soc_component *component)
4472 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4480 static int rt5665_suspend(struct snd_soc_component *component)
4482 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4489 static int rt5665_resume(struct snd_soc_component *component)
4491 struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
4754 while (!rt5665->component->card->instantiated) {