Loading hal/audio_hw.c +3 −1 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,9 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, /* * Instead of writing zeroes here, we could trust the hardware * to always provide zeroes when muted. * No need to acquire adev->lock to read mic_muted here as we don't change its state. */ if (ret == 0 && voice_get_mic_mute(adev) && !voice_is_in_call(adev)) if (ret == 0 && adev->mic_muted && in->usecase != USECASE_AUDIO_RECORD_AFE_PROXY) memset(buffer, 0, bytes); exit: Loading Loading @@ -2302,6 +2303,7 @@ static int adev_set_mic_mute(struct audio_hw_device *dev, bool state) ALOGD("%s: state %d\n", __func__, state); pthread_mutex_lock(&adev->lock); ret = voice_set_mic_mute(adev, state); adev->mic_muted = state; pthread_mutex_unlock(&adev->lock); return ret; Loading hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ struct audio_device { struct voice voice; unsigned int cur_hdmi_channels; bool bt_wb_speech_enabled; bool mic_muted; int snd_card; void *platform; Loading Loading
hal/audio_hw.c +3 −1 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,9 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, /* * Instead of writing zeroes here, we could trust the hardware * to always provide zeroes when muted. * No need to acquire adev->lock to read mic_muted here as we don't change its state. */ if (ret == 0 && voice_get_mic_mute(adev) && !voice_is_in_call(adev)) if (ret == 0 && adev->mic_muted && in->usecase != USECASE_AUDIO_RECORD_AFE_PROXY) memset(buffer, 0, bytes); exit: Loading Loading @@ -2302,6 +2303,7 @@ static int adev_set_mic_mute(struct audio_hw_device *dev, bool state) ALOGD("%s: state %d\n", __func__, state); pthread_mutex_lock(&adev->lock); ret = voice_set_mic_mute(adev, state); adev->mic_muted = state; pthread_mutex_unlock(&adev->lock); return ret; Loading
hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ struct audio_device { struct voice voice; unsigned int cur_hdmi_channels; bool bt_wb_speech_enabled; bool mic_muted; int snd_card; void *platform; Loading