[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/include/audio_res_ctrl.h b/ap/app/include/audio_res_ctrl.h
new file mode 100755
index 0000000..74914a3
--- /dev/null
+++ b/ap/app/include/audio_res_ctrl.h
@@ -0,0 +1,86 @@
+/**
+* @File: codec_res_main_ctrl.h
+* @Brief: Implementation of Device Manager in Sanechips
+*
+* Copyright (C) 2017 Sanechips Technology Co., Ltd.
+* @Author: sun.quan@zte.com.cn
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation.
+* */
+#ifndef _AUDIO_RES_CTRL_
+#define _AUDIO_RES_CTRL_
+/*******************************************************************************
+ * Í·Îļþ *
+ ******************************************************************************/
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+
+/*******************************************************************************
+ * ºê¶¨Òå *
+ ******************************************************************************/
+//#define MODULE_ID_CODEC 0
+
+/*******************************************************************************
+ * Êý¾ÝÀàÐͶ¨Òå *
+ ******************************************************************************/
+
+enum audio_type {
+ VOICE_23G = 0,
+ VOICE_VOLTE,
+ POC,
+ ZCORE,
+};
+
+enum audio_msg_type {
+ USE_AUDIO_REQ = 0, //¹©ÒµÎñÄ£¿éÉêÇëʹÓÃȨ
+ USE_AUDIO_RSP, //ÏûÏ¢µÚÒ»¸ö²ÎÊýָʾÉêÇë³É¹¦»¹ÊÇʧ°Ü£¬µÚ¶þ¸ö²ÎÊýָʾµ±Ç°Ê¹ÓõÄÒµÎñ
+ REL_AUDIO_REQ, //¹©Ö÷¿ØÇëÇóijҵÎñÄ£¿éÊÍ·ÅÕýÔÚ½øÐеÄAUDIOʹÓÃȨ
+ REL_AUDIO_IND, //ÇëÇóijҵÎñÄ£¿éÊÍ·ÅaudioµÄ½á¹ûÓ¦´ð£¬Èôʧ°Ü£¬¶ÏÑÔ£»»»ÑÔÖ®£¬±ØÐë³É¹¦
+ IDLE_AUDIO_INFO //Ö÷¿ØÍ¨ÖªËùÓÐÉêÇë¹ýAUDIO×ÊÔ´µÄÒµÎñÄ£¿é£¬¸æÖªµ±Ç°¿ÕÏУ¬ÒÔ½â¾öÒµÎñÄ£¿é´¦ÓÚ¹ÒÆð̬»ò֮ǰ±»Ç¿ÐÐÊͷŵÄÒµÎñÄ£¿é£¬ÈçMP3ÒôÀÖ²¥·ÅµÈ£»
+};
+
+
+typedef struct {
+ int type; //ָʾÉêÇëµÄ¾ßÌåÒµÎñÀàÐÍ
+ int moduleId; //ÉêÇëµÄÄ£¿éºÅ
+ int tempModuleId;
+} T_audio_UseReq;
+
+typedef struct {
+ int result; //ָʾÉêÇëµÄ½á¹û£¬0±íʾ³É¹¦£¬1±íʾʧ°Ü
+ int type; //ָʾÉêÇëµÄ¾ßÌåÒµÎñÀàÐÍ
+ int using_type; //ָʾµ±Ç°ÕýÔÚʹÓõÄÒµÎñÀàÐÍ£¬Ê§°Üʱ¹©¾ßÌåÒµÎñÄ£¿é²éѯʹÓÃ
+} T_audio_UseRsp;
+
+typedef struct {
+ int using_type; //ָʾµ±Ç°Äĸö¸ßÓÅÏȼ¶ÒµÎñÄ£¿éÔÚÉêÇë×ÊÔ´
+ int mouleId; //Ä£¿éµÄid
+} T_audio_RelReq;
+
+typedef struct {
+ int result; //ָʾÉêÇëµÄ½á¹û£¬0±íʾ³É¹¦£¬1±íʾʧ°Ü
+ int type; //ָʾÊÍ·Å¿ØÖÆÈ¨µÄÒµÎñ
+ int moduleId; //ÊÍ·Å¿ØÖÆÈ¨µÄÄ£¿éid
+} T_audio_RelInd;
+
+
+/* Ó¦ÓÃÇëÇócodec×ÊÔ´²ÎÊý */
+typedef struct audioResRequest
+{
+ int moduleId; /* ÒµÎñÄ£¿éºÅ */
+ int tempMouduleId; /* ÉêÇë×ÊÔ´µÄ½ÓÊÜÏûÏ¢ÁÙʱId */
+ int audioType; /* ÒµÎñÀàÐÍ */
+}T_audio_Res_Request;
+/**
+ *º¯Êý˵Ã÷£ºÇëÇóʹÓÃcodec×ÊÔ´£¬µÈ´ýcodecÖ÷¿Ø»Ø¸´
+ *@param : Ó¦ÓÃÇëÇóµÄ²ÎÊý
+ *
+ */
+BOOL audio_resource_request(struct audioResRequest *param, T_audio_UseRsp *RspData);
+#endif