• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Bestechnic (Shanghai) Co., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __APP_MIC_H__
16 #define __APP_MIC_H__
17 
18 #include <stdio.h>
19 #include <assert.h>
20 
21 #include "cmsis_os.h"
22 #include "tgt_hardware.h"
23 #include "hal_uart.h"
24 #include "hal_timer.h"
25 #include "audioflinger.h"
26 #include "hal_trace.h"
27 #include "app_bt_stream.h"
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include "plat_types.h"
33 
34 typedef enum {
35 	MIC_APP_NONE,
36 	MIC_APP_SOC_CALL,
37 	MIC_APP_SPEECH_RECO,
38 	MIC_APP_CSPOTTER,
39 	MIC_APP_MICRECORD,
40 	MIC_APP_OTHER,
41 	MIC_APP_MAX,
42 }MIC_APP_TYPE;
43 
44 void app_mic_init();
45 
46 bool app_mic_start(MIC_APP_TYPE mic_type);
47 
48 bool app_mic_stop(MIC_APP_TYPE mic_type);
49 
50 int app_mic_register(MIC_APP_TYPE mic_type, struct AF_STREAM_CONFIG_T *newStream);
51 
52 int app_mic_deregister(MIC_APP_TYPE mic_type);
53 
54 bool app_mic_is_registed(MIC_APP_TYPE mic_type);
55 
56 void app_mic_check(MIC_APP_TYPE mic_type);
57 
58 MIC_APP_TYPE app_mic_status(void);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif//__APP_MIC_H__
65