Lines Matching full:comp

1642 	struct snd_soc_component *comp = dai->component;  in wcd9335_set_prim_interpolator_rate()  local
1643 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_set_prim_interpolator_rate()
1656 cfg0 = snd_soc_component_read(comp, in wcd9335_set_prim_interpolator_rate()
1658 cfg1 = snd_soc_component_read(comp, in wcd9335_set_prim_interpolator_rate()
1675 snd_soc_component_update_bits(comp, in wcd9335_set_prim_interpolator_rate()
1793 struct snd_soc_component *comp = dai->component; in wcd9335_set_decimator_rate() local
1794 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_set_decimator_rate()
1830 tx_mux_sel = snd_soc_component_read(comp, tx_port_reg) & in wcd9335_set_decimator_rate()
1849 snd_soc_component_update_bits(comp, in wcd9335_set_decimator_rate()
2179 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; in wcd9335_get_compander() local
2182 ucontrol->value.integer.value[0] = wcd->comp_enabled[comp]; in wcd9335_get_compander()
2191 int comp = ((struct soc_mixer_control *) kc->private_value)->shift; in wcd9335_set_compander() local
2195 wcd->comp_enabled[comp] = value; in wcd9335_set_compander()
2200 switch (comp) { in wcd9335_set_compander()
2568 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in __wcd9335_codec_enable_micbias() local
2589 wcd9335_micbias_control(comp, micb_num, MICB_ENABLE, true); in __wcd9335_codec_enable_micbias()
2596 wcd9335_micbias_control(comp, micb_num, MICB_DISABLE, true); in __wcd9335_codec_enable_micbias()
2609 static void wcd9335_codec_set_tx_hold(struct snd_soc_component *comp, in wcd9335_codec_set_tx_hold() argument
2624 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC2, mask, in wcd9335_codec_set_tx_hold()
2629 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC4, mask, in wcd9335_codec_set_tx_hold()
2634 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC6, mask, in wcd9335_codec_set_tx_hold()
2638 dev_err(comp->dev, "%s: invalid amic: %d\n", in wcd9335_codec_set_tx_hold()
2647 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_adc() local
2651 wcd9335_codec_set_tx_hold(comp, w->reg, true); in wcd9335_codec_enable_adc()
2660 static int wcd9335_codec_find_amic_input(struct snd_soc_component *comp, in wcd9335_codec_find_amic_input() argument
2673 mux_sel = snd_soc_component_read(comp, reg) & 0x3; in wcd9335_codec_find_amic_input()
2677 mux_sel = snd_soc_component_read(comp, reg) >> 6; in wcd9335_codec_find_amic_input()
2683 return snd_soc_component_read(comp, mreg) & 0x07; in wcd9335_codec_find_amic_input()
2686 static u16 wcd9335_codec_get_amic_pwlvl_reg(struct snd_soc_component *comp, in wcd9335_codec_get_amic_pwlvl_reg() argument
2707 dev_err(comp->dev, "invalid amic: %d\n", amic); in wcd9335_codec_get_amic_pwlvl_reg()
2717 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dec() local
2735 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2744 dev_err(comp->dev, "%s: decimator index not found\n", in wcd9335_codec_enable_dec()
2752 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2765 amic_n = wcd9335_codec_find_amic_input(comp, decimator); in wcd9335_codec_enable_dec()
2767 pwr_level_reg = wcd9335_codec_get_amic_pwlvl_reg(comp, in wcd9335_codec_enable_dec()
2771 switch ((snd_soc_component_read(comp, pwr_level_reg) & in wcd9335_codec_enable_dec()
2775 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2781 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2787 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2793 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2797 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2801 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2804 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x08); in wcd9335_codec_enable_dec()
2807 snd_soc_component_update_bits(comp, hpf_gate_reg, 0x01, 0x00); in wcd9335_codec_enable_dec()
2810 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2812 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2814 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2816 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2820 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd9335_codec_enable_dec()
2822 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2824 snd_soc_component_write(comp, tx_gain_ctl_reg, in wcd9335_codec_enable_dec()
2825 snd_soc_component_read(comp, tx_gain_ctl_reg)); in wcd9335_codec_enable_dec()
2828 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2830 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x10); in wcd9335_codec_enable_dec()
2831 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x00); in wcd9335_codec_enable_dec()
2833 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2839 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x00); in wcd9335_codec_enable_dec()
2904 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dmic() local
2905 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_dmic()
2916 dev_err(comp->dev, "%s: widget not found\n", __func__); in wcd9335_codec_enable_dmic()
2922 dev_err(comp->dev, "%s: Invalid DMIC line on the codec\n", in wcd9335_codec_enable_dmic()
2944 dev_err(comp->dev, "%s: Invalid DMIC Selection\n", in wcd9335_codec_enable_dmic()
2952 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2958 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2961 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2968 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2973 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2975 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
3014 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_slim() local
3015 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_slim()
3020 wcd9335_codec_enable_int_port(dai, comp); in wcd9335_codec_enable_slim()
3034 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mix_path() local
3068 dev_err(comp->dev, "%s: No gain register avail for %s\n", in wcd9335_codec_enable_mix_path()
3075 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_mix_path()
3077 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_mix_path()
3182 struct snd_soc_component *comp, in wcd9335_codec_enable_prim_interpolator() argument
3185 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_prim_interpolator()
3193 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3196 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3197 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3203 ((snd_soc_component_read(comp, prim_int_reg)) & in wcd9335_codec_enable_prim_interpolator()
3205 snd_soc_component_update_bits(comp, reg, in wcd9335_codec_enable_prim_interpolator()
3212 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3215 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3218 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3221 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3233 int comp; in wcd9335_config_compander() local
3240 comp = interp_n - 1; in wcd9335_config_compander()
3241 if (!wcd->comp_enabled[comp]) in wcd9335_config_compander()
3244 comp_ctl0_reg = WCD9335_CDC_COMPANDER1_CTL(comp); in wcd9335_config_compander()
3245 rx_path_cfg0_reg = WCD9335_CDC_RX1_RX_PATH_CFG(comp); in wcd9335_config_compander()
3293 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_interpolator() local
3327 dev_err(comp->dev, "%s: Interpolator reg not found\n", in wcd9335_codec_enable_interpolator()
3335 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3338 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3339 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_interpolator()
3341 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_interpolator()
3344 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3345 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3388 static void wcd9335_codec_hph_lohifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lohifi_config() argument
3392 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3395 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lohifi_config()
3398 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3401 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3404 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lohifi_config()
3407 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_lohifi_config()
3411 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3414 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3417 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDACBUFF_CNP2, in wcd9335_codec_hph_lohifi_config()
3419 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3425 static void wcd9335_codec_hph_lp_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lp_config() argument
3429 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lp_config()
3432 wcd9335_codec_hph_mode_gain_opt(comp, 0x10); in wcd9335_codec_hph_lp_config()
3433 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3436 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3439 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3442 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3445 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3448 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3451 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3453 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3458 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDAC_LDO, in wcd9335_codec_hph_lp_config()
3460 snd_soc_component_write(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3462 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3465 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3468 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3471 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3474 snd_soc_component_update_bits(comp, WCD9335_HPH_R_EN, in wcd9335_codec_hph_lp_config()
3477 snd_soc_component_update_bits(comp, WCD9335_HPH_L_EN, in wcd9335_codec_hph_lp_config()
3483 static void wcd9335_codec_hph_hifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_hifi_config() argument
3487 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3490 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3493 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_hifi_config()
3496 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_hifi_config()
3500 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3503 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3529 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphl_dac_event() local
3530 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphl_dac_event()
3537 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphl_dac_event()
3541 dev_err(comp->dev, "Incorrect DEM Input\n"); in wcd9335_codec_hphl_dac_event()
3549 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3563 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3578 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_lineout_dac_event() local
3579 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_lineout_dac_event()
3598 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_ear_dac_event() local
3599 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_ear_dac_event()
3680 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphr_dac_event() local
3681 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphr_dac_event()
3689 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphr_dac_event()
3694 dev_err(comp->dev, "DEM Input not set correctly, hph_mode: %d\n", in wcd9335_codec_hphr_dac_event()
3705 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3714 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3729 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphl_pa() local
3730 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphl_pa()
3744 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3750 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphl_pa()
3753 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3777 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_lineout_pa() local
3797 dev_err(comp->dev, "Error enabling lineout PA\n"); in wcd9335_codec_enable_lineout_pa()
3807 snd_soc_component_update_bits(comp, vol_reg, in wcd9335_codec_enable_lineout_pa()
3812 if ((snd_soc_component_read(comp, mix_vol_reg)) & in wcd9335_codec_enable_lineout_pa()
3814 snd_soc_component_update_bits(comp, mix_vol_reg, in wcd9335_codec_enable_lineout_pa()
3848 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_rx_bias() local
3849 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_rx_bias()
3855 wcd9335_codec_init_flyback(comp); in wcd9335_codec_enable_rx_bias()
3856 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3865 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3878 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphr_pa() local
3879 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphr_pa()
3892 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3897 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphr_pa()
3900 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3924 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_ear_pa() local
3932 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
3937 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_ear_pa()
3940 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
4084 struct snd_soc_component *comp = wcd->component; in wcd9335_cdc_sido_ccl_enable() local
4088 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4096 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4247 struct snd_soc_component *comp = wcd->component; in wcd9335_codec_apply_sido_voltage() local
4256 snd_soc_component_write(comp, WCD9335_ANA_BUCK_VOUT_D, vout_d_val); in wcd9335_codec_apply_sido_voltage()
4257 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4264 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4313 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mclk() local
4317 return _wcd9335_codec_enable_mclk(comp, true); in wcd9335_codec_enable_mclk()
4319 return _wcd9335_codec_enable_mclk(comp, false); in wcd9335_codec_enable_mclk()
4800 static int wcd9335_enable_efuse_sensing(struct snd_soc_component *comp) in wcd9335_enable_efuse_sensing() argument
4802 _wcd9335_codec_enable_mclk(comp, true); in wcd9335_enable_efuse_sensing()
4803 snd_soc_component_update_bits(comp, in wcd9335_enable_efuse_sensing()
4813 if (!(snd_soc_component_read(comp, in wcd9335_enable_efuse_sensing()
4818 wcd9335_enable_sido_buck(comp); in wcd9335_enable_efuse_sensing()
4819 _wcd9335_codec_enable_mclk(comp, false); in wcd9335_enable_efuse_sensing()
4878 static void wcd9335_codec_remove(struct snd_soc_component *comp) in wcd9335_codec_remove() argument
4880 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_remove()
4886 static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, in wcd9335_codec_set_sysclk() argument
4890 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_set_sysclk()
4895 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()
4900 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()