#include "board.h" #include "os_adapt.h" #include "FreeRTOS.h" #include "soc-dai.h" #include #include #define MAX_CODEC_NUM 4 static struct codec_register_inf codec_tab[MAX_CODEC_NUM] = {0}; static int codec_count = 0; extern void es7243e_init(void); extern void es8156_init(void); int audio_codec_register(struct codec_register_inf codec_reg_info) { if (codec_count < MAX_CODEC_NUM) { codec_tab[codec_count++] = codec_reg_info; } else { printf("%s, failed to register the codec!\n", __func__); return -1; } return 0; } struct codec_register_inf *get_codec_register_inf(const char *name) { int i; if (!name) { printf("%s, name null !\n", __func__); return NULL; } for (i=0; i