aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/siu_pcm.c
diff options
context:
space:
mode:
authorMarkus Pietrek <markus.pietrek@emtrion.de>2010-08-04 02:59:50 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-08-04 02:59:50 -0400
commit7b42176a2969bc913cd2949e7edd935466745b11 (patch)
treeb1c09184abdce6a3da8278a20f6e33933a655091 /sound/soc/sh/siu_pcm.c
parente9a4c4a1a1ad0ac50a4f6db870f8215272aebca0 (diff)
sound/soc/sh/siu: Fixed undefined dma_length of scatter gather list
Without this patch, an undefined/random sg->dma_length is used and the sound will be played/captured wrongly. Signed-off-by: Markus Pietrek <markus.pietrek@emtrion.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'sound/soc/sh/siu_pcm.c')
-rw-r--r--sound/soc/sh/siu_pcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 36170be15aa7..b0ccd0b862fc 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
127 sg_init_table(&sg, 1); 127 sg_init_table(&sg, 1);
128 sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)), 128 sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
129 size, offset_in_page(buff)); 129 size, offset_in_page(buff));
130 sg_dma_len(&sg) = size;
130 sg_dma_address(&sg) = buff; 131 sg_dma_address(&sg) = buff;
131 132
132 desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, 133 desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
@@ -176,6 +177,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
176 sg_init_table(&sg, 1); 177 sg_init_table(&sg, 1);
177 sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)), 178 sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
178 size, offset_in_page(buff)); 179 size, offset_in_page(buff));
180 sg_dma_len(&sg) = size;
179 sg_dma_address(&sg) = buff; 181 sg_dma_address(&sg) = buff;
180 182
181 desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, 183 desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,