Lines Matching +full:tegra210 +full:- +full:mbdrc
1 // SPDX-License-Identifier: GPL-2.0-only
3 // tegra210_ope.c - Tegra210 OPE driver
45 return -EINVAL; in tegra210_ope_set_audio_cif()
55 return -EINVAL; in tegra210_ope_set_audio_cif()
63 tegra_set_cif(ope->regmap, reg, &cif_conf); in tegra210_ope_set_audio_cif()
72 struct device *dev = dai->dev; in tegra210_ope_hw_params()
91 tegra210_mbdrc_hw_params(dai->component); in tegra210_ope_hw_params()
98 struct tegra210_ope *ope = dev_get_drvdata(cmpnt->dev); in tegra210_ope_component_probe()
104 * The OPE, PEQ and MBDRC functionalities are combined under one in tegra210_ope_component_probe()
106 * sub blocks PEQ and MBDRC. However driver registers separate in tegra210_ope_component_probe()
114 snd_soc_component_init_regmap(cmpnt, ope->regmap); in tegra210_ope_component_probe()
125 .name = "OPE-RX-CIF",
127 .stream_name = "RX-CIF-Playback",
136 .stream_name = "RX-CIF-Capture",
146 .name = "OPE-TX-CIF",
148 .stream_name = "TX-CIF-Playback",
157 .stream_name = "TX-CIF-Capture",
176 { "RX XBAR-" sname, NULL, "XBAR-TX" }, \
177 { "RX-CIF-" sname, NULL, "RX XBAR-" sname }, \
178 { "RX", NULL, "RX-CIF-" sname }, \
179 { "TX-CIF-" sname, NULL, "TX" }, \
180 { "TX XBAR-" sname, NULL, "TX-CIF-" sname }, \
181 { "XBAR-RX", NULL, "TX XBAR-" sname }
190 "MBDRC to PEQ",
191 "PEQ to MBDRC"
204 ucontrol->value.enumerated.item[0] = ope->data_dir; in tegra210_ope_get_data_dir()
214 unsigned int value = ucontrol->value.enumerated.item[0]; in tegra210_ope_put_data_dir()
216 if (value == ope->data_dir) in tegra210_ope_put_data_dir()
219 ope->data_dir = value; in tegra210_ope_put_data_dir()
301 struct device *dev = &pdev->dev; in tegra210_ope_probe()
308 return -ENOMEM; in tegra210_ope_probe()
314 ope->regmap = devm_regmap_init_mmio(dev, regs, in tegra210_ope_probe()
316 if (IS_ERR(ope->regmap)) { in tegra210_ope_probe()
318 return PTR_ERR(ope->regmap); in tegra210_ope_probe()
321 regcache_cache_only(ope->regmap, true); in tegra210_ope_probe()
333 dev_err(dev, "MBDRC init failed\n"); in tegra210_ope_probe()
352 pm_runtime_disable(&pdev->dev); in tegra210_ope_remove()
359 tegra210_peq_save(ope->peq_regmap, ope->peq_biquad_gains, in tegra210_ope_runtime_suspend()
360 ope->peq_biquad_shifts); in tegra210_ope_runtime_suspend()
362 regcache_cache_only(ope->mbdrc_regmap, true); in tegra210_ope_runtime_suspend()
363 regcache_cache_only(ope->peq_regmap, true); in tegra210_ope_runtime_suspend()
364 regcache_cache_only(ope->regmap, true); in tegra210_ope_runtime_suspend()
366 regcache_mark_dirty(ope->regmap); in tegra210_ope_runtime_suspend()
367 regcache_mark_dirty(ope->peq_regmap); in tegra210_ope_runtime_suspend()
368 regcache_mark_dirty(ope->mbdrc_regmap); in tegra210_ope_runtime_suspend()
377 regcache_cache_only(ope->regmap, false); in tegra210_ope_runtime_resume()
378 regcache_cache_only(ope->peq_regmap, false); in tegra210_ope_runtime_resume()
379 regcache_cache_only(ope->mbdrc_regmap, false); in tegra210_ope_runtime_resume()
381 regcache_sync(ope->regmap); in tegra210_ope_runtime_resume()
382 regcache_sync(ope->peq_regmap); in tegra210_ope_runtime_resume()
383 regcache_sync(ope->mbdrc_regmap); in tegra210_ope_runtime_resume()
385 tegra210_peq_restore(ope->peq_regmap, ope->peq_biquad_gains, in tegra210_ope_runtime_resume()
386 ope->peq_biquad_shifts); in tegra210_ope_runtime_resume()
399 { .compatible = "nvidia,tegra210-ope" },
406 .name = "tegra210-ope",
416 MODULE_DESCRIPTION("Tegra210 OPE ASoC driver");