audio policy: fix device selection in startInput()
Check again input device selection when capture starts in case conditions have changed since the input stream was opened. This is related to but does not fix issue 8761558. It makes the selection of BT SCO device consistent. Bug: 8761558 Change-Id: I386b638e9c3238711e16fb848449af561624359e
This commit is contained in:
parent
a776ffd243
commit
6670743515
1 changed files with 4 additions and 0 deletions
|
@ -941,6 +941,10 @@ status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input)
|
|||
}
|
||||
}
|
||||
|
||||
audio_devices_t newDevice = getDeviceForInputSource(inputDesc->mInputSource);
|
||||
if ((newDevice != AUDIO_DEVICE_NONE) && (newDevice != inputDesc->mDevice)) {
|
||||
inputDesc->mDevice = newDevice;
|
||||
}
|
||||
AudioParameter param = AudioParameter();
|
||||
param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice);
|
||||
|
||||
|
|
Loading…
Reference in a new issue