summaryrefslogtreecommitdiffstats
path: root/sound.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-12-23 03:34:36 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-12-23 03:34:36 +0100
commitcb1ef99cc1a4902a00eed54e3dfb6ea5df90ab6f (patch)
tree37d88ee5de08df68e9f26ac464ab12b3e340a1c8 /sound.c
parent03b0ce0227a81087f00bb267edf2824eb34b139e (diff)
downloadhardware_ril_samsung-ril-cb1ef99cc1a4902a00eed54e3dfb6ea5df90ab6f.zip
hardware_ril_samsung-ril-cb1ef99cc1a4902a00eed54e3dfb6ea5df90ab6f.tar.gz
hardware_ril_samsung-ril-cb1ef99cc1a4902a00eed54e3dfb6ea5df90ab6f.tar.bz2
samsung-ril-socket: mic mute implementation
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'sound.c')
-rw-r--r--sound.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sound.c b/sound.c
index 22601b3..5c23023 100644
--- a/sound.c
+++ b/sound.c
@@ -116,6 +116,27 @@ complete:
return rc;
}
+int srs_snd_set_mic_mute(struct srs_message *message)
+{
+ struct ipc_snd_mic_mute_ctrl_data request_data;
+ struct srs_snd_mic_mute_data *data;
+ int rc;
+
+ if (message == NULL || message->data == NULL || message->size < sizeof(struct srs_snd_mic_mute_data))
+ return -1;
+
+ data = (struct srs_snd_mic_mute_data *) message->data;
+
+ memset(&request_data, 0, sizeof(request_data));
+ request_data.mute = !!(data->mute);
+
+ rc = ipc_fmt_send(ipc_fmt_seq(), IPC_SND_MIC_MUTE_CTRL, IPC_TYPE_SET, (void *) &request_data, sizeof(request_data));
+ if (rc < 0)
+ return 0;
+
+ return 0;
+}
+
int srs_snd_set_call_audio_path(struct srs_message *message)
{
struct ipc_snd_audio_path_ctrl_data request_data;