diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s-pcm.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index a3881c4381c9..bcf591373a7a 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -290,19 +290,19 @@ static int bf5xx_pcm_silence(struct snd_pcm_substream *substream, | |||
290 | unsigned int sample_size = runtime->sample_bits / 8; | 290 | unsigned int sample_size = runtime->sample_bits / 8; |
291 | void *buf = runtime->dma_area; | 291 | void *buf = runtime->dma_area; |
292 | struct bf5xx_i2s_pcm_data *dma_data; | 292 | struct bf5xx_i2s_pcm_data *dma_data; |
293 | unsigned int offset, size; | 293 | unsigned int offset, samples; |
294 | 294 | ||
295 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 295 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
296 | 296 | ||
297 | if (dma_data->tdm_mode) { | 297 | if (dma_data->tdm_mode) { |
298 | offset = pos * 8 * sample_size; | 298 | offset = pos * 8 * sample_size; |
299 | size = count * 8 * sample_size; | 299 | samples = count * 8; |
300 | } else { | 300 | } else { |
301 | offset = frames_to_bytes(runtime, pos); | 301 | offset = frames_to_bytes(runtime, pos); |
302 | size = frames_to_bytes(runtime, count); | 302 | samples = count * runtime->channels; |
303 | } | 303 | } |
304 | 304 | ||
305 | snd_pcm_format_set_silence(runtime->format, buf + offset, size); | 305 | snd_pcm_format_set_silence(runtime->format, buf + offset, samples); |
306 | 306 | ||
307 | return 0; | 307 | return 0; |
308 | } | 308 | } |