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

Commit 4b6f5cac authored by Xin Li's avatar Xin Li Committed by Android (Google) Code Review
Browse files

Merge "Merge 24Q3 (ab/AP3A.240905.001) to aosp-main-future" into aosp-main-future

parents 8ac883c9 01825170
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -619,6 +619,13 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::getConfig(
                if (!isValidOMXParam(outParams)) {
                    return OMX_ErrorBadParameter;
                }
                if (offsetof(DescribeHDR10PlusInfoParams, nValue) + outParams->nParamSize >
                    outParams->nSize) {
                    ALOGE("b/329641908: too large param size; nParamSize=%u nSize=%u",
                          outParams->nParamSize, outParams->nSize);
                    android_errorWriteLog(0x534e4554, "329641908");
                    return OMX_ErrorBadParameter;
                }

                outParams->nParamSizeUsed = info->size();

+1 −2
Original line number Diff line number Diff line
@@ -294,8 +294,7 @@ public:
    virtual status_t startAudioSource(const struct audio_port_config *source,
                                      const audio_attributes_t *attributes,
                                      audio_port_handle_t *portId,
                                      uid_t uid,
                                      bool internal = false) = 0;
                                      uid_t uid) = 0;
    virtual status_t stopAudioSource(audio_port_handle_t portId) = 0;

    virtual status_t setMasterMono(bool mono) = 0;
+8 −4
Original line number Diff line number Diff line
@@ -47,13 +47,17 @@ sp<DeviceDescriptor> findPreferredDevice(

    if (active) {
        // On MMAP IOs, the preferred device is selected by the first client (virtual client
        // created when the mmap stream is opened). This client is never active.
        // created when the mmap stream is opened). This client is never active and we only
        // consider the Filter criteria, not the active state.
        // On non MMAP IOs, the preferred device is honored only if all active clients have
        // a preferred device in which case the first client drives the selection.
        if (desc->isMmap()) {
            // The client list is never empty on a MMAP IO
            return devices.getDeviceFromId(
                    desc->clientsList(false /*activeOnly*/)[0]->preferredDeviceId());
            auto matchingClients = desc->clientsList(
                    false /*activeOnly*/, filter, false /*preferredDevice*/);
            if (matchingClients.empty()) {
                return nullptr;
            }
            return devices.getDeviceFromId(matchingClients[0]->preferredDeviceId());
        } else {
            auto activeClientsWithRoute =
                desc->clientsList(true /*activeOnly*/, filter, true /*preferredDevice*/);
+7 −1
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ public:
     * HW Audio Source.
     */
    virtual bool isInternal() const { return false; }
    virtual bool isCallRx() const { return false; }
    virtual bool isCallTx() const { return false; }
    audio_port_handle_t portId() const { return mPortId; }
    uid_t uid() const { return mUid; }
    audio_session_t session() const { return mSessionId; };
@@ -236,7 +238,7 @@ public:
                           const sp<DeviceDescriptor>& srcDevice,
                           audio_stream_type_t stream, product_strategy_t strategy,
                           VolumeSource volumeSource,
                           bool isInternal);
                           bool isInternal, bool isCallRx, bool isCallTx);

    ~SourceClientDescriptor() override = default;

@@ -263,6 +265,8 @@ public:
    wp<HwAudioOutputDescriptor> hwOutput() const { return mHwOutput; }
    void setHwOutput(const sp<HwAudioOutputDescriptor>& hwOutput);
    bool isInternal() const override { return mIsInternal; }
    bool isCallRx() const override { return mIsCallRx; }
    bool isCallTx() const override { return mIsCallTx; }

    using ClientDescriptor::dump;
    void dump(String8 *dst, int spaces) const override;
@@ -294,6 +298,8 @@ public:
     * requester to prevent rerouting SwOutput involved in raw patches.
     */
    bool mIsInternal = false;
    bool mIsCallRx = false;
    bool mIsCallTx = false;
};

class SourceClientCollection :
+4 −2
Original line number Diff line number Diff line
@@ -96,12 +96,14 @@ void RecordClientDescriptor::dump(String8 *dst, int spaces) const
SourceClientDescriptor::SourceClientDescriptor(audio_port_handle_t portId, uid_t uid,
         audio_attributes_t attributes, const struct audio_port_config &config,
         const sp<DeviceDescriptor>& srcDevice, audio_stream_type_t stream,
         product_strategy_t strategy, VolumeSource volumeSource, bool isInternal) :
         product_strategy_t strategy, VolumeSource volumeSource,
         bool isInternal, bool isCallRx, bool isCallTx) :
    TrackClientDescriptor::TrackClientDescriptor(portId, uid, AUDIO_SESSION_NONE, attributes,
        {config.sample_rate, config.channel_mask, config.format}, AUDIO_PORT_HANDLE_NONE,
        stream, strategy, volumeSource, AUDIO_OUTPUT_FLAG_NONE, false,
        {} /* Sources do not support secondary outputs*/, nullptr),
    mSrcDevice(srcDevice), mIsInternal(isInternal)
    mSrcDevice(srcDevice), mIsInternal(isInternal),
    mIsCallRx(isCallRx), mIsCallTx(isCallTx)
{
}

Loading