Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a91f7cf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "audiopolicy: fix AudioRecordingConfiguration callback"

parents 11df024f f5d25e6f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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(),
+1 −1
Original line number Diff line number Diff line
@@ -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);