summaryrefslogtreecommitdiffstats
path: root/tinyalsa_audio/audio_ril_interface.c
diff options
context:
space:
mode:
authorCaio Schnepper <caioschnepper@gmail.com>2015-05-01 23:55:43 -0300
committerCaio Schnepper <caioschnepper@gmail.com>2015-05-28 18:29:17 -0300
commitecc3d13410f7821659f7cc1ef806dfb9378853a3 (patch)
tree6861390f0f9cdda0429aaa2b0252137a675eb85b /tinyalsa_audio/audio_ril_interface.c
parente3591e7a641044f28598dfe628c4e0d46d3d7435 (diff)
downloaddevice_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.zip
device_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.tar.gz
device_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.tar.bz2
galaxys2: initial L bringup
Change-Id: Ia356da8437917be3355eba59c1df3943bb33f905
Diffstat (limited to 'tinyalsa_audio/audio_ril_interface.c')
-rw-r--r--tinyalsa_audio/audio_ril_interface.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/tinyalsa_audio/audio_ril_interface.c b/tinyalsa_audio/audio_ril_interface.c
index 2fc14c5..2f88d14 100644
--- a/tinyalsa_audio/audio_ril_interface.c
+++ b/tinyalsa_audio/audio_ril_interface.c
@@ -44,6 +44,7 @@ int (*_ril_set_call_volume)(void *, enum ril_sound_type, int);
int (*_ril_set_call_audio_path)(void *, enum ril_audio_path);
int (*_ril_set_call_clock_sync)(void *, enum ril_clock_state);
int (*_ril_set_call_twomic)(void *, enum ril_twomic_device, enum ril_twomic_enable);
+int (*_ril_set_mic_mute)(void *, enum ril_mic_mute);
int (*_ril_register_unsolicited_handler)(void *, int, void *);
int (*_ril_get_wb_amr)(void *, void *);
@@ -71,16 +72,6 @@ static int audio_ril_interface_connect_if_required(struct tinyalsa_audio_ril_int
return 0;
}
-int audio_ril_interface_set_mic_mute(struct tinyalsa_audio_ril_interface *ril_interface, bool state)
-{
- /*
- * If you look at the Replicant libaudio-ril-interface
- * this function is just stubbed out there. So let's not
- * bother with it
- */
- return 0;
-
-}
int audio_ril_interface_set_voice_volume(struct tinyalsa_audio_ril_interface *ril_interface,
audio_devices_t device, float volume)
@@ -212,6 +203,15 @@ error:
return -1;
}
+int audio_ril_interface_set_mic_mute(struct tinyalsa_audio_ril_interface *ril_interface, enum ril_mic_mute state)
+{
+ if (audio_ril_interface_connect_if_required(ril_interface))
+ return 0;
+
+ return _ril_set_mic_mute(ril_interface->interface, state);
+}
+
+
int audio_ril_interface_set_twomic(struct tinyalsa_audio_ril_interface *ril_interface, enum ril_twomic_enable twomic)
{
int rc;
@@ -322,7 +322,7 @@ int audio_ril_interface_open(struct audio_hw_device *dev, audio_devices_t device
_ril_set_call_audio_path = dlsym(dl_handle, "SetCallAudioPath");
_ril_set_call_clock_sync = dlsym(dl_handle, "SetCallClockSync");
_ril_set_call_twomic = dlsym(dl_handle, "SetTwoMicControl");
-
+ _ril_set_mic_mute = dlsym(dl_handle, "SetMute");
_ril_register_unsolicited_handler = dlsym(dl_handle,
"RegisterUnsolicitedHandler");
/* since this function is not supported in all RILs, don't require it */
@@ -330,7 +330,8 @@ int audio_ril_interface_open(struct audio_hw_device *dev, audio_devices_t device
if (!_ril_open_client || !_ril_close_client || !_ril_connect ||
!_ril_is_connected || !_ril_disconnect || !_ril_set_call_volume ||
- !_ril_set_call_audio_path || !_ril_set_call_clock_sync ||
+ !_ril_set_call_audio_path || !_ril_set_mic_mute ||
+ !_ril_set_call_clock_sync ||
!_ril_register_unsolicited_handler || !_ril_set_call_twomic) {
ALOGE("Cannot get symbols from '%s'", RIL_CLIENT_LIBPATH);
dlclose(dl_handle);