audio: add audio_dma device driver.

Signed-off-by: ZhongAn <zhongan@pinecone.net>
This commit is contained in:
ZhongAn
2018-06-25 20:22:32 +08:00
committed by Xiang Xiao
parent 72783209a3
commit 7eeba71366
4 changed files with 664 additions and 0 deletions
+6
View File
@@ -492,4 +492,10 @@ config AUDIO_I2S
depends on AUDIO
depends on I2S
config AUDIO_DMA
bool "Audio DMA"
select AUDIO_DRIVER_SPECIFIC_BUFFERS
depends on AUDIO
depends on DMA
endif # DRIVERS_AUDIO
+4
View File
@@ -93,6 +93,10 @@ ifeq ($(CONFIG_AUDIO_I2S),y)
CSRCS += audio_i2s.c
endif
ifeq ($(CONFIG_AUDIO_DMA),y)
CSRCS += audio_dma.c
endif
# Include Audio driver support
DEPPATH += --dep-path audio
File diff suppressed because it is too large Load Diff
+41
View File
@@ -0,0 +1,41 @@
/****************************************************************************
* include/nuttx/audio/audio_dma.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_AUDIO_AUDIO_DMA_H
#define __INCLUDE_NUTTX_AUDIO_AUDIO_DMA_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/audio/audio.h>
#include <nuttx/dma/dma.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
struct audio_lowerhalf_s *audio_dma_initialize(struct dma_dev_s *dma_dev,
uint8_t chan_num,
bool playback,
uint8_t fifo_width,
uintptr_t fifo_addr);
#endif