Searched refs:zx_spdif (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/sound/soc/zte/
H A Dzx296702-spdif.c85 struct zx_spdif_info *zx_spdif = dev_get_drvdata(dai->dev); zx_spdif_dai_probe() local
87 snd_soc_dai_set_drvdata(dai, zx_spdif); zx_spdif_dai_probe()
88 zx_spdif->dma_data.addr = zx_spdif->mapbase + ZX_DATA; zx_spdif_dai_probe()
89 zx_spdif->dma_data.maxburst = 8; zx_spdif_dai_probe()
90 snd_soc_dai_init_dma_data(dai, &zx_spdif->dma_data, NULL); zx_spdif_dai_probe()
140 struct zx_spdif_info *zx_spdif = dev_get_drvdata(socdai->dev); zx_spdif_hw_params() local
142 struct snd_dmaengine_dai_dma_data *dma_data = &zx_spdif->dma_data; zx_spdif_hw_params()
149 val = readl_relaxed(zx_spdif->reg_base + ZX_CTRL); zx_spdif_hw_params()
177 writel_relaxed(val, zx_spdif->reg_base + ZX_CTRL); zx_spdif_hw_params()
179 val = readl_relaxed(zx_spdif->reg_base + ZX_VALID_BIT); zx_spdif_hw_params()
185 writel_relaxed(val, zx_spdif->reg_base + ZX_VALID_BIT); zx_spdif_hw_params()
188 ret = zx_spdif_chanstats(zx_spdif->reg_base, rate); zx_spdif_hw_params()
214 struct zx_spdif_info *zx_spdif = dev_get_drvdata(dai->dev); zx_spdif_trigger() local
219 val = readl_relaxed(zx_spdif->reg_base + ZX_FIFOCTRL); zx_spdif_trigger()
221 writel_relaxed(val, zx_spdif->reg_base + ZX_FIFOCTRL); zx_spdif_trigger()
225 zx_spdif_cfg_tx(zx_spdif->reg_base, true); zx_spdif_trigger()
231 zx_spdif_cfg_tx(zx_spdif->reg_base, false); zx_spdif_trigger()
245 struct zx_spdif_info *zx_spdif = dev_get_drvdata(dai->dev); zx_spdif_startup() local
247 return clk_prepare_enable(zx_spdif->dai_clk); zx_spdif_startup()
253 struct zx_spdif_info *zx_spdif = dev_get_drvdata(dai->dev); zx_spdif_shutdown() local
255 clk_disable_unprepare(zx_spdif->dai_clk); zx_spdif_shutdown()
309 struct zx_spdif_info *zx_spdif; zx_spdif_probe() local
312 zx_spdif = devm_kzalloc(&pdev->dev, sizeof(*zx_spdif), GFP_KERNEL); zx_spdif_probe()
313 if (!zx_spdif) zx_spdif_probe()
316 zx_spdif->dai_clk = devm_clk_get(&pdev->dev, "tx"); zx_spdif_probe()
317 if (IS_ERR(zx_spdif->dai_clk)) { zx_spdif_probe()
319 return PTR_ERR(zx_spdif->dai_clk); zx_spdif_probe()
323 zx_spdif->mapbase = res->start; zx_spdif_probe()
324 zx_spdif->reg_base = devm_ioremap_resource(&pdev->dev, res); zx_spdif_probe()
325 if (IS_ERR(zx_spdif->reg_base)) { zx_spdif_probe()
327 return PTR_ERR(zx_spdif->reg_base); zx_spdif_probe()
330 zx_spdif_dev_init(zx_spdif->reg_base); zx_spdif_probe()
331 platform_set_drvdata(pdev, zx_spdif); zx_spdif_probe()

Completed in 75 milliseconds