blob: 2238b6b2eaeb77591e4eb8970d8d2ab7db609e0d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
2/*
3 * Copyright (C) 2019 ZTE, China
4 *
5 * This is the header file for the voice lib.
6 *
7 */
8
9#ifndef __VOICE_LIB_H
10#define __VOICE_LIB_H
xf.libdd93d52023-05-12 07:10:14 -070011#include <linux/volte_drv.h>
lh9ed821d2023-04-07 01:36:19 -070012
xf.libdd93d52023-05-12 07:10:14 -070013#define AVOICE_TEAK_2G_3G_DEV_NUM 2
14#define AVOICE_SOFT_3G_DEV_NUM 4
15#define AVOICE_4G_DEV_NUM 1
16#define AVOICE_5G_DEV_NUM 1
17
xf.li7ccf8372024-03-07 00:08:02 -080018#define VOICE_DEV_NAME "/dev/voice_device"
xf.libdd93d52023-05-12 07:10:14 -070019
20
21 typedef enum
22 {
23 AVOICE_TEAK_2G_3G = 0,
24 AVOICE_SOFT_3G_NB,
25 AVOICE_SOFT_3G_WB,
26 AVOICE_4G_NB,
27 AVOICE_4G_WB,
28 AVOICE_5G_NB,
29 AVOICE_5G_WB,
30 MAX_AVOICE_MODE
31 }T_Alsa_Voice_Mode;
xf.li742dd022023-06-08 01:43:32 -070032#ifdef _USE_VOICE_ALSA
xf.libdd93d52023-05-12 07:10:14 -070033int alsa_voice_open(int vmode);
34int alsa_voice_close(int vmode);
35
36
37#endif
38
39 /* Voice process channel selection. */
40 typedef enum
41 {
42 VP_PATH_HANDSET = 0,
43 VP_PATH_SPEAKER,
44 VP_PATH_HEADSET,
45 VP_PATH_BLUETOOTH,
46 VP_PATH_BLUETOOTH_NO_NR,
47 VP_PATH_HSANDSPK,
48
49 VP_PATH_OFF = 255,
50
51 MAX_VP_PATH = VP_PATH_OFF
52 } T_ZDrv_VpPath;
lh9ed821d2023-04-07 01:36:19 -070053 int voice_close(T_Voice_Para *para);
54 int voice_open(T_Voice_Para *para);
55 int voice_Vploop(int *path);
56 int zDrvVolte_PreOpen(T_ZDrvVolte_Cfg *cfgParam);
57 void zDrvVolte_PreClose(void);
q.huang16c52a12024-08-06 17:50:47 +080058 int voice_SetVoiceProcess(int *vp);
59 int voice_GetVoiceProcess(void);
60
61
xf.lie31de8b2023-12-26 23:38:58 -080062
63#ifdef _VBUFF_IN_SINGLE_CORE
64 int vbuffer_stream_start(void);
65 int vbuffer_stream_stop(void);
66#endif
lh9ed821d2023-04-07 01:36:19 -070067
68#endif