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>
This commit is contained in:
Keyon Jie 2018-03-07 18:26:28 +08:00 committed by Liam Girdwood
parent 680798071e
commit 3e24ac8e9f
2 changed files with 5 additions and 5 deletions

View File

@ -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 */

View File

@ -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;