diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-12-23 03:34:36 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-12-23 03:34:36 +0100 |
commit | cb1ef99cc1a4902a00eed54e3dfb6ea5df90ab6f (patch) | |
tree | 37d88ee5de08df68e9f26ac464ab12b3e340a1c8 /sound.c | |
parent | 03b0ce0227a81087f00bb267edf2824eb34b139e (diff) | |
download | hardware_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.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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; |