summaryrefslogtreecommitdiff
path: root/sound/soc/cirrus/ep93xx-ac97.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-20 17:29:04 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-13 14:20:55 (GMT)
commit785d81e29bd237b4e76ca27c3ebcc3281e663596 (patch)
treec4a3638d768d9aaf809d36af70a3d73f1d5dd451 /sound/soc/cirrus/ep93xx-ac97.c
parent701c73aa89032f2551cdc73725cb881c0886d86f (diff)
downloadlinux-785d81e29bd237b4e76ca27c3ebcc3281e663596.tar.xz
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 840c9b1..3f4f888 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,
return 0;
}
-static int ep93xx_ac97_startup(struct snd_pcm_substream *substream,
- struct snd_soc_dai *dai)
+static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai)
{
- struct ep93xx_dma_data *dma_data;
+ dai->playback_dma_data = &ep93xx_ac97_pcm_out;
+ dai->capture_dma_data = &ep93xx_ac97_pcm_in;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- dma_data = &ep93xx_ac97_pcm_out;
- else
- dma_data = &ep93xx_ac97_pcm_in;
-
- snd_soc_dai_set_dma_data(dai, substream, dma_data);
return 0;
}
static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
- .startup = ep93xx_ac97_startup,
.trigger = ep93xx_ac97_trigger,
};
@@ -337,6 +330,7 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
.name = "ep93xx-ac97",
.id = 0,
.ac97_control = 1,
+ .probe = ep93xx_ac97_dai_probe,
.playback = {
.stream_name = "AC97 Playback",
.channels_min = 2,