aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/cirrus/ep93xx-ac97.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-20 13:29:04 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-13 10:20:55 -0400
commit785d81e29bd237b4e76ca27c3ebcc3281e663596 (patch)
treec4a3638d768d9aaf809d36af70a3d73f1d5dd451 /sound/soc/cirrus/ep93xx-ac97.c
parent701c73aa89032f2551cdc73725cb881c0886d86f (diff)
ASoC: ep93xx: Setup dma data in DAI probe
This allows us to access the DAI DMA data when we create the PCM. We'll use this when converting ep39xx to generic DMA engine PCM driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/cirrus/ep93xx-ac97.c')
-rw-r--r--sound/soc/cirrus/ep93xx-ac97.c14
1 files changed, 4 insertions, 10 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,