Lines Matching full:mixer
3 // tegra210_mixer.c - Tegra210 MIXER driver
79 struct tegra210_mixer *mixer = dev_get_drvdata(dev); in tegra210_mixer_runtime_suspend() local
81 regcache_cache_only(mixer->regmap, true); in tegra210_mixer_runtime_suspend()
82 regcache_mark_dirty(mixer->regmap); in tegra210_mixer_runtime_suspend()
89 struct tegra210_mixer *mixer = dev_get_drvdata(dev); in tegra210_mixer_runtime_resume() local
91 regcache_cache_only(mixer->regmap, false); in tegra210_mixer_runtime_resume()
92 regcache_sync(mixer->regmap); in tegra210_mixer_runtime_resume()
97 static int tegra210_mixer_write_ram(struct tegra210_mixer *mixer, in tegra210_mixer_write_ram() argument
105 err = regmap_read_poll_timeout(mixer->regmap, in tegra210_mixer_write_ram()
117 regmap_write(mixer->regmap, in tegra210_mixer_write_ram()
120 regmap_write(mixer->regmap, in tegra210_mixer_write_ram()
130 struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt); in tegra210_mixer_configure_gain() local
138 err = tegra210_mixer_write_ram(mixer, reg + i, in tegra210_mixer_configure_gain()
146 err = tegra210_mixer_write_ram(mixer, reg + NUM_GAIN_POLY_COEFFS, in tegra210_mixer_configure_gain()
147 mixer->gain_value[id]); in tegra210_mixer_configure_gain()
160 err = tegra210_mixer_write_ram(mixer, in tegra210_mixer_configure_gain()
168 err = tegra210_mixer_write_ram(mixer, reg + REG_CFG_DONE_TRIGGER, in tegra210_mixer_configure_gain()
183 struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt); in tegra210_mixer_get_gain() local
190 ucontrol->value.integer.value[0] = mixer->gain_value[i]; in tegra210_mixer_get_gain()
202 struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt); in tegra210_mixer_apply_gain() local
206 /* Save gain value for specific MIXER input */ in tegra210_mixer_apply_gain()
210 if (mixer->gain_value[id] == ucontrol->value.integer.value[0]) in tegra210_mixer_apply_gain()
213 mixer->gain_value[id] = ucontrol->value.integer.value[0]; in tegra210_mixer_apply_gain()
236 static int tegra210_mixer_set_audio_cif(struct tegra210_mixer *mixer, in tegra210_mixer_set_audio_cif() argument
264 tegra_set_cif(mixer->regmap, in tegra210_mixer_set_audio_cif()
275 struct tegra210_mixer *mixer = snd_soc_dai_get_drvdata(dai); in tegra210_mixer_in_hw_params() local
278 err = tegra210_mixer_set_audio_cif(mixer, params, in tegra210_mixer_in_hw_params()
291 struct tegra210_mixer *mixer = snd_soc_dai_get_drvdata(dai); in tegra210_mixer_out_hw_params() local
293 return tegra210_mixer_set_audio_cif(mixer, params, in tegra210_mixer_out_hw_params()
308 .name = "MIXER-RX-CIF"#id, \
332 .name = "MIXER-TX-CIF" #id, \
355 /* Mixer Input */
367 /* Mixer Output */
405 /* Volume controls for all MIXER inputs */
619 struct tegra210_mixer *mixer; in tegra210_mixer_platform_probe() local
623 mixer = devm_kzalloc(dev, sizeof(*mixer), GFP_KERNEL); in tegra210_mixer_platform_probe()
624 if (!mixer) in tegra210_mixer_platform_probe()
627 dev_set_drvdata(dev, mixer); in tegra210_mixer_platform_probe()
629 /* Use default gain value for all MIXER inputs */ in tegra210_mixer_platform_probe()
631 mixer->gain_value[i] = gain_params.gain_value; in tegra210_mixer_platform_probe()
637 mixer->regmap = devm_regmap_init_mmio(dev, regs, in tegra210_mixer_platform_probe()
639 if (IS_ERR(mixer->regmap)) { in tegra210_mixer_platform_probe()
641 return PTR_ERR(mixer->regmap); in tegra210_mixer_platform_probe()
644 regcache_cache_only(mixer->regmap, true); in tegra210_mixer_platform_probe()
650 dev_err(dev, "can't register MIXER component, err: %d\n", err); in tegra210_mixer_platform_probe()
685 MODULE_DESCRIPTION("Tegra210 MIXER ASoC driver");