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

Commit d513d5b6 authored by Michael Bestas's avatar Michael Bestas Committed by Steve Kondik
Browse files

av: Fix DirectTrack build on 5.1

Change-Id: Ib9c9ffbb5f5de30c9d2f73b0903be1ced78c1bea
parent 39555f50
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -566,8 +566,10 @@ status_t AudioTrack::set(

#ifdef QCOM_DIRECTTRACK
    if (flags & AUDIO_OUTPUT_FLAG_LPA || flags & AUDIO_OUTPUT_FLAG_TUNNEL) {
 audio_io_handle_t output = AudioSystem::getOutputForAttr(&mAttributes, mSampleRate, mFormat,
            mChannelMask, mFlags, mOffloadInfo);
        audio_io_handle_t output = AudioSystem::getOutputForAttr(&mAttributes, &output,
                                                        (audio_session_t)mSessionId, &streamType,
                                                        mSampleRate, mFormat, mChannelMask,
                                                        mFlags, mOffloadInfo);
    if (output == AUDIO_IO_HANDLE_NONE) {
        ALOGE("Could not get audio output for stream type %d, usage %d, sample rate %u, format %#x,"
              " channel mask %#x, flags %#x",
+1 −0
Original line number Diff line number Diff line
@@ -1991,6 +1991,7 @@ status_t AwesomePlayer::initAudioDecoder() {
            }
            flags |= OMXCodec::kSoftwareCodecsOnly;
        }
        }
        mOmxSource = OMXCodec::Create(
                mClient.interface(), mAudioTrack->getFormat(),
                false, // createEncoder
+8 −4
Original line number Diff line number Diff line
@@ -6894,7 +6894,8 @@ AudioFlinger::DirectAudioTrack::~DirectAudioTrack() {
        requestAndWaitForEffectsThreadExit();
        mAudioFlinger->deleteEffectSession();
    }
    AudioSystem::releaseOutput(mOutput);
    AudioSystem::releaseOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType,
            (audio_session_t)NULL);
    releaseWakeLock();

    {
@@ -6907,7 +6908,8 @@ AudioFlinger::DirectAudioTrack::~DirectAudioTrack() {
}

status_t AudioFlinger::DirectAudioTrack::start() {
    AudioSystem::startOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType, NULL);
    AudioSystem::startOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType,
        (audio_session_t)NULL);
    if(mIsPaused) {
        mIsPaused = false;
        mOutputDesc->stream->start(mOutputDesc->stream);
@@ -6923,7 +6925,8 @@ void AudioFlinger::DirectAudioTrack::stop() {
    ALOGV("DirectAudioTrack::stop");
    mOutputDesc->mActive = false;
    mOutputDesc->stream->stop(mOutputDesc->stream);
    AudioSystem::stopOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType, NULL);
    AudioSystem::stopOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType,
        (audio_session_t)NULL);
}

void AudioFlinger::DirectAudioTrack::pause() {
@@ -6931,7 +6934,8 @@ void AudioFlinger::DirectAudioTrack::pause() {
        mIsPaused = true;
        mOutputDesc->stream->pause(mOutputDesc->stream);
        mOutputDesc->mActive = false;
        AudioSystem::stopOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType,NULL);
        AudioSystem::stopOutput(mOutput, (audio_stream_type_t)mOutputDesc->mStreamType,
            (audio_session_t)NULL);
    }
}