mirror of https://github.com/thesofproject/sof.git
comp: use comp_sample_bytes() to set DMA transfer size.
Use comp_sample_bytes() to set DMA transfer size in DAI component and comment why host always copies using word size transfers. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
094153aece
commit
c3a01f209b
|
@ -264,8 +264,8 @@ static int dai_playback_params(struct comp_dev *dev)
|
|||
|
||||
/* set up DMA configuration */
|
||||
config->direction = DMA_DIR_MEM_TO_DEV;
|
||||
config->src_width = sizeof(uint32_t);
|
||||
config->dest_width = sizeof(uint32_t);
|
||||
config->src_width = comp_sample_bytes(dev);
|
||||
config->dest_width = comp_sample_bytes(dev);
|
||||
config->cyclic = 1;
|
||||
config->dest_dev = dd->dai->plat_data.fifo[0].handshake;
|
||||
|
||||
|
@ -331,8 +331,8 @@ static int dai_capture_params(struct comp_dev *dev)
|
|||
|
||||
/* set up DMA configuration */
|
||||
config->direction = DMA_DIR_DEV_TO_MEM;
|
||||
config->src_width = sizeof(uint32_t);
|
||||
config->dest_width = sizeof(uint32_t);
|
||||
config->src_width = comp_sample_bytes(dev);
|
||||
config->dest_width = comp_sample_bytes(dev);
|
||||
config->cyclic = 1;
|
||||
config->src_dev = dd->dai->plat_data.fifo[1].handshake;
|
||||
|
||||
|
|
|
@ -441,7 +441,8 @@ static int host_params(struct comp_dev *dev)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* set up DMA configuration */
|
||||
/* set up DMA configuration - copy in words for all formats as
|
||||
this is most optimal for memory <-> memory copies. */
|
||||
config->src_width = sizeof(uint32_t);
|
||||
config->dest_width = sizeof(uint32_t);
|
||||
config->cyclic = 0;
|
||||
|
|
Loading…
Reference in New Issue