Lines Matching refs:comp
1639 struct snd_soc_component *comp = dai->component; in wcd9335_set_prim_interpolator_rate() local
1640 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_set_prim_interpolator_rate()
1653 cfg0 = snd_soc_component_read(comp, in wcd9335_set_prim_interpolator_rate()
1655 cfg1 = snd_soc_component_read(comp, in wcd9335_set_prim_interpolator_rate()
1672 snd_soc_component_update_bits(comp, in wcd9335_set_prim_interpolator_rate()
1790 struct snd_soc_component *comp = dai->component; in wcd9335_set_decimator_rate() local
1791 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_set_decimator_rate()
1829 tx_mux_sel = snd_soc_component_read(comp, tx_port_reg) & in wcd9335_set_decimator_rate()
1848 snd_soc_component_update_bits(comp, in wcd9335_set_decimator_rate()
2178 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; in wcd9335_get_compander() local
2181 ucontrol->value.integer.value[0] = wcd->comp_enabled[comp]; in wcd9335_get_compander()
2190 int comp = ((struct soc_mixer_control *) kc->private_value)->shift; in wcd9335_set_compander() local
2194 wcd->comp_enabled[comp] = value; in wcd9335_set_compander()
2199 switch (comp) { in wcd9335_set_compander()
2567 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in __wcd9335_codec_enable_micbias() local
2588 wcd9335_micbias_control(comp, micb_num, MICB_ENABLE, true); in __wcd9335_codec_enable_micbias()
2595 wcd9335_micbias_control(comp, micb_num, MICB_DISABLE, true); in __wcd9335_codec_enable_micbias()
2608 static void wcd9335_codec_set_tx_hold(struct snd_soc_component *comp, in wcd9335_codec_set_tx_hold() argument
2623 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC2, mask, in wcd9335_codec_set_tx_hold()
2628 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC4, mask, in wcd9335_codec_set_tx_hold()
2633 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC6, mask, in wcd9335_codec_set_tx_hold()
2637 dev_err(comp->dev, "%s: invalid amic: %d\n", in wcd9335_codec_set_tx_hold()
2646 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_adc() local
2650 wcd9335_codec_set_tx_hold(comp, w->reg, true); in wcd9335_codec_enable_adc()
2659 static int wcd9335_codec_find_amic_input(struct snd_soc_component *comp, in wcd9335_codec_find_amic_input() argument
2672 mux_sel = snd_soc_component_read(comp, reg) & 0x3; in wcd9335_codec_find_amic_input()
2676 mux_sel = snd_soc_component_read(comp, reg) >> 6; in wcd9335_codec_find_amic_input()
2682 return snd_soc_component_read(comp, mreg) & 0x07; in wcd9335_codec_find_amic_input()
2685 static u16 wcd9335_codec_get_amic_pwlvl_reg(struct snd_soc_component *comp, in wcd9335_codec_get_amic_pwlvl_reg() argument
2706 dev_err(comp->dev, "invalid amic: %d\n", amic); in wcd9335_codec_get_amic_pwlvl_reg()
2716 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dec() local
2734 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2743 dev_err(comp->dev, "%s: decimator index not found\n", in wcd9335_codec_enable_dec()
2751 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2764 amic_n = wcd9335_codec_find_amic_input(comp, decimator); in wcd9335_codec_enable_dec()
2766 pwr_level_reg = wcd9335_codec_get_amic_pwlvl_reg(comp, in wcd9335_codec_enable_dec()
2770 switch ((snd_soc_component_read(comp, pwr_level_reg) & in wcd9335_codec_enable_dec()
2774 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2780 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2786 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2792 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2796 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2800 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2803 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x08); in wcd9335_codec_enable_dec()
2806 snd_soc_component_update_bits(comp, hpf_gate_reg, 0x01, 0x00); in wcd9335_codec_enable_dec()
2809 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2811 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2813 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2815 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2819 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd9335_codec_enable_dec()
2821 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2823 snd_soc_component_write(comp, tx_gain_ctl_reg, in wcd9335_codec_enable_dec()
2824 snd_soc_component_read(comp, tx_gain_ctl_reg)); in wcd9335_codec_enable_dec()
2827 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2829 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x10); in wcd9335_codec_enable_dec()
2830 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x00); in wcd9335_codec_enable_dec()
2832 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2838 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x00); in wcd9335_codec_enable_dec()
2903 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dmic() local
2904 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_dmic()
2915 dev_err(comp->dev, "%s: widget not found\n", __func__); in wcd9335_codec_enable_dmic()
2921 dev_err(comp->dev, "%s: Invalid DMIC line on the codec\n", in wcd9335_codec_enable_dmic()
2943 dev_err(comp->dev, "%s: Invalid DMIC Selection\n", in wcd9335_codec_enable_dmic()
2951 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2957 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2960 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2967 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2972 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2974 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
3013 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_slim() local
3014 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_slim()
3019 wcd9335_codec_enable_int_port(dai, comp); in wcd9335_codec_enable_slim()
3033 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mix_path() local
3067 dev_err(comp->dev, "%s: No gain register avail for %s\n", in wcd9335_codec_enable_mix_path()
3074 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_mix_path()
3076 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_mix_path()
3181 struct snd_soc_component *comp, in wcd9335_codec_enable_prim_interpolator() argument
3184 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_prim_interpolator()
3192 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3195 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3196 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3202 ((snd_soc_component_read(comp, prim_int_reg)) & in wcd9335_codec_enable_prim_interpolator()
3204 snd_soc_component_update_bits(comp, reg, in wcd9335_codec_enable_prim_interpolator()
3211 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3214 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3217 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3220 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3232 int comp; in wcd9335_config_compander() local
3239 comp = interp_n - 1; in wcd9335_config_compander()
3240 if (!wcd->comp_enabled[comp]) in wcd9335_config_compander()
3243 comp_ctl0_reg = WCD9335_CDC_COMPANDER1_CTL(comp); in wcd9335_config_compander()
3244 rx_path_cfg0_reg = WCD9335_CDC_RX1_RX_PATH_CFG(comp); in wcd9335_config_compander()
3292 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_interpolator() local
3326 dev_err(comp->dev, "%s: Interpolator reg not found\n", in wcd9335_codec_enable_interpolator()
3334 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3337 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3338 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_interpolator()
3340 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_interpolator()
3343 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3344 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3387 static void wcd9335_codec_hph_lohifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lohifi_config() argument
3391 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3394 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lohifi_config()
3397 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3400 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3403 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lohifi_config()
3406 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_lohifi_config()
3410 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3413 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3416 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDACBUFF_CNP2, in wcd9335_codec_hph_lohifi_config()
3418 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3424 static void wcd9335_codec_hph_lp_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lp_config() argument
3428 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lp_config()
3431 wcd9335_codec_hph_mode_gain_opt(comp, 0x10); in wcd9335_codec_hph_lp_config()
3432 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3435 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3438 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3441 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3444 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3447 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3450 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3452 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3457 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDAC_LDO, in wcd9335_codec_hph_lp_config()
3459 snd_soc_component_write(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3461 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3464 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3467 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3470 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3473 snd_soc_component_update_bits(comp, WCD9335_HPH_R_EN, in wcd9335_codec_hph_lp_config()
3476 snd_soc_component_update_bits(comp, WCD9335_HPH_L_EN, in wcd9335_codec_hph_lp_config()
3482 static void wcd9335_codec_hph_hifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_hifi_config() argument
3486 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3489 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3492 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_hifi_config()
3495 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_hifi_config()
3499 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3502 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3528 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphl_dac_event() local
3529 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphl_dac_event()
3536 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphl_dac_event()
3540 dev_err(comp->dev, "Incorrect DEM Input\n"); in wcd9335_codec_hphl_dac_event()
3548 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3562 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3577 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_lineout_dac_event() local
3578 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_lineout_dac_event()
3597 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_ear_dac_event() local
3598 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_ear_dac_event()
3679 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphr_dac_event() local
3680 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphr_dac_event()
3688 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphr_dac_event()
3693 dev_err(comp->dev, "DEM Input not set correctly, hph_mode: %d\n", in wcd9335_codec_hphr_dac_event()
3704 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3713 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3728 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphl_pa() local
3729 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphl_pa()
3743 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3749 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphl_pa()
3752 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3776 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_lineout_pa() local
3796 dev_err(comp->dev, "Error enabling lineout PA\n"); in wcd9335_codec_enable_lineout_pa()
3806 snd_soc_component_update_bits(comp, vol_reg, in wcd9335_codec_enable_lineout_pa()
3811 if ((snd_soc_component_read(comp, mix_vol_reg)) & in wcd9335_codec_enable_lineout_pa()
3813 snd_soc_component_update_bits(comp, mix_vol_reg, in wcd9335_codec_enable_lineout_pa()
3847 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_rx_bias() local
3848 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_rx_bias()
3854 wcd9335_codec_init_flyback(comp); in wcd9335_codec_enable_rx_bias()
3855 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3864 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3877 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphr_pa() local
3878 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphr_pa()
3891 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3896 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphr_pa()
3899 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3923 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_ear_pa() local
3931 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
3936 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_ear_pa()
3939 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
4083 struct snd_soc_component *comp = wcd->component; in wcd9335_cdc_sido_ccl_enable() local
4087 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4095 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4246 struct snd_soc_component *comp = wcd->component; in wcd9335_codec_apply_sido_voltage() local
4255 snd_soc_component_write(comp, WCD9335_ANA_BUCK_VOUT_D, vout_d_val); in wcd9335_codec_apply_sido_voltage()
4256 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4263 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4312 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mclk() local
4316 return _wcd9335_codec_enable_mclk(comp, true); in wcd9335_codec_enable_mclk()
4318 return _wcd9335_codec_enable_mclk(comp, false); in wcd9335_codec_enable_mclk()
4799 static int wcd9335_enable_efuse_sensing(struct snd_soc_component *comp) in wcd9335_enable_efuse_sensing() argument
4801 _wcd9335_codec_enable_mclk(comp, true); in wcd9335_enable_efuse_sensing()
4802 snd_soc_component_update_bits(comp, in wcd9335_enable_efuse_sensing()
4812 if (!(snd_soc_component_read(comp, in wcd9335_enable_efuse_sensing()
4817 wcd9335_enable_sido_buck(comp); in wcd9335_enable_efuse_sensing()
4818 _wcd9335_codec_enable_mclk(comp, false); in wcd9335_enable_efuse_sensing()
4877 static void wcd9335_codec_remove(struct snd_soc_component *comp) in wcd9335_codec_remove() argument
4879 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_remove()
4885 static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, in wcd9335_codec_set_sysclk() argument
4889 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_set_sysclk()
4894 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()
4899 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()