diff options
author | Troy Kisky <troy.kisky@boundarydevices.com> | 2009-09-11 17:29:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-09-23 13:08:56 -0400 |
commit | 81ac55aa14c863821248d9e82694c79bb556694d (patch) | |
tree | 6484713a22832c2557cbdf79901481b80abf3191 /sound/soc/davinci/davinci-i2s.c | |
parent | df0fd5e5e117329436fdea568455545ca18a71f0 (diff) |
ASoC: DaVinci: Fix divide by zero error during 1st execution
When both playback and capture stream were open
davinci_i2s_hw_params was setting parameters for
the wrong stream. The fix for davinci_i2s_hw_params
is sufficient, but it looks like a race still happens
in davici_pcm_open. This patch also makes the race smaller
but the next patch provides a better fix.
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 12a6c549ee6e..d32e1974fdf2 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -353,8 +353,9 @@ 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 davinci_pcm_dma_params *dma_params = dai->dma_data; | ||
357 | struct davinci_mcbsp_dev *dev = dai->private_data; | 356 | struct davinci_mcbsp_dev *dev = dai->private_data; |
357 | struct davinci_pcm_dma_params *dma_params = | ||
358 | dev->dma_params[substream->stream]; | ||
358 | struct snd_interval *i = NULL; | 359 | struct snd_interval *i = NULL; |
359 | int mcbsp_word_length; | 360 | int mcbsp_word_length; |
360 | unsigned int rcr, xcr, srgr; | 361 | unsigned int rcr, xcr, srgr; |