Skip to content

Commit

Permalink
ASoC: mxs: Setup dma data in DAI probe
Browse files Browse the repository at this point in the history
This allows us to access the DAI DMA data when we create the PCM. We'll use
this when converting mxs to generic DMA engine PCM driver.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Tested-by: Shawn Guo <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
larsclausen authored and broonie committed Apr 22, 2013
1 parent 57364f9 commit 8c1bb4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{
struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
snd_soc_dai_set_dma_data(cpu_dai, substream, &saif->dma_param);

/* clear error status to 0 for each re-open */
saif->fifo_underrun = 0;
Expand Down Expand Up @@ -605,6 +604,8 @@ static int mxs_saif_dai_probe(struct snd_soc_dai *dai)
struct mxs_saif *saif = dev_get_drvdata(dai->dev);

snd_soc_dai_set_drvdata(dai, saif);
dai->playback_dma_data = &saif->dma_param;
dai->capture_dma_data = &saif->dma_param;

return 0;
}
Expand Down

0 comments on commit 8c1bb4e

Please sign in to comment.