Lines Matching refs:sfc

3033 	struct tegra210_sfc *sfc = dev_get_drvdata(dev);  in tegra210_sfc_runtime_suspend()  local
3035 regcache_cache_only(sfc->regmap, true); in tegra210_sfc_runtime_suspend()
3036 regcache_mark_dirty(sfc->regmap); in tegra210_sfc_runtime_suspend()
3043 struct tegra210_sfc *sfc = dev_get_drvdata(dev); in tegra210_sfc_runtime_resume() local
3045 regcache_cache_only(sfc->regmap, false); in tegra210_sfc_runtime_resume()
3046 regcache_sync(sfc->regmap); in tegra210_sfc_runtime_resume()
3067 struct tegra210_sfc *sfc = dev_get_drvdata(cmpnt->dev); in tegra210_sfc_write_coeff_ram() local
3071 if (sfc->srate_in == sfc->srate_out) in tegra210_sfc_write_coeff_ram()
3074 coeff_ram = coef_addr_table[sfc->srate_in][sfc->srate_out]; in tegra210_sfc_write_coeff_ram()
3078 sfc->srate_in, sfc->srate_out); in tegra210_sfc_write_coeff_ram()
3083 tegra210_sfc_write_ram(sfc->regmap, coeff_ram); in tegra210_sfc_write_coeff_ram()
3085 regmap_update_bits(sfc->regmap, in tegra210_sfc_write_coeff_ram()
3093 static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc, in tegra210_sfc_set_audio_cif() argument
3125 cif_conf.stereo_conv = sfc->stereo_to_mono[path]; in tegra210_sfc_set_audio_cif()
3126 cif_conf.mono_conv = sfc->mono_to_stereo[path]; in tegra210_sfc_set_audio_cif()
3128 tegra_set_cif(sfc->regmap, reg, &cif_conf); in tegra210_sfc_set_audio_cif()
3133 static int tegra210_sfc_soft_reset(struct tegra210_sfc *sfc) in tegra210_sfc_soft_reset() argument
3143 regmap_update_bits(sfc->regmap, TEGRA210_SFC_SOFT_RESET, in tegra210_sfc_soft_reset()
3146 return regmap_read_poll_timeout(sfc->regmap, in tegra210_sfc_soft_reset()
3174 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai); in tegra210_sfc_startup() local
3177 regmap_update_bits(sfc->regmap, TEGRA210_SFC_COEF_RAM, in tegra210_sfc_startup()
3180 err = tegra210_sfc_soft_reset(sfc); in tegra210_sfc_startup()
3195 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai); in tegra210_sfc_in_hw_params() local
3200 &sfc->srate_in); in tegra210_sfc_in_hw_params()
3204 err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_RX_CIF_CTRL); in tegra210_sfc_in_hw_params()
3210 regmap_write(sfc->regmap, TEGRA210_SFC_RX_FREQ, sfc->srate_in); in tegra210_sfc_in_hw_params()
3219 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai); in tegra210_sfc_out_hw_params() local
3224 &sfc->srate_out); in tegra210_sfc_out_hw_params()
3228 err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_TX_CIF_CTRL); in tegra210_sfc_out_hw_params()
3234 regmap_write(sfc->regmap, TEGRA210_SFC_TX_FREQ, sfc->srate_out); in tegra210_sfc_out_hw_params()
3251 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_iget_stereo_to_mono() local
3253 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_RX_PATH]; in tegra210_sfc_iget_stereo_to_mono()
3262 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_iput_stereo_to_mono() local
3265 if (value == sfc->stereo_to_mono[SFC_RX_PATH]) in tegra210_sfc_iput_stereo_to_mono()
3268 sfc->stereo_to_mono[SFC_RX_PATH] = value; in tegra210_sfc_iput_stereo_to_mono()
3277 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_iget_mono_to_stereo() local
3279 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_RX_PATH]; in tegra210_sfc_iget_mono_to_stereo()
3288 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_iput_mono_to_stereo() local
3291 if (value == sfc->mono_to_stereo[SFC_RX_PATH]) in tegra210_sfc_iput_mono_to_stereo()
3294 sfc->mono_to_stereo[SFC_RX_PATH] = value; in tegra210_sfc_iput_mono_to_stereo()
3303 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_oget_stereo_to_mono() local
3305 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_TX_PATH]; in tegra210_sfc_oget_stereo_to_mono()
3314 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_oput_stereo_to_mono() local
3317 if (value == sfc->stereo_to_mono[SFC_TX_PATH]) in tegra210_sfc_oput_stereo_to_mono()
3320 sfc->stereo_to_mono[SFC_TX_PATH] = value; in tegra210_sfc_oput_stereo_to_mono()
3329 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_oget_mono_to_stereo() local
3331 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_TX_PATH]; in tegra210_sfc_oget_mono_to_stereo()
3340 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); in tegra210_sfc_oput_mono_to_stereo() local
3343 if (value == sfc->mono_to_stereo[SFC_TX_PATH]) in tegra210_sfc_oput_mono_to_stereo()
3346 sfc->mono_to_stereo[SFC_TX_PATH] = value; in tegra210_sfc_oput_mono_to_stereo()
3551 struct tegra210_sfc *sfc; in tegra210_sfc_platform_probe() local
3555 sfc = devm_kzalloc(dev, sizeof(*sfc), GFP_KERNEL); in tegra210_sfc_platform_probe()
3556 if (!sfc) in tegra210_sfc_platform_probe()
3559 dev_set_drvdata(dev, sfc); in tegra210_sfc_platform_probe()
3565 sfc->regmap = devm_regmap_init_mmio(dev, regs, in tegra210_sfc_platform_probe()
3567 if (IS_ERR(sfc->regmap)) { in tegra210_sfc_platform_probe()
3569 return PTR_ERR(sfc->regmap); in tegra210_sfc_platform_probe()
3572 regcache_cache_only(sfc->regmap, true); in tegra210_sfc_platform_probe()