Lines Matching refs:sfc

3061 	struct tegra210_sfc *sfc = dev_get_drvdata(dev);
3063 regcache_cache_only(sfc->regmap, true);
3064 regcache_mark_dirty(sfc->regmap);
3071 struct tegra210_sfc *sfc = dev_get_drvdata(dev);
3073 regcache_cache_only(sfc->regmap, false);
3074 regcache_sync(sfc->regmap);
3095 struct tegra210_sfc *sfc = dev_get_drvdata(cmpnt->dev);
3099 if (sfc->srate_in == sfc->srate_out)
3102 coeff_ram = coef_addr_table[sfc->srate_in][sfc->srate_out];
3106 sfc->srate_in, sfc->srate_out);
3111 tegra210_sfc_write_ram(sfc->regmap, coeff_ram);
3113 regmap_update_bits(sfc->regmap,
3121 static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc,
3154 cif_conf.stereo_conv = sfc->stereo_to_mono[path];
3155 cif_conf.mono_conv = sfc->mono_to_stereo[path];
3157 tegra_set_cif(sfc->regmap, reg, &cif_conf);
3162 static int tegra210_sfc_soft_reset(struct tegra210_sfc *sfc)
3172 regmap_update_bits(sfc->regmap, TEGRA210_SFC_SOFT_RESET,
3175 return regmap_read_poll_timeout(sfc->regmap,
3203 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
3206 regmap_update_bits(sfc->regmap, TEGRA210_SFC_COEF_RAM,
3209 err = tegra210_sfc_soft_reset(sfc);
3224 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
3229 &sfc->srate_in);
3233 err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_RX_CIF_CTRL);
3239 regmap_write(sfc->regmap, TEGRA210_SFC_RX_FREQ, sfc->srate_in);
3248 struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
3253 &sfc->srate_out);
3257 err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_TX_CIF_CTRL);
3263 regmap_write(sfc->regmap, TEGRA210_SFC_TX_FREQ, sfc->srate_out);
3280 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3282 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_RX_PATH];
3291 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3294 if (value == sfc->stereo_to_mono[SFC_RX_PATH])
3297 sfc->stereo_to_mono[SFC_RX_PATH] = value;
3306 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3308 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_RX_PATH];
3317 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3320 if (value == sfc->mono_to_stereo[SFC_RX_PATH])
3323 sfc->mono_to_stereo[SFC_RX_PATH] = value;
3332 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3334 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_TX_PATH];
3343 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3346 if (value == sfc->stereo_to_mono[SFC_TX_PATH])
3349 sfc->stereo_to_mono[SFC_TX_PATH] = value;
3358 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3360 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_TX_PATH];
3369 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
3372 if (value == sfc->mono_to_stereo[SFC_TX_PATH])
3375 sfc->mono_to_stereo[SFC_TX_PATH] = value;
3576 { .compatible = "nvidia,tegra210-sfc" },
3584 struct tegra210_sfc *sfc;
3588 sfc = devm_kzalloc(dev, sizeof(*sfc), GFP_KERNEL);
3589 if (!sfc)
3592 dev_set_drvdata(dev, sfc);
3598 sfc->regmap = devm_regmap_init_mmio(dev, regs,
3600 if (IS_ERR(sfc->regmap)) {
3602 return PTR_ERR(sfc->regmap);
3605 regcache_cache_only(sfc->regmap, true);
3633 .name = "tegra210-sfc",