drivers: audio: Apply CXD56_PHYSADDR to cxd56.c
Summary: - This commit converts data to the physical address for DMA transfer. Impact: - cxd56.c only Testing - Tested with nxplayer and nxrecorder Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
2fc6361231
commit
822002d347
@ -40,6 +40,7 @@
|
|||||||
#include <arch/board/cxd56_clock.h>
|
#include <arch/board/cxd56_clock.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <arch/chip/audio.h>
|
#include <arch/chip/audio.h>
|
||||||
|
#include <arch/chip/chip.h>
|
||||||
|
|
||||||
#include "cxd56.h"
|
#include "cxd56.h"
|
||||||
|
|
||||||
@ -161,7 +162,6 @@
|
|||||||
#define CXD56_DMA_SMP_WAIT_HIRES 10 /* usec per sample. */
|
#define CXD56_DMA_SMP_WAIT_HIRES 10 /* usec per sample. */
|
||||||
#define CXD56_DMA_SMP_WAIT_NORMALT 40 /* usec per sample. */
|
#define CXD56_DMA_SMP_WAIT_NORMALT 40 /* usec per sample. */
|
||||||
#define CXD56_DMA_CMD_FIFO_NOT_FULL 1
|
#define CXD56_DMA_CMD_FIFO_NOT_FULL 1
|
||||||
#define CXD56_DMA_START_ADDR_MASK 0x3fffffff
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
@ -3224,11 +3224,11 @@ static int cxd56_start_dma(FAR struct cxd56_dev_s *dev)
|
|||||||
|
|
||||||
#ifdef CONFIG_AUDIO_CXD56_SRC
|
#ifdef CONFIG_AUDIO_CXD56_SRC
|
||||||
src_apb = (struct ap_buffer_s *) dq_peek(&dev->down_pendq);
|
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;
|
size = (src_apb->nbytes / (dev->bitwidth / 8) / dev->channels) - 1;
|
||||||
#else
|
#else
|
||||||
apb = (struct ap_buffer_s *) dq_peek(&dev->up_pendq);
|
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;
|
size = (apb->nbytes / (dev->bitwidth / 8) / dev->channels) - 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user