14 #include <linux/device.h>
15 #include <linux/kernel.h>
19 #include <linux/module.h>
65 snd_soc_dai_set_dma_data(cpu_dai, substream, (
void *)&host->
dma_params);
72 spdif_out_configure(host);
87 snd_soc_dai_set_dma_data(dai, substream,
NULL);
125 core_freq = 64000 * 128 * 10;
133 core_freq = 176400 * 128;
139 core_freq = 192000 * 128;
143 spdif_out_clock(host, core_freq, rate);
212 static int spdif_mute_get(
struct snd_kcontrol *kcontrol,
219 struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
225 static int spdif_mute_put(
struct snd_kcontrol *kcontrol,
232 struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
237 spdif_digital_mute(cpu_dai, ucontrol->
value.integer.value[0]);
243 spdif_mute_get, spdif_mute_put),
253 .digital_mute = spdif_digital_mute,
254 .startup = spdif_out_startup,
255 .shutdown = spdif_out_shutdown,
256 .trigger = spdif_out_trigger,
257 .hw_params = spdif_out_hw_params,
266 SNDRV_PCM_RATE_192000),
270 .
ops = &spdif_out_dai_ops,
285 resource_size(res), pdev->
name)) {
286 dev_warn(&pdev->
dev,
"Failed to get memory resourse\n");
304 if (IS_ERR(host->
clk))
305 return PTR_ERR(host->
clk);
307 pdata = dev_get_platdata(&pdev->
dev);
339 static int spdif_out_suspend(
struct device *
dev)
350 static int spdif_out_resume(
struct device *dev)
357 spdif_out_configure(host);
367 #define SPDIF_OUT_DEV_PM_OPS (&spdif_out_dev_pm_ops)
370 #define SPDIF_OUT_DEV_PM_OPS NULL
375 .probe = spdif_out_probe,
376 .remove = spdif_out_remove,