audio: Add support for voice session mic mute

Change-Id: I5277736fffcb4511e4a7adb2e3e10090dcab484c
tirimbino
Andreas Schneider 8 years ago
parent 59486fa48c
commit 107a848bc3
  1. 2
      audio/audio_hw.c
  2. 7
      audio/voice.c
  3. 1
      audio/voice.h

@ -4080,7 +4080,7 @@ static int adev_set_mic_mute(struct audio_hw_device *dev, bool state)
adev->mic_mute = state; adev->mic_mute = state;
if (adev->mode == AUDIO_MODE_IN_CALL) { if (adev->mode == AUDIO_MODE_IN_CALL) {
/* TODO */ set_voice_session_mic_mute(adev->voice.session, state);
} }
pthread_mutex_unlock(&adev->lock); pthread_mutex_unlock(&adev->lock);

@ -244,6 +244,13 @@ void set_voice_session_volume(struct voice_session *session, float volume)
ril_set_call_volume(&session->ril, sound_type, volume); ril_set_call_volume(&session->ril, sound_type, volume);
} }
void set_voice_session_mic_mute(struct voice_session *session, bool state)
{
enum _MuteCondition mute_condition = state ? TX_MUTE : TX_UNMUTE;
ril_set_mute(&session->ril, mute_condition);
}
bool voice_session_uses_twomic(struct voice_session *session) bool voice_session_uses_twomic(struct voice_session *session)
{ {
if (session->two_mic_disabled) { if (session->two_mic_disabled) {

@ -39,6 +39,7 @@ int start_voice_session(struct voice_session *session);
void stop_voice_session(struct voice_session *session); void stop_voice_session(struct voice_session *session);
void set_voice_session_volume(struct voice_session *session, float volume); void set_voice_session_volume(struct voice_session *session, float volume);
void set_voice_session_audio_path(struct voice_session *session); void set_voice_session_audio_path(struct voice_session *session);
void set_voice_session_mic_mute(struct voice_session *session, bool state);
bool voice_session_uses_twomic(struct voice_session *session); bool voice_session_uses_twomic(struct voice_session *session);
bool voice_session_uses_wideband(struct voice_session *session); bool voice_session_uses_wideband(struct voice_session *session);

Loading…
Cancel
Save