aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-i2s.c
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2009-08-06 19:55:31 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-08-07 06:38:29 -0400
commit9bb74150561bb337b49192a8f8e8f812057b88ea (patch)
tree8071c7f8465c258921fa9811cb60feb41ac5196c /sound/soc/davinci/davinci-i2s.c
parent9029bb316bb99ccc7f0518c4d3e0d6adc0729c4f (diff)
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: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-i2s.c')
-rw-r--r--sound/soc/davinci/davinci-i2s.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index e5cd97b74c50..2a56fb78f67a 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -353,9 +353,8 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
353 struct snd_pcm_hw_params *params, 353 struct snd_pcm_hw_params *params,
354 struct snd_soc_dai *dai) 354 struct snd_soc_dai *dai)
355{ 355{
356 struct snd_soc_pcm_runtime *rtd = substream->private_data; 356 struct davinci_pcm_dma_params *dma_params = dai->dma_data;
357 struct davinci_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; 357 struct davinci_mcbsp_dev *dev = dai->private_data;
358 struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
359 struct snd_interval *i = NULL; 358 struct snd_interval *i = NULL;
360 int mcbsp_word_length; 359 int mcbsp_word_length;
361 unsigned int rcr, xcr, srgr; 360 unsigned int rcr, xcr, srgr;
@@ -425,8 +424,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
425static int davinci_i2s_prepare(struct snd_pcm_substream *substream, 424static int davinci_i2s_prepare(struct snd_pcm_substream *substream,
426 struct snd_soc_dai *dai) 425 struct snd_soc_dai *dai)
427{ 426{
428 struct snd_soc_pcm_runtime *rtd = substream->private_data; 427 struct davinci_mcbsp_dev *dev = dai->private_data;
429 struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
430 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); 428 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
431 davinci_mcbsp_stop(dev, playback); 429 davinci_mcbsp_stop(dev, playback);
432 if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) { 430 if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) {
@@ -439,8 +437,7 @@ static int davinci_i2s_prepare(struct snd_pcm_substream *substream,
439static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd, 437static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
440 struct snd_soc_dai *dai) 438 struct snd_soc_dai *dai)
441{ 439{
442 struct snd_soc_pcm_runtime *rtd = substream->private_data; 440 struct davinci_mcbsp_dev *dev = dai->private_data;
443 struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
444 int ret = 0; 441 int ret = 0;
445 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); 442 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
446 if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0) 443 if ((dev->pcr & DAVINCI_MCBSP_PCR_FSXM) == 0)
@@ -466,8 +463,7 @@ static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
466static void davinci_i2s_shutdown(struct snd_pcm_substream *substream, 463static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
467 struct snd_soc_dai *dai) 464 struct snd_soc_dai *dai)
468{ 465{
469 struct snd_soc_pcm_runtime *rtd = substream->private_data; 466 struct davinci_mcbsp_dev *dev = dai->private_data;
470 struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
471 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); 467 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
472 davinci_mcbsp_stop(dev, playback); 468 davinci_mcbsp_stop(dev, playback);
473} 469}