Lines Matching full:spdif
2 * tegra20_spdif.c - Tegra20 SPDIF driver
39 #define DRV_NAME "tegra20-spdif"
43 struct tegra20_spdif *spdif = dev_get_drvdata(dev); in tegra20_spdif_runtime_suspend() local
45 clk_disable_unprepare(spdif->clk_spdif_out); in tegra20_spdif_runtime_suspend()
52 struct tegra20_spdif *spdif = dev_get_drvdata(dev); in tegra20_spdif_runtime_resume() local
55 ret = clk_prepare_enable(spdif->clk_spdif_out); in tegra20_spdif_runtime_resume()
69 struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); in tegra20_spdif_hw_params() local
84 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, mask, val); in tegra20_spdif_hw_params()
112 ret = clk_set_rate(spdif->clk_spdif_out, spdifclock); in tegra20_spdif_hw_params()
114 dev_err(dev, "Can't set SPDIF clock rate: %d\n", ret); in tegra20_spdif_hw_params()
121 static void tegra20_spdif_start_playback(struct tegra20_spdif *spdif) in tegra20_spdif_start_playback() argument
123 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, in tegra20_spdif_start_playback()
128 static void tegra20_spdif_stop_playback(struct tegra20_spdif *spdif) in tegra20_spdif_stop_playback() argument
130 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, in tegra20_spdif_stop_playback()
137 struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); in tegra20_spdif_trigger() local
143 tegra20_spdif_start_playback(spdif); in tegra20_spdif_trigger()
148 tegra20_spdif_stop_playback(spdif); in tegra20_spdif_trigger()
159 struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); in tegra20_spdif_probe() local
162 dai->playback_dma_data = &spdif->playback_dma_data; in tegra20_spdif_probe()
267 struct tegra20_spdif *spdif; in tegra20_spdif_platform_probe() local
272 spdif = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_spdif), in tegra20_spdif_platform_probe()
274 if (!spdif) in tegra20_spdif_platform_probe()
277 dev_set_drvdata(&pdev->dev, spdif); in tegra20_spdif_platform_probe()
279 spdif->clk_spdif_out = devm_clk_get(&pdev->dev, "spdif_out"); in tegra20_spdif_platform_probe()
280 if (IS_ERR(spdif->clk_spdif_out)) { in tegra20_spdif_platform_probe()
281 pr_err("Can't retrieve spdif clock\n"); in tegra20_spdif_platform_probe()
282 ret = PTR_ERR(spdif->clk_spdif_out); in tegra20_spdif_platform_probe()
297 spdif->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_spdif_platform_probe()
299 if (IS_ERR(spdif->regmap)) { in tegra20_spdif_platform_probe()
301 ret = PTR_ERR(spdif->regmap); in tegra20_spdif_platform_probe()
305 spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; in tegra20_spdif_platform_probe()
306 spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_spdif_platform_probe()
307 spdif->playback_dma_data.maxburst = 4; in tegra20_spdif_platform_probe()
308 spdif->playback_dma_data.slave_id = dmareq->start; in tegra20_spdif_platform_probe()
373 MODULE_DESCRIPTION("Tegra20 SPDIF ASoC driver");