📄 audiodriver.h
字号:
/*********************************************************************************
Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved.
This software is proprietary and confidential. By using this software you agree
to the terms of the associated Analog Devices License Agreement.
*********************************************************************************/
#ifndef __BSP_AUDIODRIVER_H__
#define __BSP_AUDIODRIVER_H__
/*********************************************************************
Include files
*********************************************************************/
#include <stdio.h>
#include <services\services.h>
#include <drivers\adi_dev.h>
#include "adi_AudioEZExtender.h"
// switch for enabling separate interrupt thread to handle input audio data
#define SEPARATE_THREAD_FOR_RENDER 1 // 1: YES, 0: NO
// Power manager specific definition of platform configuration
#if defined(__ADSP_BF533__)
#define PWR_MANGER_EZKIT_PRESET ADI_PWR_EZKIT_BF533_600MHZ
#elif defined(__ADSP_BF537__)
#define PWR_MANGER_EZKIT_PRESET ADI_PWR_EZKIT_BF537_600MHZ
#elif defined(__ADSP_BF561__)
#define PWR_MANGER_EZKIT_PRESET 0
#else
#define PWR_MANGER_EZKIT_PRESET 0
#endif
#if (SEPARATE_THREAD_FOR_RENDER)
// IVG level for rendering function
#define USER_ISR0 14 // use software interrupt 0
#endif
/*********************************************************************
Audio EZ-Extender TDM 8 channel per codec mode
*********************************************************************/
// number of TDM channel
#define TDM_CHANNELS 8
// channel layout for 8 channel TDM
#define INTERNAL_ADC_L1 0
#define INTERNAL_ADC_R1 2
#define INTERNAL_ADC_L2 4
#define INTERNAL_ADC_R2 6
#define INTERNAL_ADC_L3 1
#define INTERNAL_ADC_R3 3
#define INTERNAL_ADC_L4 5
#define INTERNAL_ADC_R4 7
#define INTERNAL_DAC_L1 0
#define INTERNAL_DAC_R1 2
#define INTERNAL_DAC_L2 4
#define INTERNAL_DAC_R2 6
#define INTERNAL_DAC_L3 8
#define INTERNAL_DAC_R3 10
#define INTERNAL_DAC_L4 12
#define INTERNAL_DAC_R4 14
#define INTERNAL_DAC_L5 1
#define INTERNAL_DAC_R5 3
#define INTERNAL_DAC_L6 5
#define INTERNAL_DAC_R6 7
#define INTERNAL_DAC_L7 9
#define INTERNAL_DAC_R7 11
#define INTERNAL_DAC_L8 13
#define INTERNAL_DAC_R8 15
#if (ADAV801_SUPPORT)
// TDM(AUX) mode specific digital channel layout
#define INTERNAL_SPDIF_IN_L 8
#define INTERNAL_SPDIF_IN_R 10
// WRONG - DO NOT USE
#define INTERNAL_SPDIF_OUT_L 8
#define INTERNAL_SPDIF_OUT_R 10
#endif
//=================================================
// Audio Driver specific
// number of samples per SPORT/DMA frame
#define TICK_SAMPLE_SIZE 32 // arbitrary number for DMA transfer size
// DMA frame size including primary/secondary
#define TDM_FRAME_SIZE (TDM_CHANNELS * 2) // TDM_CHANNELS is number of TDM slots per Analog CODEC
// number of actually used input channels
#define VALID_INPUT_CHANNEL_SIZE (8) // 8 analog input
// number of actually used output channels
#define VALID_OUTPUT_CHANNEL_SIZE (16) // 16 analog output
/*********************************************************************
Exported buffers
*********************************************************************/
// pointer array that contains base channel pointers of iDACdata for the transmit buffer
extern int* pOutputSampleBasePtr[];
// pointer array that contains base channel pointers of iADCdata for the receive buffer
extern int* pInputSampleBasePtr[];
// single processing buffer for DSP modules
extern int ProcessingBuffer[VALID_OUTPUT_CHANNEL_SIZE][];
/*********************************************************************
*
* Exported Functions
*
*********************************************************************/
extern void Close_Audio(void);
extern void Init_Audio(void);
#endif // __BSP_AUDIODRIVER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -