linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter gather
@ 2010-07-13 14:55 Markus Pietrek
  2010-07-13 15:12 ` [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter Markus Pietrek
  2010-09-17 10:07 ` Guennadi Liakhovetski
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Pietrek @ 2010-07-13 14:55 UTC (permalink / raw)
  To: linux-sh


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>
---
 sound/soc/sh/siu_pcm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 36170be..f6fdf9c 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,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(sg) = size;
        sg_dma_address(&sg) = buff;

        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_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(sg) = size;
        sg_dma_address(&sg) = buff;

        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
--
1.7.0.4


_____________________________________

Amtsgericht Mannheim
HRB 110 300
Geschäftsführer: Dieter Baur, Ramona Maurer
_____________________________________

Important Note:
- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information.
- If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited.
- Please inform us immediately and destroy the original transmittal.

Thank you for your cooperation.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-17 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 14:55 [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter gather Markus Pietrek
2010-07-13 15:12 ` [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter Markus Pietrek
2010-09-17 10:07 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).