aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/cirrus/ep93xx-ac97.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-20 19:29:04 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-13 18:20:55 +0400
commit785d81e29bd237b4e76ca27c3ebcc3281e663596 (patch)
treec4a3638d768d9aaf809d36af70a3d73f1d5dd451 /sound/soc/cirrus/ep93xx-ac97.c
parentASoC: ep93xx: Remove redundant platform_set_drvdata() (diff)
downloadwireguard-linux-785d81e29bd237b4e76ca27c3ebcc3281e663596.tar.xz
wireguard-linux-785d81e29bd237b4e76ca27c3ebcc3281e663596.zip
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,
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,