[Sound-open-firmware] [PATCH] hda-dma: fix src_width and dest_width for 32 bit container case
Keyon Jie
yang.jie at linux.intel.com
Wed Mar 7 11:26:28 CET 2018
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 at linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie at 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;
--
2.14.1
More information about the Sound-open-firmware
mailing list