Lines Matching refs:comp
1342 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_mclk() local
1343 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_enable_mclk()
1449 struct snd_soc_component *comp = dai->component; in wcd934x_set_prim_interpolator_rate() local
1450 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_set_prim_interpolator_rate()
1467 cfg0 = snd_soc_component_read(comp, in wcd934x_set_prim_interpolator_rate()
1469 cfg1 = snd_soc_component_read(comp, in wcd934x_set_prim_interpolator_rate()
1492 snd_soc_component_update_bits(comp, in wcd934x_set_prim_interpolator_rate()
1577 struct snd_soc_component *comp = dai->component; in wcd934x_set_decimator_rate() local
1578 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd934x_set_decimator_rate()
1619 tx_mux_sel = snd_soc_component_read(comp, tx_port_reg) & in wcd934x_set_decimator_rate()
1646 snd_soc_component_update_bits(comp, in wcd934x_set_decimator_rate()
2145 static int wcd934x_init_dmic(struct snd_soc_component *comp) in wcd934x_init_dmic() argument
2148 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_init_dmic()
2151 vout_ctl_1 = wcd934x_get_micbias_val(comp->dev, in wcd934x_init_dmic()
2153 vout_ctl_2 = wcd934x_get_micbias_val(comp->dev, in wcd934x_init_dmic()
2155 vout_ctl_3 = wcd934x_get_micbias_val(comp->dev, in wcd934x_init_dmic()
2157 vout_ctl_4 = wcd934x_get_micbias_val(comp->dev, in wcd934x_init_dmic()
2160 snd_soc_component_update_bits(comp, WCD934X_ANA_MICB1, in wcd934x_init_dmic()
2162 snd_soc_component_update_bits(comp, WCD934X_ANA_MICB2, in wcd934x_init_dmic()
2164 snd_soc_component_update_bits(comp, WCD934X_ANA_MICB3, in wcd934x_init_dmic()
2166 snd_soc_component_update_bits(comp, WCD934X_ANA_MICB4, in wcd934x_init_dmic()
2177 snd_soc_component_update_bits(comp, WCD934X_TEST_DEBUG_PAD_DRVCTL_0, in wcd934x_init_dmic()
2309 static void wcd934x_comp_remove(struct snd_soc_component *comp) in wcd934x_comp_remove() argument
2311 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_comp_remove()
2316 static int wcd934x_comp_set_sysclk(struct snd_soc_component *comp, in wcd934x_comp_set_sysclk() argument
2320 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_comp_set_sysclk()
2328 snd_soc_component_update_bits(comp, WCD934X_CODEC_RPM_CLK_MCLK_CFG, in wcd934x_comp_set_sysclk()
2451 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; in wcd934x_compander_get() local
2454 ucontrol->value.integer.value[0] = wcd->comp_enabled[comp]; in wcd934x_compander_get()
2464 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; in wcd934x_compander_set() local
2468 wcd->comp_enabled[comp] = value; in wcd934x_compander_set()
2473 switch (comp) { in wcd934x_compander_set()
2622 struct snd_soc_component *comp; in wcd934x_dec_enum_put() local
2628 comp = snd_soc_dapm_kcontrol_component(kcontrol); in wcd934x_dec_enum_put()
2662 dev_err(comp->dev, "%s: e->reg: 0x%x not expected\n", in wcd934x_dec_enum_put()
2670 snd_soc_component_update_bits(comp, mic_sel_reg, BIT(7), in wcd934x_dec_enum_put()
3331 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_slim() local
3332 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd934x_codec_enable_slim()
3337 wcd934x_codec_enable_int_port(dai, comp); in wcd934x_codec_enable_slim()
3382 static void wcd934x_codec_hphdelay_lutbypass(struct snd_soc_component *comp, in wcd934x_codec_hphdelay_lutbypass() argument
3402 snd_soc_component_update_bits(comp, WCD934X_CDC_CLSH_TEST0, in wcd934x_codec_hphdelay_lutbypass()
3404 snd_soc_component_update_bits(comp, hph_lut_bypass_reg, in wcd934x_codec_hphdelay_lutbypass()
3410 snd_soc_component_update_bits(comp, WCD934X_CDC_CLSH_TEST0, in wcd934x_codec_hphdelay_lutbypass()
3412 snd_soc_component_update_bits(comp, hph_lut_bypass_reg, in wcd934x_codec_hphdelay_lutbypass()
3418 static int wcd934x_config_compander(struct snd_soc_component *comp, in wcd934x_config_compander() argument
3421 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_config_compander()
3439 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3442 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3445 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3448 snd_soc_component_update_bits(comp, rx_path_cfg0_reg, in wcd934x_config_compander()
3453 snd_soc_component_update_bits(comp, rx_path_cfg0_reg, in wcd934x_config_compander()
3456 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3459 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3462 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3465 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3467 snd_soc_component_update_bits(comp, comp_ctl0_reg, in wcd934x_config_compander()
3478 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_interp_clk() local
3485 snd_soc_component_update_bits(comp, main_reg, in wcd934x_codec_enable_interp_clk()
3488 wcd934x_codec_hd2_control(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3489 wcd934x_codec_hphdelay_lutbypass(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3490 wcd934x_config_compander(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3493 wcd934x_config_compander(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3494 wcd934x_codec_hphdelay_lutbypass(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3495 wcd934x_codec_hd2_control(comp, interp_idx, event); in wcd934x_codec_enable_interp_clk()
3497 snd_soc_component_update_bits(comp, main_reg, in wcd934x_codec_enable_interp_clk()
3500 snd_soc_component_update_bits(comp, main_reg, in wcd934x_codec_enable_interp_clk()
3503 snd_soc_component_update_bits(comp, main_reg, in wcd934x_codec_enable_interp_clk()
3507 snd_soc_component_update_bits(comp, main_reg, in wcd934x_codec_enable_interp_clk()
3519 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_mix_path() local
3532 snd_soc_component_update_bits(comp, mix_reg, in wcd934x_codec_enable_mix_path()
3538 val = snd_soc_component_read(comp, gain_reg); in wcd934x_codec_enable_mix_path()
3540 snd_soc_component_write(comp, gain_reg, val); in wcd934x_codec_enable_mix_path()
3550 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_set_iir_gain() local
3556 snd_soc_component_write(comp, reg, in wcd934x_codec_set_iir_gain()
3557 snd_soc_component_read(comp, reg)); in wcd934x_codec_set_iir_gain()
3560 snd_soc_component_write(comp, reg, in wcd934x_codec_set_iir_gain()
3561 snd_soc_component_read(comp, reg)); in wcd934x_codec_set_iir_gain()
3564 snd_soc_component_write(comp, reg, in wcd934x_codec_set_iir_gain()
3565 snd_soc_component_read(comp, reg)); in wcd934x_codec_set_iir_gain()
3568 snd_soc_component_write(comp, reg, in wcd934x_codec_set_iir_gain()
3569 snd_soc_component_read(comp, reg)); in wcd934x_codec_set_iir_gain()
3572 snd_soc_component_write(comp, reg, in wcd934x_codec_set_iir_gain()
3573 snd_soc_component_read(comp, reg)); in wcd934x_codec_set_iir_gain()
3585 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_main_path() local
3593 snd_soc_component_write(comp, gain_reg, in wcd934x_codec_enable_main_path()
3594 snd_soc_component_read(comp, gain_reg)); in wcd934x_codec_enable_main_path()
3604 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_ear_dac_event() local
3605 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_ear_dac_event()
3610 snd_soc_component_update_bits(comp, in wcd934x_codec_ear_dac_event()
3630 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_hphl_dac_event() local
3631 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_hphl_dac_event()
3638 dem_inp = snd_soc_component_read(comp, in wcd934x_codec_hphl_dac_event()
3647 snd_soc_component_update_bits(comp, in wcd934x_codec_hphl_dac_event()
3652 snd_soc_component_update_bits(comp, in wcd934x_codec_hphl_dac_event()
3666 snd_soc_component_update_bits(comp, in wcd934x_codec_hphl_dac_event()
3682 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_hphr_dac_event() local
3683 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_hphr_dac_event()
3689 dem_inp = snd_soc_component_read(comp, in wcd934x_codec_hphr_dac_event()
3697 snd_soc_component_update_bits(comp, in wcd934x_codec_hphr_dac_event()
3702 snd_soc_component_update_bits(comp, in wcd934x_codec_hphr_dac_event()
3717 snd_soc_component_update_bits(comp, in wcd934x_codec_hphr_dac_event()
3731 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_lineout_dac_event() local
3732 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_lineout_dac_event()
3752 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_hphl_pa() local
3763 snd_soc_component_update_bits(comp, WCD934X_HPH_L_TEST, in wcd934x_codec_enable_hphl_pa()
3767 snd_soc_component_update_bits(comp, WCD934X_CDC_RX1_RX_PATH_CTL, in wcd934x_codec_enable_hphl_pa()
3771 snd_soc_component_update_bits(comp, WCD934X_HPH_CNP_WG_CTL, in wcd934x_codec_enable_hphl_pa()
3775 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphl_pa()
3780 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphl_pa()
3786 snd_soc_component_update_bits(comp, WCD934X_HPH_L_TEST, in wcd934x_codec_enable_hphl_pa()
3789 snd_soc_component_update_bits(comp, WCD934X_CDC_RX1_RX_PATH_CTL, in wcd934x_codec_enable_hphl_pa()
3792 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphl_pa()
3813 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_hphr_pa() local
3823 snd_soc_component_update_bits(comp, WCD934X_HPH_R_TEST, in wcd934x_codec_enable_hphr_pa()
3827 snd_soc_component_update_bits(comp, WCD934X_CDC_RX2_RX_PATH_CTL, in wcd934x_codec_enable_hphr_pa()
3831 snd_soc_component_update_bits(comp, WCD934X_HPH_CNP_WG_CTL, in wcd934x_codec_enable_hphr_pa()
3835 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphr_pa()
3840 if ((snd_soc_component_read(comp, in wcd934x_codec_enable_hphr_pa()
3842 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphr_pa()
3848 snd_soc_component_update_bits(comp, WCD934X_HPH_R_TEST, in wcd934x_codec_enable_hphr_pa()
3851 snd_soc_component_update_bits(comp, WCD934X_CDC_RX2_RX_PATH_CTL, in wcd934x_codec_enable_hphr_pa()
3854 snd_soc_component_update_bits(comp, in wcd934x_codec_enable_hphr_pa()
3871 static u32 wcd934x_get_dmic_sample_rate(struct snd_soc_component *comp, in wcd934x_get_dmic_sample_rate() argument
3892 adc_mux_sel = ((snd_soc_component_read(comp, adc_mux_ctl_reg) in wcd934x_get_dmic_sample_rate()
3905 tx_stream_fs = snd_soc_component_read(comp, tx_fs_reg) & 0x0F; in wcd934x_get_dmic_sample_rate()
3921 static u8 wcd934x_get_dmic_clk_val(struct snd_soc_component *comp, in wcd934x_get_dmic_clk_val() argument
3934 dev_err(comp->dev, in wcd934x_get_dmic_clk_val()
3961 dev_err(comp->dev, in wcd934x_get_dmic_clk_val()
3974 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_dmic() local
3975 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_enable_dmic()
3987 dev_err(comp->dev, "%s: widget not found\n", __func__); in wcd934x_codec_enable_dmic()
3993 dev_err(comp->dev, "%s: Invalid DMIC line on the codec\n", in wcd934x_codec_enable_dmic()
4015 dev_err(comp->dev, "%s: Invalid DMIC Selection\n", in wcd934x_codec_enable_dmic()
4022 dmic_sample_rate = wcd934x_get_dmic_sample_rate(comp, dmic, in wcd934x_codec_enable_dmic()
4024 dmic_rate_val = wcd934x_get_dmic_clk_val(comp, wcd->rate, in wcd934x_codec_enable_dmic()
4029 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd934x_codec_enable_dmic()
4032 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd934x_codec_enable_dmic()
4040 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd934x_codec_enable_dmic()
4048 static int wcd934x_codec_find_amic_input(struct snd_soc_component *comp, in wcd934x_codec_find_amic_input() argument
4107 is_amic = (((snd_soc_component_read(comp, adc_mux_in_reg) in wcd934x_codec_find_amic_input()
4112 return snd_soc_component_read(comp, amic_mux_sel_reg) & 0x07; in wcd934x_codec_find_amic_input()
4115 static u16 wcd934x_codec_get_amic_pwlvl_reg(struct snd_soc_component *comp, in wcd934x_codec_get_amic_pwlvl_reg() argument
4140 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_dec() local
4158 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd934x_codec_enable_dec()
4167 dev_err(comp->dev, "%s: decimator index not found\n", in wcd934x_codec_enable_dec()
4175 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd934x_codec_enable_dec()
4188 amic_n = wcd934x_codec_find_amic_input(comp, decimator); in wcd934x_codec_enable_dec()
4190 pwr_level_reg = wcd934x_codec_get_amic_pwlvl_reg(comp, in wcd934x_codec_enable_dec()
4196 switch ((snd_soc_component_read(comp, pwr_level_reg) & in wcd934x_codec_enable_dec()
4200 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4205 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4212 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4219 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd934x_codec_enable_dec()
4222 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4225 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd934x_codec_enable_dec()
4233 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd934x_codec_enable_dec()
4238 snd_soc_component_write(comp, tx_gain_ctl_reg, in wcd934x_codec_enable_dec()
4239 snd_soc_component_read(comp, in wcd934x_codec_enable_dec()
4243 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd934x_codec_enable_dec()
4247 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4250 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd934x_codec_enable_dec()
4258 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd934x_codec_enable_dec()
4264 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd934x_codec_enable_dec()
4266 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd934x_codec_enable_dec()
4276 static void wcd934x_codec_set_tx_hold(struct snd_soc_component *comp, in wcd934x_codec_set_tx_hold() argument
4291 snd_soc_component_update_bits(comp, WCD934X_ANA_AMIC2, in wcd934x_codec_set_tx_hold()
4296 snd_soc_component_update_bits(comp, WCD934X_ANA_AMIC4, in wcd934x_codec_set_tx_hold()
4307 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd934x_codec_enable_adc() local
4311 wcd934x_codec_set_tx_hold(comp, w->reg, true); in wcd934x_codec_enable_adc()