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

Commit 2dfee4d6 authored by Oskar Andero's avatar Oskar Andero Committed by Gerrit Code Review
Browse files

AudioFlinger: remove readInput for ST-E audio support

readInput is not implemented and causes audio recording to hang.

Change-Id: I4f9e6747a13df28e54a3d425f30373d336189775
parent 9356f2fb
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -4810,27 +4810,10 @@ bool AudioFlinger::RecordThread::threadLoop()
                        if (framesOut && mFrameCount == mRsmpInIndex) {
                            if (framesOut == mFrameCount &&
                                ((int)mChannelCount == mReqChannelCount || mFormat != AUDIO_FORMAT_PCM_16_BIT)) {
#ifdef STE_AUDIO
                                mBytesRead = mAudioFlinger->readInput((uint32_t*) mInput,
                                                                      (uint32_t)mInputClientId,
                                                                      buffer.raw,
                                                                      mInputBytes,
                                                                      NULL);
#else
                                mBytesRead = mInput->stream->read(mInput->stream, buffer.raw, mInputBytes);
#endif
                                framesOut = 0;
                            } else {
#ifdef STE_AUDIO
                                mBytesRead = mAudioFlinger->readInput((uint32_t*) mInput,
                                                                      (uint32_t)mInputClientId,
                                                                      mRsmpInBuffer,
                                                                      mInputBytes,
                                                                      NULL);

#else
                                mBytesRead = mInput->stream->read(mInput->stream, mRsmpInBuffer, mInputBytes);
#endif
                                mRsmpInIndex = 0;
                            }
                            if (mBytesRead < 0) {
@@ -5078,15 +5061,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer*
    int channelCount;

    if (framesReady == 0) {
#ifdef STE_AUDIO
        mBytesRead = mAudioFlinger->readInput((uint32_t*) mInput,
                                              (uint32_t)mInputClientId,
                                              mRsmpInBuffer,
                                              mInputBytes,
                                              NULL);
#else
        mBytesRead = mInput->stream->read(mInput->stream, mRsmpInBuffer, mInputBytes);
#endif
        if (mBytesRead < 0) {
            LOGE("RecordThread::getNextBuffer() Error reading audio input");
            if (mActiveTrack->mState == TrackBase::ACTIVE) {