mirror of https://github.com/thesofproject/sof.git
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:
parent
680798071e
commit
3e24ac8e9f
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue