lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 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.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 11 | #include <linux/volte_drv.h> |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 12 | |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 13 | #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.li | 7ccf837 | 2024-03-07 00:08:02 -0800 | [diff] [blame] | 18 | #define VOICE_DEV_NAME "/dev/voice_device" |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 19 | |
| 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.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 32 | #ifdef _USE_VOICE_ALSA |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 33 | int alsa_voice_open(int vmode); |
| 34 | int 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; |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 53 | 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.huang | 16c52a1 | 2024-08-06 17:50:47 +0800 | [diff] [blame^] | 58 | int voice_SetVoiceProcess(int *vp); |
| 59 | int voice_GetVoiceProcess(void); |
| 60 | |
| 61 | |
xf.li | e31de8b | 2023-12-26 23:38:58 -0800 | [diff] [blame] | 62 | |
| 63 | #ifdef _VBUFF_IN_SINGLE_CORE |
| 64 | int vbuffer_stream_start(void); |
| 65 | int vbuffer_stream_stop(void); |
| 66 | #endif |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 67 | |
| 68 | #endif |