diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-04-20 19:29:06 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-12 20:58:03 +0400 |
commit | 46fdd8b11d4ab58af126344dcbc0bd565174db16 (patch) | |
tree | de1bbe6bd4ccb769d6516f51efdd67b5ec6a36ff /sound/soc/spear/spdif_out.c | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) | |
download | lwn-46fdd8b11d4ab58af126344dcbc0bd565174db16.tar.gz lwn-46fdd8b11d4ab58af126344dcbc0bd565174db16.zip |
ASoC: spear: 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 spear 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/spear/spdif_out.c')
-rw-r--r-- | sound/soc/spear/spdif_out.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c index 1e3c3dda3598..12b4f2fcb9af 100644 --- a/sound/soc/spear/spdif_out.c +++ b/sound/soc/spear/spdif_out.c @@ -62,8 +62,6 @@ static int spdif_out_startup(struct snd_pcm_substream *substream, if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) return -EINVAL; - snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)&host->dma_params); - ret = clk_enable(host->clk); if (ret) return ret; @@ -84,7 +82,6 @@ static void spdif_out_shutdown(struct snd_pcm_substream *substream, clk_disable(host->clk); host->running = false; - snd_soc_dai_set_dma_data(dai, substream, NULL); } static void spdif_out_clock(struct spdif_out_dev *host, u32 core_freq, @@ -245,6 +242,10 @@ static const struct snd_kcontrol_new spdif_out_controls[] = { int spdif_soc_dai_probe(struct snd_soc_dai *dai) { + struct spdif_out_dev *host = snd_soc_dai_get_drvdata(dai); + + dai->playback_dma_data = &host->dma_params; + return snd_soc_add_dai_controls(dai, spdif_out_controls, ARRAY_SIZE(spdif_out_controls)); } |