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>
This commit is contained in:
Markus Pietrek 2010-08-04 15:59:50 +09:00 committed by Paul Mundt
parent e9a4c4a1a1
commit 7b42176a29

View File

@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
sg_init_table(&sg, 1); sg_init_table(&sg, 1);
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)), sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
size, offset_in_page(buff)); size, offset_in_page(buff));
sg_dma_len(&sg) = size;
sg_dma_address(&sg) = buff; sg_dma_address(&sg) = buff;
desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, 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,
sg_init_table(&sg, 1); sg_init_table(&sg, 1);
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)), sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
size, offset_in_page(buff)); size, offset_in_page(buff));
sg_dma_len(&sg) = size;
sg_dma_address(&sg) = buff; sg_dma_address(&sg) = buff;
desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,