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

Commit 8db5fd97 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioFlinger: Remove unnecessary friends" into udc-qpr-dev-plus-aosp

parents 536ddbd8 eb6b5f89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3692,7 +3692,7 @@ std::vector<sp<IAfEffectModule>> AudioFlinger::purgeStaleEffects_l() {
         // clang-tidy suggests const ref
        sp<IAfEffectChain> ec = chains[i];  // NOLINT(performance-unnecessary-copy-initialization)
        int sessionid = ec->sessionId();
        const auto t = sp<IAfThreadBase>::cast(ec->thread().promote()); // TODO(b/288339104)
        const auto t = ec->thread().promote();
        if (t == 0) {
            continue;
        }
+8 −11
Original line number Diff line number Diff line
@@ -152,8 +152,6 @@ class ServerProxy;

static const nsecs_t kDefaultStandbyTimeInNsecs = seconds(3);

#define INCLUDING_FROM_AUDIOFLINGER_H

using android::content::AttributionSourceState;

struct stream_type_t {
@@ -164,6 +162,7 @@ struct stream_type_t {
class AudioFlinger : public AudioFlingerServerAdapter::Delegate
{
    friend class sp<AudioFlinger>;
    // TODO(b/291319167) Create interface and remove friends.
    friend class Client; // removeClient_l();
    friend class DeviceEffectManager;
    friend class DeviceEffectManagerCallback;
@@ -514,7 +513,7 @@ private:
    // Internal dump utilities.
    static const int kDumpLockTimeoutNs = 1 * NANOS_PER_SECOND;
public:
    // TODO(b/288339104) extract to afutils
    // TODO(b/291319167) extract to afutils
    static bool dumpTryLock(Mutex& mutex);
private:
    void dumpPermissionDenial(int fd, const Vector<String16>& args);
@@ -658,7 +657,7 @@ private:
            IAfPlaybackThread* srcThread, IAfPlaybackThread* dstThread);

public:
    // TODO(b/288339104) cluster together
    // TODO(b/291319167) cluster together
              status_t moveAuxEffectToIo(int EffectId,
            const sp<IAfPlaybackThread>& dstThread, sp<IAfPlaybackThread>* srcThread);
private:
@@ -683,7 +682,7 @@ private:
                void        removeClient_l(pid_t pid);
                void        removeNotificationClient(pid_t pid);
public:
    // TODO(b/288339104) cluster together
    // TODO(b/291319167) cluster together
                bool isNonOffloadableGlobalEffectEnabled_l();
private:
                void onNonOffloadableGlobalEffectEnable();
@@ -705,7 +704,7 @@ private:
                // and removed from mOrphanEffectChains if it does not contain any effect.
                // Return true if the effect was found in mOrphanEffectChains, false otherwise.
public:
// TODO(b/288339104) suggest better grouping
// TODO(b/291319167) suggest better grouping
                bool updateOrphanEffectChains(const sp<IAfEffectModule>& effect);
private:
                std::vector< sp<IAfEffectModule> > purgeStaleEffects_l();
@@ -727,13 +726,13 @@ private:
    };

public:
    // TODO(b/288339104) access by getter,
    // TODO(b/291319167) access by getter,
    mutable     Mutex                               mLock;
                // protects mClients and mNotificationClients.
                // must be locked after mLock and ThreadBase::mLock if both must be locked
                // avoids acquiring AudioFlinger::mLock from inside thread loop.

    // TODO(b/288339104) access by getter,
    // TODO(b/291319167) access by getter,
    mutable     Mutex                               mClientLock;
private:
                // protected by mClientLock
@@ -862,7 +861,7 @@ private:
    const sp<IAfPatchPanel> mPatchPanel = IAfPatchPanel::create(this);

public:
    // TODO(b/288339104) access by getter.
    // TODO(b/291319167) access by getter.
    sp<EffectsFactoryHalInterface> mEffectsFactoryHal;
private:

@@ -898,8 +897,6 @@ private:
    std::atomic_bool mBluetoothLatencyModesEnabled;
};

#undef INCLUDING_FROM_AUDIOFLINGER_H

std::string formatToString(audio_format_t format);
std::string inputFlagsToString(audio_input_flags_t flags);
std::string outputFlagsToString(audio_output_flags_t flags);
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

#pragma once

// TODO(b/288339104) Move to nested namespace
// TODO(b/291318727) Move to nested namespace
namespace android {

class AudioFlinger;
+0 −1
Original line number Diff line number Diff line
@@ -2119,7 +2119,6 @@ sp<IAfEffectChain> IAfEffectChain::create(
        const wp<IAfThreadBase>& wThread,
        audio_session_t sessionId)
{
    // TODO(b/288339104) no weak pointer cast.
    return sp<EffectChain>::make(wThread, sessionId);
}

+1 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ public:
            const IAfPatchPanel::Patch& patch) = 0;
    virtual void onReleasePatch(audio_patch_handle_t patchHandle) = 0;

    virtual void dump2(int fd, int spaces) const = 0; // TODO(b/288339104) naming?
    virtual void dump2(int fd, int spaces) const = 0; // TODO(b/291319101) naming?

private:
    // used by DeviceEffectProxy
Loading