From 7e9086dc9b3f58f850bfe210251ea35f85eec0e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Wed, 22 Feb 2017 13:42:40 +0100 Subject: audio-ril-interface: mic mute implementation Signed-off-by: Wolfgang Wiedmeyer --- audio-ril-interface/audio-ril-interface.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'audio-ril-interface') diff --git a/audio-ril-interface/audio-ril-interface.c b/audio-ril-interface/audio-ril-interface.c index 6170c63..2c0f781 100644 --- a/audio-ril-interface/audio-ril-interface.c +++ b/audio-ril-interface/audio-ril-interface.c @@ -172,6 +172,28 @@ int SetCallAudioPath(void *data, enum ril_audio_path path) return RIL_CLIENT_ERR_SUCCESS; } +int SetMute(void *data, enum ril_mic_mute mute) +{ + struct srs_client *client; + struct srs_snd_mic_mute_data mic_mute_state; + int rc; + + ALOGD("%s(%p, %d)", __func__, data, mute); + + if (data == NULL) + return RIL_CLIENT_ERR_INVAL; + + client = (struct srs_client *) data; + + mic_mute_state.mute = mute; + + rc = srs_client_send(client, SRS_SND_SET_MIC_MUTE, &mic_mute_state, sizeof(mic_mute_state)); + if (rc < 0) + return RIL_CLIENT_ERR_UNKNOWN; + + return RIL_CLIENT_ERR_SUCCESS; +} + int SetCallClockSync(void *data, enum ril_clock_state condition) { struct srs_client *client; -- cgit v1.1