hal: fix to enable aanc handset dynamically during voice call
AANC handset device doesnt get enabled if anc is enabled via setparameters() during a voice call. Add check for EARPIECE device to enable aanc handset device for all non-capture usecases. CRs-Fixed: 958813 Change-Id: I4d8d4026d3abb388c4b1ea2c8de328a61d9bbd81
This commit is contained in:
parent
34a303cb34
commit
8d019b07b0
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
|
||||
* Not a Contribution.
|
||||
*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
|
@ -430,11 +430,13 @@ void audio_extn_set_anc_parameters(struct audio_device *adev,
|
|||
// Refresh device selection for anc playback
|
||||
list_for_each(node, &adev->usecase_list) {
|
||||
usecase = node_to_item(node, struct audio_usecase, list);
|
||||
if (usecase->type == PCM_PLAYBACK) {
|
||||
if (usecase->type != PCM_CAPTURE) {
|
||||
if (usecase->stream.out->devices == \
|
||||
AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
|
||||
usecase->stream.out->devices == \
|
||||
AUDIO_DEVICE_OUT_WIRED_HEADSET) {
|
||||
AUDIO_DEVICE_OUT_WIRED_HEADSET ||
|
||||
usecase->stream.out->devices == \
|
||||
AUDIO_DEVICE_OUT_EARPIECE) {
|
||||
select_devices(adev, usecase->id);
|
||||
ALOGV("%s: switching device completed", __func__);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue