Lines Matching full: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()
2576 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in __wcd9335_codec_enable_micbias() local
2597 wcd9335_micbias_control(comp, micb_num, MICB_ENABLE, true); in __wcd9335_codec_enable_micbias()
2604 wcd9335_micbias_control(comp, micb_num, MICB_DISABLE, true); in __wcd9335_codec_enable_micbias()
2617 static void wcd9335_codec_set_tx_hold(struct snd_soc_component *comp, in wcd9335_codec_set_tx_hold() argument
2632 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC2, mask, in wcd9335_codec_set_tx_hold()
2637 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC4, mask, in wcd9335_codec_set_tx_hold()
2642 snd_soc_component_update_bits(comp, WCD9335_ANA_AMIC6, mask, in wcd9335_codec_set_tx_hold()
2646 dev_err(comp->dev, "%s: invalid amic: %d\n", in wcd9335_codec_set_tx_hold()
2655 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_adc() local
2659 wcd9335_codec_set_tx_hold(comp, w->reg, true); in wcd9335_codec_enable_adc()
2668 static int wcd9335_codec_find_amic_input(struct snd_soc_component *comp, in wcd9335_codec_find_amic_input() argument
2681 mux_sel = snd_soc_component_read(comp, reg) & 0x3; in wcd9335_codec_find_amic_input()
2685 mux_sel = snd_soc_component_read(comp, reg) >> 6; in wcd9335_codec_find_amic_input()
2691 return snd_soc_component_read(comp, mreg) & 0x07; in wcd9335_codec_find_amic_input()
2694 static u16 wcd9335_codec_get_amic_pwlvl_reg(struct snd_soc_component *comp, in wcd9335_codec_get_amic_pwlvl_reg() argument
2715 dev_err(comp->dev, "invalid amic: %d\n", amic); in wcd9335_codec_get_amic_pwlvl_reg()
2725 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dec() local
2743 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2752 dev_err(comp->dev, "%s: decimator index not found\n", in wcd9335_codec_enable_dec()
2760 dev_err(comp->dev, "%s: Invalid decimator = %s\n", in wcd9335_codec_enable_dec()
2773 amic_n = wcd9335_codec_find_amic_input(comp, decimator); in wcd9335_codec_enable_dec()
2775 pwr_level_reg = wcd9335_codec_get_amic_pwlvl_reg(comp, in wcd9335_codec_enable_dec()
2779 switch ((snd_soc_component_read(comp, pwr_level_reg) & in wcd9335_codec_enable_dec()
2783 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2789 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2795 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2801 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2805 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2809 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2812 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x08); in wcd9335_codec_enable_dec()
2815 snd_soc_component_update_bits(comp, hpf_gate_reg, 0x01, 0x00); in wcd9335_codec_enable_dec()
2818 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2820 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2822 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2824 snd_soc_component_write(comp, in wcd9335_codec_enable_dec()
2828 snd_soc_component_update_bits(comp, hpf_gate_reg, in wcd9335_codec_enable_dec()
2830 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, in wcd9335_codec_enable_dec()
2832 snd_soc_component_write(comp, tx_gain_ctl_reg, in wcd9335_codec_enable_dec()
2833 snd_soc_component_read(comp, tx_gain_ctl_reg)); in wcd9335_codec_enable_dec()
2836 hpf_coff_freq = (snd_soc_component_read(comp, dec_cfg_reg) & in wcd9335_codec_enable_dec()
2838 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x10); in wcd9335_codec_enable_dec()
2839 snd_soc_component_update_bits(comp, dec_cfg_reg, 0x08, 0x00); in wcd9335_codec_enable_dec()
2841 snd_soc_component_update_bits(comp, dec_cfg_reg, in wcd9335_codec_enable_dec()
2847 snd_soc_component_update_bits(comp, tx_vol_ctl_reg, 0x10, 0x00); in wcd9335_codec_enable_dec()
2912 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_dmic() local
2913 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_dmic()
2924 dev_err(comp->dev, "%s: widget not found\n", __func__); in wcd9335_codec_enable_dmic()
2930 dev_err(comp->dev, "%s: Invalid DMIC line on the codec\n", in wcd9335_codec_enable_dmic()
2952 dev_err(comp->dev, "%s: Invalid DMIC Selection\n", in wcd9335_codec_enable_dmic()
2960 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2966 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2969 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2976 wcd9335_get_dmic_clk_val(comp, in wcd9335_codec_enable_dmic()
2981 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
2983 snd_soc_component_update_bits(comp, dmic_clk_reg, in wcd9335_codec_enable_dmic()
3022 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_slim() local
3023 struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd9335_codec_enable_slim()
3028 wcd9335_codec_enable_int_port(dai, comp); in wcd9335_codec_enable_slim()
3042 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mix_path() local
3076 dev_err(comp->dev, "%s: No gain register avail for %s\n", in wcd9335_codec_enable_mix_path()
3083 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_mix_path()
3085 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_mix_path()
3190 struct snd_soc_component *comp, in wcd9335_codec_enable_prim_interpolator() argument
3193 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_prim_interpolator()
3201 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3204 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3205 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3211 ((snd_soc_component_read(comp, prim_int_reg)) & in wcd9335_codec_enable_prim_interpolator()
3213 snd_soc_component_update_bits(comp, reg, in wcd9335_codec_enable_prim_interpolator()
3220 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3223 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3226 snd_soc_component_update_bits(comp, prim_int_reg, in wcd9335_codec_enable_prim_interpolator()
3229 wcd9335_codec_hd2_control(comp, prim_int_reg, event); in wcd9335_codec_enable_prim_interpolator()
3241 int comp; in wcd9335_config_compander() local
3248 comp = interp_n - 1; in wcd9335_config_compander()
3249 if (!wcd->comp_enabled[comp]) in wcd9335_config_compander()
3252 comp_ctl0_reg = WCD9335_CDC_COMPANDER1_CTL(comp); in wcd9335_config_compander()
3253 rx_path_cfg0_reg = WCD9335_CDC_RX1_RX_PATH_CFG(comp); in wcd9335_config_compander()
3301 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_interpolator() local
3335 dev_err(comp->dev, "%s: Interpolator reg not found\n", in wcd9335_codec_enable_interpolator()
3343 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3346 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3347 val = snd_soc_component_read(comp, gain_reg); in wcd9335_codec_enable_interpolator()
3349 snd_soc_component_write(comp, gain_reg, val); in wcd9335_codec_enable_interpolator()
3352 wcd9335_config_compander(comp, w->shift, event); in wcd9335_codec_enable_interpolator()
3353 wcd9335_codec_enable_prim_interpolator(comp, reg, event); in wcd9335_codec_enable_interpolator()
3396 static void wcd9335_codec_hph_lohifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lohifi_config() argument
3400 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3403 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lohifi_config()
3406 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3409 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3412 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lohifi_config()
3415 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_lohifi_config()
3419 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lohifi_config()
3422 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lohifi_config()
3425 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDACBUFF_CNP2, in wcd9335_codec_hph_lohifi_config()
3427 snd_soc_component_update_bits(comp, WCD9335_RX_BIAS_HPH_PA, in wcd9335_codec_hph_lohifi_config()
3433 static void wcd9335_codec_hph_lp_config(struct snd_soc_component *comp, in wcd9335_codec_hph_lp_config() argument
3437 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_lp_config()
3440 wcd9335_codec_hph_mode_gain_opt(comp, 0x10); in wcd9335_codec_hph_lp_config()
3441 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3444 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3447 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3450 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3453 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3456 snd_soc_component_update_bits(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3459 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3461 snd_soc_component_update_bits(comp, in wcd9335_codec_hph_lp_config()
3466 snd_soc_component_write(comp, WCD9335_RX_BIAS_HPH_RDAC_LDO, in wcd9335_codec_hph_lp_config()
3468 snd_soc_component_write(comp, WCD9335_HPH_RDAC_LDO_CTL, in wcd9335_codec_hph_lp_config()
3470 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3473 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3476 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_lp_config()
3479 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_lp_config()
3482 snd_soc_component_update_bits(comp, WCD9335_HPH_R_EN, in wcd9335_codec_hph_lp_config()
3485 snd_soc_component_update_bits(comp, WCD9335_HPH_L_EN, in wcd9335_codec_hph_lp_config()
3491 static void wcd9335_codec_hph_hifi_config(struct snd_soc_component *comp, in wcd9335_codec_hph_hifi_config() argument
3495 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3498 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3501 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL1, in wcd9335_codec_hph_hifi_config()
3504 wcd9335_codec_hph_mode_gain_opt(comp, 0x11); in wcd9335_codec_hph_hifi_config()
3508 snd_soc_component_update_bits(comp, WCD9335_HPH_PA_CTL2, in wcd9335_codec_hph_hifi_config()
3511 snd_soc_component_update_bits(comp, WCD9335_HPH_CNP_WG_CTL, in wcd9335_codec_hph_hifi_config()
3537 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphl_dac_event() local
3538 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphl_dac_event()
3545 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphl_dac_event()
3549 dev_err(comp->dev, "Incorrect DEM Input\n"); in wcd9335_codec_hphl_dac_event()
3557 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3571 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphl_dac_event()
3586 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_lineout_dac_event() local
3587 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_lineout_dac_event()
3606 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_ear_dac_event() local
3607 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_ear_dac_event()
3688 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_hphr_dac_event() local
3689 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_hphr_dac_event()
3697 dem_inp = snd_soc_component_read(comp, in wcd9335_codec_hphr_dac_event()
3702 dev_err(comp->dev, "DEM Input not set correctly, hph_mode: %d\n", in wcd9335_codec_hphr_dac_event()
3713 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3722 wcd9335_codec_hph_mode_config(comp, event, hph_mode); in wcd9335_codec_hphr_dac_event()
3737 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphl_pa() local
3738 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphl_pa()
3752 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3758 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphl_pa()
3761 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphl_pa()
3785 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_lineout_pa() local
3805 dev_err(comp->dev, "Error enabling lineout PA\n"); in wcd9335_codec_enable_lineout_pa()
3815 snd_soc_component_update_bits(comp, vol_reg, in wcd9335_codec_enable_lineout_pa()
3820 if ((snd_soc_component_read(comp, mix_vol_reg)) & in wcd9335_codec_enable_lineout_pa()
3822 snd_soc_component_update_bits(comp, mix_vol_reg, in wcd9335_codec_enable_lineout_pa()
3856 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_rx_bias() local
3857 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_rx_bias()
3863 wcd9335_codec_init_flyback(comp); in wcd9335_codec_enable_rx_bias()
3864 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3873 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_rx_bias()
3886 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_hphr_pa() local
3887 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_enable_hphr_pa()
3900 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3905 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_hphr_pa()
3908 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_hphr_pa()
3932 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_ear_pa() local
3940 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
3945 if ((snd_soc_component_read(comp, in wcd9335_codec_enable_ear_pa()
3948 snd_soc_component_update_bits(comp, in wcd9335_codec_enable_ear_pa()
4092 struct snd_soc_component *comp = wcd->component; in wcd9335_cdc_sido_ccl_enable() local
4096 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4104 snd_soc_component_write(comp, WCD9335_SIDO_SIDO_CCL_10, in wcd9335_cdc_sido_ccl_enable()
4255 struct snd_soc_component *comp = wcd->component; in wcd9335_codec_apply_sido_voltage() local
4264 snd_soc_component_write(comp, WCD9335_ANA_BUCK_VOUT_D, vout_d_val); in wcd9335_codec_apply_sido_voltage()
4265 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4272 snd_soc_component_update_bits(comp, WCD9335_ANA_BUCK_CTL, in wcd9335_codec_apply_sido_voltage()
4321 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in wcd9335_codec_enable_mclk() local
4325 return _wcd9335_codec_enable_mclk(comp, true); in wcd9335_codec_enable_mclk()
4327 return _wcd9335_codec_enable_mclk(comp, false); in wcd9335_codec_enable_mclk()
4808 static int wcd9335_enable_efuse_sensing(struct snd_soc_component *comp) in wcd9335_enable_efuse_sensing() argument
4810 _wcd9335_codec_enable_mclk(comp, true); in wcd9335_enable_efuse_sensing()
4811 snd_soc_component_update_bits(comp, in wcd9335_enable_efuse_sensing()
4821 if (!(snd_soc_component_read(comp, in wcd9335_enable_efuse_sensing()
4826 wcd9335_enable_sido_buck(comp); in wcd9335_enable_efuse_sensing()
4827 _wcd9335_codec_enable_mclk(comp, false); in wcd9335_enable_efuse_sensing()
4886 static void wcd9335_codec_remove(struct snd_soc_component *comp) in wcd9335_codec_remove() argument
4888 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_remove()
4894 static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, in wcd9335_codec_set_sysclk() argument
4898 struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); in wcd9335_codec_set_sysclk()
4903 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()
4908 snd_soc_component_update_bits(comp, in wcd9335_codec_set_sysclk()