[Sound-open-firmware] [PATCH] hda-dma: fix src_width and dest_width for 32 bit container case

The src_width and dest_width are configured already in Bytes, here fix it, otherwise 24/32 bit copying with hda-dma may have problem.
Reported-by: Zhigang Wu zhigang.wu@linux.intel.com Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/drivers/hda-dma.c | 6 +++--- src/include/reef/dma.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/drivers/hda-dma.c b/src/drivers/hda-dma.c index 57cb7fc..06b2d9c 100644 --- a/src/drivers/hda-dma.c +++ b/src/drivers/hda-dma.c @@ -343,11 +343,11 @@ static int hda_dma_set_config(struct dma *dma, int channel, /* firmware control buffer */ dgcs = DGCS_FWCB;
- /* set DGCS.SCS bit to 0 for 32 bit container */ + /* set DGCS.SCS bit to 1 for 16bit(2B) container */ if ((config->direction == DMA_DIR_HMEM_TO_LMEM && - config->dest_width <= 16) || + config->dest_width <= 2) || (config->direction == DMA_DIR_LMEM_TO_HMEM && - config->src_width <= 16)) + config->src_width <= 2)) dgcs |= DGCS_SCS;
/* init channel in HW */ diff --git a/src/include/reef/dma.h b/src/include/reef/dma.h index 71bce56..f82b533 100644 --- a/src/include/reef/dma.h +++ b/src/include/reef/dma.h @@ -68,8 +68,8 @@ struct dma_sg_elem {
/* DMA physical SG params */ struct dma_sg_config { - uint32_t src_width; - uint32_t dest_width; + uint32_t src_width; /* in bytes */ + uint32_t dest_width; /* in bytes */ uint32_t burst_elems; uint32_t direction; uint32_t src_dev;

On Wed, 2018-03-07 at 18:26 +0800, Keyon Jie wrote:
The src_width and dest_width are configured already in Bytes, here fix it, otherwise 24/32 bit copying with hda-dma may have problem.
Reported-by: Zhigang Wu zhigang.wu@linux.intel.com Signed-off-by: Keyon Jie yang.jie@linux.intel.com
src/drivers/hda-dma.c | 6 +++--- src/include/reef/dma.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
Applied.
Thanks
Liam --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
participants (2)
-
Keyon Jie
-
Liam Girdwood