hal : Set the input device for VOIP calls using audio path
For Voip calls using audio path ,the input devices is not getting selected when output device is changed. Removed the source type check to select the input device when there is an active input and output device switch. Change-Id: Iab7a6fddb3dda045fab94cd72de8e658721d9237 CRs-fixed: 712950
This commit is contained in:
parent
397d63698f
commit
f621ec7bee
|
@ -795,8 +795,7 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
|
|||
out_snd_device = platform_get_output_snd_device(adev->platform,
|
||||
usecase->stream.out->devices);
|
||||
if (usecase->stream.out == adev->primary_output &&
|
||||
adev->active_input &&
|
||||
adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
|
||||
adev->active_input) {
|
||||
select_devices(adev, adev->active_input->usecase);
|
||||
}
|
||||
}
|
||||
|
@ -805,8 +804,10 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
|
|||
out_snd_device = SND_DEVICE_NONE;
|
||||
if (in_snd_device == SND_DEVICE_NONE) {
|
||||
audio_devices_t out_device = AUDIO_DEVICE_NONE;
|
||||
if (adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION &&
|
||||
adev->primary_output && !adev->primary_output->standby) {
|
||||
if ((adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION ||
|
||||
(adev->mode == AUDIO_MODE_IN_COMMUNICATION &&
|
||||
adev->active_input->source == AUDIO_SOURCE_MIC)) &&
|
||||
adev->primary_output && !adev->primary_output->standby) {
|
||||
out_device = adev->primary_output->devices;
|
||||
} else if (usecase->id == USECASE_AUDIO_RECORD_AFE_PROXY) {
|
||||
out_device = AUDIO_DEVICE_OUT_TELEPHONY_TX;
|
||||
|
|
|
@ -1854,7 +1854,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
|
|||
snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
|
||||
}
|
||||
}
|
||||
} else if (source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
|
||||
} else if ((source == AUDIO_SOURCE_VOICE_COMMUNICATION) ||
|
||||
(mode == AUDIO_MODE_IN_COMMUNICATION)) {
|
||||
if (out_device & AUDIO_DEVICE_OUT_SPEAKER)
|
||||
in_device = AUDIO_DEVICE_IN_BACK_MIC;
|
||||
if (adev->active_input) {
|
||||
|
|
Loading…
Reference in New Issue