diff options
Diffstat (limited to 'audio/ril_interface.c')
-rwxr-xr-x | audio/ril_interface.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/audio/ril_interface.c b/audio/ril_interface.c index 89a0aef..a77efc0 100755 --- a/audio/ril_interface.c +++ b/audio/ril_interface.c @@ -37,6 +37,7 @@ int (*_ril_disconnect)(void *); 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_two_mic_control)(void *, enum ril_two_mic_device, enum ril_two_mic_state); int (*_ril_register_unsolicited_handler)(void *, int, void *); int (*_ril_get_wb_amr)(void *, void *); @@ -106,6 +107,7 @@ int ril_open(struct ril_handle *ril) _ril_set_call_volume = dlsym(ril->handle, "SetCallVolume"); _ril_set_call_audio_path = dlsym(ril->handle, "SetCallAudioPath"); _ril_set_call_clock_sync = dlsym(ril->handle, "SetCallClockSync"); + _ril_set_two_mic_control = dlsym(ril->handle, "SetTwoMicControl"); _ril_register_unsolicited_handler = dlsym(ril->handle, "RegisterUnsolicitedHandler"); /* since this function is not supported in all RILs, don't require it */ @@ -113,7 +115,7 @@ int ril_open(struct ril_handle *ril) 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_two_mic_control || !_ril_set_call_clock_sync || !_ril_register_unsolicited_handler) { ALOGE("Cannot get symbols from '%s'", RIL_CLIENT_LIBPATH); dlclose(ril->handle); @@ -181,3 +183,11 @@ int ril_set_call_clock_sync(struct ril_handle *ril, enum ril_clock_state state) return _ril_set_call_clock_sync(ril->client, state); } + +int ril_set_two_mic_control(struct ril_handle *ril, enum ril_two_mic_device device, enum ril_two_mic_state state) +{ + if (ril_connect_if_required(ril)) + return 0; + + return _ril_set_two_mic_control(ril->client, device, state); +} |