Commit 9bb74150 authored by Troy Kisky's avatar Troy Kisky Committed by Mark Brown

ASoC: DaVinci: i2s: don't bounce through rtd to get dai

dai is a parameter to the functions, so use it instead of
looking it up.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9029bb31
...@@ -353,9 +353,8 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -353,9 +353,8 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct davinci_pcm_dma_params *dma_params = dai->dma_data;
struct davinci_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; struct davinci_mcbsp_dev *dev = dai->private_data;
struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
struct snd_interval *i = NULL; struct snd_interval *i = NULL;
int mcbsp_word_length; int mcbsp_word_length;
unsigned int rcr, xcr, srgr; unsigned int rcr, xcr, srgr;
...@@ -425,8 +424,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -425,8 +424,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
static int davinci_i2s_prepare(struct snd_pcm_substream *substream, static int davinci_i2s_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct davinci_mcbsp_dev *dev = dai->private_data;
struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
davinci_mcbsp_stop(dev, playback); davinci_mcbsp_stop(dev, playback);
if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) { if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) {
...@@ -439,8 +437,7 @@ static int davinci_i2s_prepare(struct snd_pcm_substream *substream, ...@@ -439,8 +437,7 @@ static int davinci_i2s_prepare(struct snd_pcm_substream *substream,
static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd, static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct davinci_mcbsp_dev *dev = dai->private_data;
struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
int ret = 0; int ret = 0;
int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0)
...@@ -466,8 +463,7 @@ static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -466,8 +463,7 @@ static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
static void davinci_i2s_shutdown(struct snd_pcm_substream *substream, static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct davinci_mcbsp_dev *dev = dai->private_data;
struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
davinci_mcbsp_stop(dev, playback); davinci_mcbsp_stop(dev, playback);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment