summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-01-10 22:18:33 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-01-10 22:18:33 +0100
commit24bf4db81b4673a6c9f9695043179f07bde7cc56 (patch)
tree4d1cdd4cf0c2727a84133a9fdcdb04c7a9651d81
parent564cb0a1b855281c36c8cb84c17e53321a7d913f (diff)
downloaddevice_samsung_galaxys2-common-24bf4db81b4673a6c9f9695043179f07bde7cc56.zip
device_samsung_galaxys2-common-24bf4db81b4673a6c9f9695043179f07bde7cc56.tar.gz
device_samsung_galaxys2-common-24bf4db81b4673a6c9f9695043179f07bde7cc56.tar.bz2
Audio-RIL-Interface: implement mic_mute
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--audio-ril-interface/audio-ril-interface.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/audio-ril-interface/audio-ril-interface.c b/audio-ril-interface/audio-ril-interface.c
index 9ba2d0c..1ff01ae 100644
--- a/audio-ril-interface/audio-ril-interface.c
+++ b/audio-ril-interface/audio-ril-interface.c
@@ -26,8 +26,25 @@
#include <samsung-ril-socket.h>
#include <srs-client.h>
-int galaxys2_mic_mute(void *pdata, int mute)
+int galaxys2_mic_mute(void *pdata, 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__, pdata, mute);
+
+ if (pdata == NULL)
+ return -1;
+
+ client = (struct srs_client *) pdata;
+
+ 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 -1;
+
return 0;
}