aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/cirrus/ep93xx-ac97.c14
-rw-r--r--sound/soc/cirrus/ep93xx-i2s.c14
2 files changed, 8 insertions, 20 deletions
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c
index 840c9b18201e..3f4f88877c84 100644
--- a/sound/soc/cirrus/ep93xx-ac97.c
+++ b/sound/soc/cirrus/ep93xx-ac97.c
@@ -314,22 +314,15 @@ static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream,
314 return 0; 314 return 0;
315} 315}
316 316
317static int ep93xx_ac97_startup(struct snd_pcm_substream *substream, 317static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai)
318 struct snd_soc_dai *dai)
319{ 318{
320 struct ep93xx_dma_data *dma_data; 319 dai->playback_dma_data = &ep93xx_ac97_pcm_out;
320 dai->capture_dma_data = &ep93xx_ac97_pcm_in;
321 321
322 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
323 dma_data = &ep93xx_ac97_pcm_out;
324 else
325 dma_data = &ep93xx_ac97_pcm_in;
326
327 snd_soc_dai_set_dma_data(dai, substream, dma_data);
328 return 0; 322 return 0;
329} 323}
330 324
331static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = { 325static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
332 .startup = ep93xx_ac97_startup,
333 .trigger = ep93xx_ac97_trigger, 326 .trigger = ep93xx_ac97_trigger,
334}; 327};
335 328
@@ -337,6 +330,7 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
337 .name = "ep93xx-ac97", 330 .name = "ep93xx-ac97",
338 .id = 0, 331 .id = 0,
339 .ac97_control = 1, 332 .ac97_control = 1,
333 .probe = ep93xx_ac97_dai_probe,
340 .playback = { 334 .playback = {
341 .stream_name = "AC97 Playback", 335 .stream_name = "AC97 Playback",
342 .channels_min = 2, 336 .channels_min = 2,
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 5c1102e9e159..ef731e687ebb 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -60,7 +60,6 @@ struct ep93xx_i2s_info {
60 struct clk *mclk; 60 struct clk *mclk;
61 struct clk *sclk; 61 struct clk *sclk;
62 struct clk *lrclk; 62 struct clk *lrclk;
63 struct ep93xx_dma_data *dma_data;
64 void __iomem *regs; 63 void __iomem *regs;
65}; 64};
66 65
@@ -139,15 +138,11 @@ static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream)
139 } 138 }
140} 139}
141 140
142static int ep93xx_i2s_startup(struct snd_pcm_substream *substream, 141static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai)
143 struct snd_soc_dai *dai)
144{ 142{
145 struct snd_soc_pcm_runtime *rtd = substream->private_data; 143 dai->playback_dma_data = &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_PLAYBACK];
146 struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai); 144 dai->capture_dma_data = &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_CAPTURE];
147 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
148 145
149 snd_soc_dai_set_dma_data(cpu_dai, substream,
150 &info->dma_data[substream->stream]);
151 return 0; 146 return 0;
152} 147}
153 148
@@ -338,7 +333,6 @@ static int ep93xx_i2s_resume(struct snd_soc_dai *dai)
338#endif 333#endif
339 334
340static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { 335static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
341 .startup = ep93xx_i2s_startup,
342 .shutdown = ep93xx_i2s_shutdown, 336 .shutdown = ep93xx_i2s_shutdown,
343 .hw_params = ep93xx_i2s_hw_params, 337 .hw_params = ep93xx_i2s_hw_params,
344 .set_sysclk = ep93xx_i2s_set_sysclk, 338 .set_sysclk = ep93xx_i2s_set_sysclk,
@@ -349,6 +343,7 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
349 343
350static struct snd_soc_dai_driver ep93xx_i2s_dai = { 344static struct snd_soc_dai_driver ep93xx_i2s_dai = {
351 .symmetric_rates= 1, 345 .symmetric_rates= 1,
346 .probe = ep93xx_i2s_dai_probe,
352 .suspend = ep93xx_i2s_suspend, 347 .suspend = ep93xx_i2s_suspend,
353 .resume = ep93xx_i2s_resume, 348 .resume = ep93xx_i2s_resume,
354 .playback = { 349 .playback = {
@@ -407,7 +402,6 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
407 } 402 }
408 403
409 dev_set_drvdata(&pdev->dev, info); 404 dev_set_drvdata(&pdev->dev, info);
410 info->dma_data = ep93xx_i2s_dma_data;
411 405
412 err = snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component, 406 err = snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
413 &ep93xx_i2s_dai, 1); 407 &ep93xx_i2s_dai, 1);