/*
|
* board.h
|
*
|
* Created on: 2021Äê9ÔÂ1ÈÕ
|
* Author: graydon
|
*/
|
|
#ifndef DRV_BOARD_H_
|
#define DRV_BOARD_H_
|
|
#ifdef __cplusplus
|
extern "C" {
|
#endif
|
|
#include "typedefs.h"
|
//#include "sru_dai.h"
|
//#include "protocol.h"
|
#define NUM_SAMPLES 64
|
struct SportDef{
|
short spid;
|
short enable;
|
short enable_sec;
|
short interrupt;
|
|
//clock config.
|
short rx; //rx or tx.
|
short opmode; //0-tdm ,1 - IIS mode
|
short clke; //0-Clock falling edge sample.,1-Clock rising edge sample
|
short lfs; //0-active high Frame sync ,1- Active-Low Frame Sync
|
|
short mfd; //Frame Delay.
|
short slots;
|
short vld_a; //valid channel.
|
short vld_b;
|
};
|
|
//for PCG A B C D.
|
struct PCGDef{
|
short enable;
|
|
short opmode ; //0-iis, 1 -tdm.
|
|
//invert clock input, only in bypass mode. when fs_div = 0 is in bypass mode.
|
short invert;
|
/*sets the number of input clock periods for which the
|
frame sync output is high. Pulse width should be less than the divisor of the frame
|
sync*/
|
short width;
|
|
|
short sclk_div;
|
//0 or 1: PCG is in bypass mode
|
short fs_div;
|
};
|
|
|
struct SRCDef{
|
short enable;
|
short format ; //0-left-justified ,1-iis,2-tdm,3-right justified.
|
short wordLen; //0-24bit,1-16bit.
|
short Deemphasis; //De-emphasis Filter
|
};
|
|
//struct RouteDef{
|
// SourceSignal source;
|
// DestSignal dest;
|
//};
|
|
typedef struct{
|
short dual_dsp;
|
short dsp_index;
|
short local_rx_num;
|
short local_tx_num;
|
short dante_rx_num;
|
short dante_tx_num;
|
|
short external_clock;
|
short scene_size ; //dsp reply
|
short level_num;
|
short modulelist;
|
//short hardware_type;
|
}tag_hwconf,*ptag_hwconf;
|
|
//struct DSPConfig{
|
// unsigned short mDualDsp;
|
// unsigned short mDspIndex;
|
// unsigned short mLocalRxNum;
|
// unsigned short mLocalTxNum;
|
// unsigned short mDanteRxNum;
|
// unsigned short mDanteTxNum;
|
//
|
// unsigned short mConvertUnit; //ת»»µ¥Î», DSPĬÈÏÊÇÌî0-dBFS£¬×ª»»µ½ÆäËûµ¥Î»£¬Ðè¼ÓÉÏ»ò¼õÈ¥¶àÉÙ
|
// unsigned short pad[5];
|
//
|
// unsigned short mRouteNum;
|
// unsigned short mSampleNum;
|
//
|
// unsigned short mSampleRateL;
|
// unsigned short mSampleRateH;
|
//
|
// struct SportDef sports[8];
|
// struct PCGDef pcgs[4];
|
// struct RouteDef routes[128]; //variable
|
// struct SRCDef srcs[4];
|
//};
|
|
void pinmux_config(void);
|
|
void Audio_Config(void);
|
|
void DAI_config(void);
|
|
//void RouteConfig(struct RouteDef* items, u32 nItems);
|
//void SportsConfig(struct SportDef sports[8]);
|
//void PCGsConfig(struct PCGDef pcgs[4]);
|
//void SRCsConfig(struct SRCDef src[4]);
|
#ifdef __cplusplus
|
}
|
#endif
|
#endif /* DRV_BOARD_H_ */
|