]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - sound/soc/blackfin/bf5xx-i2s-pcm.c
Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and 'asoc/topic...
[mirror_ubuntu-artful-kernel.git] / sound / soc / blackfin / bf5xx-i2s-pcm.c
index a3881c4381c9151771ffca5e5133ef01707ba9ea..bcf591373a7a0faf0cc0a9233b561c21a7564153 100644 (file)
@@ -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;
 }