aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/blackfin/bf5xx-i2s-pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-09-17 11:18:13 -0700
committerMark Brown <broonie@kernel.org>2014-09-17 11:18:13 -0700
commit0111d0f13469831266d716e3b50d580a3e25cff9 (patch)
treee2c082e97808f1303190fae3bb79cb8bf359bf2c /sound/soc/blackfin/bf5xx-i2s-pcm.c
parent29a6185d2f78e35b0b36d0ed94bc27d2b71e1ef3 (diff)
parentaf92ba8fd23cb5811d96b833bbb7133efefeb5b9 (diff)
Merge tag 'v3.14.19' into linux-linaro-lsk-v3.14lsk-v3.14-14.09
This is the 3.14.19 stable release
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s-pcm.c')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.c8
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,
unsigned int sample_size = runtime->sample_bits / 8;
void *buf = runtime->dma_area;
struct bf5xx_i2s_pcm_data *dma_data;
- unsigned int offset, size;
+ unsigned int offset, samples;
dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
if (dma_data->tdm_mode) {
offset = pos * 8 * sample_size;
- size = count * 8 * sample_size;
+ samples = count * 8;
} else {
offset = frames_to_bytes(runtime, pos);
- size = frames_to_bytes(runtime, count);
+ samples = count * runtime->channels;
}
- snd_pcm_format_set_silence(runtime->format, buf + offset, size);
+ snd_pcm_format_set_silence(runtime->format, buf + offset, samples);
return 0;
}