14 #include <linux/module.h>
26 struct clk *fout_epll, *mout_epll, *sclk_audio0, *sclk_spdif;
30 if (IS_ERR(fout_epll)) {
37 if (IS_ERR(mout_epll)) {
44 sclk_audio0 =
clk_get(&pdev->
dev,
"sclk_audio");
45 if (IS_ERR(sclk_audio0)) {
53 if (IS_ERR(sclk_spdif)) {
80 static int set_audio_clock_rate(
unsigned long epll_rate,
81 unsigned long audio_rate)
83 struct clk *fout_epll, *sclk_spdif;
86 if (IS_ERR(fout_epll)) {
95 if (IS_ERR(sclk_spdif)) {
111 unsigned long pll_out, rclk_rate;
134 ret = set_audio_clock_rate(pll_out, rclk_rate);
148 .hw_params = smdk_hw_params,
153 .stream_name =
"S/PDIF PCM Playback",
154 .platform_name =
"samsung-audio",
155 .cpu_dai_name =
"samsung-spdif",
156 .codec_dai_name =
"dit-hifi",
157 .codec_name =
"spdif-dit",
158 .ops = &smdk_spdif_ops,
162 .name =
"SMDK-S/PDIF",
164 .dai_link = &smdk_dai,
171 static int __init smdk_init(
void)
176 if (!smdk_snd_spdif_dit_device)
184 if (!smdk_snd_spdif_device) {
189 platform_set_drvdata(smdk_snd_spdif_device, &smdk);
196 ret = set_audio_clock_heirachy(smdk_snd_spdif_device);
212 static void __exit smdk_exit(
void)