hal: Permit device switch for primary output in a voip call

The device switch from speaker to earpiece or vice versa fails
during a QQ voip call. Currently, we use the same devices for
all usecases as that of voice/voip call and avoid switching the
same for other usecases when a voip/voice call is active. At
times, voip call has primary output which uses deep buffer path.
With current design in place, we do not permit device switch on
deep buffer path since voip call is active despite the rx on
primary output.
Do not select voip usecase devices if the output stream uses
primary output or in effect permit switching.

Change-Id: Ie61a7d7d8f27d55a393d173a724697045f66e1d6
CRs-Fixed: 685222
This commit is contained in:
Avinash Vaish 2014-06-25 12:20:37 +05:30 committed by Gerrit - the friendly Code Review server
parent 96161ed7b9
commit 4d6167d205
1 changed files with 2 additions and 1 deletions

View File

@ -666,7 +666,8 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
} else if (voice_extn_compress_voip_is_active(adev)) {
voip_usecase = get_usecase_from_list(adev, USECASE_COMPRESS_VOIP_CALL);
if ((voip_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
(usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND)) {
(usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
(voip_usecase->stream.out != adev->primary_output)) {
in_snd_device = voip_usecase->in_snd_device;
out_snd_device = voip_usecase->out_snd_device;
}