ASoC: dai: Provide interface for setting DMA data at probe time
Subsystems (4)
Mark Brown
maintainerPATCH 1/2 ASoC: dai: Provide interface for setting DMA data at probe time
From: Mark Brown <[email protected]>
Allow DMA data to be set at probe time for devices that can do that, avoiding the need to do it every time we start a stream and supporting non-DT dmaengine users using the helpers.
Signed-off-by Mark Brown <[email protected]>
--- include/sound/soc-dai.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/sound/soc-dai.h +7 -0
@@ -286,6 +286,13 @@ static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai, dai->capture_dma_data = data; } +static inline void snd_soc_dai_init_dma_data (struct snd_soc_dai *dai, +void *playback,void *capture) +{ + dai->playback_dma_data = playback; + dai->capture_dma_data = capture; +} +static inline void snd_soc_dai_set_drvdata (struct snd_soc_dai *dai,void *data) {
Signature · 1 line
1.8.4.rc3
Mark Brown
maintainerPATCH 2/2 ASoC: samsung: Initialise DMA data at device probe time
From: Mark Brown <[email protected]>
This is a minor simplification and will help with converting the platform to use the dmaengine helpers.
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/samsung/i2s.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
sound/soc/samsung/i2s.c +2 -7
@@ -702,13 +702,6 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, }writel (mod, i2s->addr +I2SMOD ); -if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) -snd_soc_dai_set_dma_data (dai, substream, - (void *)&i2s->dma_playback); -else -snd_soc_dai_set_dma_data (dai, substream, - (void *)&i2s->dma_capture); - i2s->frmclk =params_rate (params);return 0 ;
@@ -970,6 +963,8 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) }clk_prepare_enable (i2s->clk); +snd_soc_dai_init_dma_data (dai, &i2s->dma_playback, &i2s->dma_capture); +if (other) { other->addr = i2s->addr; other->clk = i2s->clk;
Signature · 1 line
1.8.4.rc3