diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c index 02b32a5943..08ce002ea0 100644 --- a/drivers/audio/cxd56.c +++ b/drivers/audio/cxd56.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "cxd56.h" @@ -161,7 +162,6 @@ #define CXD56_DMA_SMP_WAIT_HIRES 10 /* usec per sample. */ #define CXD56_DMA_SMP_WAIT_NORMALT 40 /* usec per sample. */ #define CXD56_DMA_CMD_FIFO_NOT_FULL 1 -#define CXD56_DMA_START_ADDR_MASK 0x3fffffff /**************************************************************************** * Public Function Prototypes @@ -3224,11 +3224,11 @@ static int cxd56_start_dma(FAR struct cxd56_dev_s *dev) #ifdef CONFIG_AUDIO_CXD56_SRC src_apb = (struct ap_buffer_s *) dq_peek(&dev->down_pendq); - addr = ((uint32_t)src_apb->samp) & CXD56_DMA_START_ADDR_MASK; + addr = CXD56_PHYSADDR(src_apb->samp); size = (src_apb->nbytes / (dev->bitwidth / 8) / dev->channels) - 1; #else apb = (struct ap_buffer_s *) dq_peek(&dev->up_pendq); - addr = ((uint32_t)apb->samp) & CXD56_DMA_START_ADDR_MASK; + addr = CXD56_PHYSADDR(apb->samp); size = (apb->nbytes / (dev->bitwidth / 8) / dev->channels) - 1; #endif