mirror of https://github.com/thesofproject/sof.git
dma: add DMA_ATTR_COPY_ALIGNMENT to dma attributes
Add DMA_ATTR_COPY_ALIGNMENT attribute in order to retrieve the smallest possible chunk of data that can be copied by dma. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
parent
83b19454dd
commit
ed1c9164f9
|
@ -1342,6 +1342,9 @@ static int dw_dma_get_attribute(struct dma *dma, uint32_t type,
|
|||
case DMA_ATTR_BUFFER_ALIGNMENT:
|
||||
*value = DW_DMA_BUFFER_ALIGNMENT;
|
||||
break;
|
||||
case DMA_ATTR_COPY_ALIGNMENT:
|
||||
*value = DW_DMA_COPY_ALIGNMENT;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
|
|
@ -959,6 +959,9 @@ static int hda_dma_get_attribute(struct dma *dma, uint32_t type,
|
|||
case DMA_ATTR_BUFFER_ALIGNMENT:
|
||||
*value = PLATFORM_HDA_BUFFER_ALIGNMENT;
|
||||
break;
|
||||
case DMA_ATTR_COPY_ALIGNMENT:
|
||||
*value = PLATFORM_HDA_COPY_ALIGNMENT;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
|
|
@ -81,6 +81,7 @@ enum dma_cb_status {
|
|||
|
||||
/* DMA attributes */
|
||||
#define DMA_ATTR_BUFFER_ALIGNMENT 0
|
||||
#define DMA_ATTR_COPY_ALIGNMENT 1
|
||||
|
||||
struct dma;
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@
|
|||
trace_error(TRACE_CLASS_DMA, __e, ##__VA_ARGS__)
|
||||
|
||||
#define DW_DMA_BUFFER_ALIGNMENT 0x20
|
||||
#define DW_DMA_COPY_ALIGNMENT 0x20
|
||||
|
||||
/* TODO: add FIFO sizes */
|
||||
struct dw_chan_data {
|
||||
|
|
|
@ -44,6 +44,7 @@ struct sof;
|
|||
|
||||
/* DGMBS align value */
|
||||
#define PLATFORM_HDA_BUFFER_ALIGNMENT 0x20
|
||||
#define PLATFORM_HDA_COPY_ALIGNMENT 0x20
|
||||
|
||||
/* HD-DMA single burst size */
|
||||
#define PLATFORM_HDA_BURST_SIZE 32
|
||||
|
|
|
@ -54,6 +54,7 @@ struct sof;
|
|||
|
||||
/* DGMBS align value */
|
||||
#define PLATFORM_HDA_BUFFER_ALIGNMENT 0x20
|
||||
#define PLATFORM_HDA_COPY_ALIGNMENT 0x20
|
||||
|
||||
/* HD-DMA single burst size */
|
||||
#define PLATFORM_HDA_BURST_SIZE 32
|
||||
|
|
|
@ -54,6 +54,7 @@ struct sof;
|
|||
|
||||
/* DGMBS align value */
|
||||
#define PLATFORM_HDA_BUFFER_ALIGNMENT 0x20
|
||||
#define PLATFORM_HDA_COPY_ALIGNMENT 0x20
|
||||
|
||||
/* HD-DMA single burst size */
|
||||
#define PLATFORM_HDA_BURST_SIZE 32
|
||||
|
|
|
@ -54,6 +54,7 @@ struct sof;
|
|||
|
||||
/* DGMBS align value */
|
||||
#define PLATFORM_HDA_BUFFER_ALIGNMENT 0x20
|
||||
#define PLATFORM_HDA_COPY_ALIGNMENT 0x20
|
||||
|
||||
/* HD-DMA single burst size */
|
||||
#define PLATFORM_HDA_BURST_SIZE 32
|
||||
|
|
Loading…
Reference in New Issue