blob: abe83b2f845dbb305dd47bd0a40ef4735f1adbf3 [file] [log] [blame]
#ifdef USE_CAP_SUPPORT
#define VOICEIPC_OK 0
#define VOICEIPC_ERROR -1
#define VOICE_WAIT_MSG_FROM_CAP -2 //waitting msg from cap
#define VOICE_IPC_CONTROL_CHANNEL "/dev/rpmsg6"
#define VOICE_IPC_CONTROL_CHANNEL_SIZE 256
#define VOICE_HEAD_LEN (2 * sizeof(int))
#define VOICE_CONTROL_MAX_LEN 32
enum voice_ipc_func_type {
IPC_SET_VOICE_DEVICE_MODE = 0,
IPC_GET_VOICE_DEVICE_MODE = 1,
IPC_SET_RX_VOICE_VOL = 2,
IPC_GET_RX_VOICE_VOL = 3,
IPC_SET_TX_VOICE_VOL = 4,
IPC_GET_TX_VOICE_VOL = 5,
IPC_SET_TX_VOICE_MUTE_STATE = 6,
IPC_GET_TX_VOICE_MUTE_STATE = 7,
IPC_SET_RX_VOICE_MUTE_STATE = 8,
IPC_GET_RX_VOICE_MUTE_STATE = 9,
IPC_SET_LOOPBACK_ENABLE_STATE = 10,
IPC_GET_LOOPBACK_ENABLE_STATE = 11,
IPC_VOICE_FUNC_MAX
};
typedef struct {
int func_id;
int param_len;
unsigned char param[VOICE_CONTROL_MAX_LEN];
}voice_ipc_control_msg;
int voice_ipc_init(void);
void Voice_Ctrl_Rpmsg_Recv(void);
void ipc_set_voice_device_mode(voice_ipc_control_msg msg);
void ipc_get_voice_device_mode(voice_ipc_control_msg msg);
void ipc_set_rx_voice_vol(voice_ipc_control_msg msg);
void ipc_get_rx_voice_vol(voice_ipc_control_msg msg);
void ipc_set_tx_voice_vol(voice_ipc_control_msg msg);
void ipc_get_tx_voice_vol(voice_ipc_control_msg msg);
void ipc_set_tx_voice_mute_state(voice_ipc_control_msg msg);
void ipc_get_tx_voice_mute_state(voice_ipc_control_msg msg);
void ipc_set_rx_voice_mute_state(voice_ipc_control_msg msg);
void ipc_get_rx_voice_mute_state(voice_ipc_control_msg msg);
void ipc_set_loopback_enable_state(voice_ipc_control_msg msg);
void ipc_get_loopback_enable_state(voice_ipc_control_msg msg);
#endif