Merge "audiopolicy: fix AudioRecordingConfiguration callback"

gugelfrei
TreeHugger Robot 5 years ago committed by Android (Google) Code Review
commit 6a91f7cf52

@ -334,6 +334,13 @@ void AudioInputDescriptor::setClientActive(const sp<RecordClientDescriptor>& cli
void AudioInputDescriptor::updateClientRecordingConfiguration(
int event, const sp<RecordClientDescriptor>& client)
{
// do not send callback if starting and no device is selected yet to avoid
// double callbacks from startInput() before and after the device is selected
if (event == RECORD_CONFIG_EVENT_START
&& mPatchHandle == AUDIO_PATCH_HANDLE_NONE) {
return;
}
const audio_config_base_t sessionConfig = client->config();
const record_client_info_t recordClientInfo{client->uid(), client->session(),
client->source(), client->portId(),

@ -2025,7 +2025,7 @@ exit:
mSoundTriggerSessions.indexOfKey(session) > 0;
*portId = AudioPort::getNextUniqueId();
clientDesc = new RecordClientDescriptor(*portId, uid, session, *attr, *config,
clientDesc = new RecordClientDescriptor(*portId, uid, session, attributes, *config,
requestedDeviceId, attributes.source, flags,
isSoundTrigger);
inputDesc = mInputs.valueFor(*input);

Loading…
Cancel
Save