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

Commit c5a17425 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Remove name output parameter from createTrack

It was only used for one log.
A better solution will be a per-track unique ID.

Change-Id: Ia440e02ae4a5a4019a9a2d08970e1ee93ac4c3a3
parent c3df8384
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -748,7 +748,6 @@ protected:
    sp<AudioTrackClientProxy>       mProxy;         // primary owner of the memory

    bool                    mInUnderrun;            // whether track is currently in underrun state
    String8                 mName;                  // server's name for this IAudioTrack
    uint32_t                mPausedPosition;

private:
+0 −4
Original line number Diff line number Diff line
@@ -73,10 +73,6 @@ public:
                                audio_io_handle_t output,
                                pid_t tid,  // -1 means unused, otherwise must be valid non-0
                                int *sessionId,
                                // input: ignored
                                // output: server's description of IAudioTrack for display in logs.
                                // Don't attempt to parse, as the format could change.
                                String8& name,
                                int clientUid,
                                status_t *status) = 0;

+1 −3
Original line number Diff line number Diff line
@@ -1024,7 +1024,6 @@ status_t AudioTrack::createTrack_l(size_t epoch)
                                                      output,
                                                      tid,
                                                      &mSessionId,
                                                      mName,
                                                      mClientUid,
                                                      &status);

@@ -1281,8 +1280,7 @@ void AudioTrack::releaseBuffer(Buffer* audioBuffer)
    if (mState == STATE_ACTIVE) {
        audio_track_cblk_t* cblk = mCblk;
        if (android_atomic_and(~CBLK_DISABLED, &cblk->mFlags) & CBLK_DISABLED) {
            ALOGW("releaseBuffer() track %p name=%s disabled due to previous underrun, restarting",
                    this, mName.string());
            ALOGW("releaseBuffer() track %p disabled due to previous underrun, restarting", this);
            // FIXME ignoring status
            mAudioTrack->start();
        }
+1 −5
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ public:
                                audio_io_handle_t output,
                                pid_t tid,
                                int *sessionId,
                                String8& name,
                                int clientUid,
                                status_t *status)
    {
@@ -140,7 +139,6 @@ public:
            if (sessionId != NULL) {
                *sessionId = lSessionId;
            }
            name = reply.readString8();
            lStatus = reply.readInt32();
            track = interface_cast<IAudioTrack>(reply.readStrongBinder());
            if (lStatus == NO_ERROR) {
@@ -808,7 +806,6 @@ status_t BnAudioFlinger::onTransact(
            pid_t tid = (pid_t) data.readInt32();
            int sessionId = data.readInt32();
            int clientUid = data.readInt32();
            String8 name;
            status_t status;
            sp<IAudioTrack> track;
            if ((haveSharedBuffer && (buffer == 0)) ||
@@ -819,13 +816,12 @@ status_t BnAudioFlinger::onTransact(
                track = createTrack(
                        (audio_stream_type_t) streamType, sampleRate, format,
                        channelMask, &frameCount, &flags, buffer, output, tid,
                        &sessionId, name, clientUid, &status);
                        &sessionId, clientUid, &status);
                LOG_ALWAYS_FATAL_IF((track != 0) != (status == NO_ERROR));
            }
            reply->writeInt32(frameCount);
            reply->writeInt32(flags);
            reply->writeInt32(sessionId);
            reply->writeString8(name);
            reply->writeInt32(status);
            reply->writeStrongBinder(track->asBinder());
            return NO_ERROR;
+0 −4
Original line number Diff line number Diff line
@@ -509,7 +509,6 @@ sp<IAudioTrack> AudioFlinger::createTrack(
        audio_io_handle_t output,
        pid_t tid,
        int *sessionId,
        String8& name,
        int clientUid,
        status_t *status)
{
@@ -625,9 +624,6 @@ sp<IAudioTrack> AudioFlinger::createTrack(
    }

    if (lStatus == NO_ERROR) {
        // s for server's pid, n for normal mixer name, f for fast index
        name = String8::format("s:%d;n:%d;f:%d", getpid_cached, track->name() - AudioMixer::TRACK0,
                track->fastIndex());
        trackHandle = new TrackHandle(track);
    } else {
        // remove local strong reference to Client before deleting the Track so that the Client
Loading