diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp index 6885a49d6b..8a7f9f0d8d 100644 --- a/audio/aidl/default/Module.cpp +++ b/audio/aidl/default/Module.cpp @@ -207,7 +207,8 @@ ndk::ScopedAStatus Module::createStreamContext( std::make_unique(1, true /*configureEventFlagWord*/), std::make_unique(1, true /*configureEventFlagWord*/), portConfigIt->format.value(), portConfigIt->channelMask.value(), - portConfigIt->sampleRate.value().value, + portConfigIt->sampleRate.value().value, flags, + portConfigIt->ext.get().handle, std::make_unique(frameSize * in_bufferSizeFrames), asyncCallback, outEventCallback, params); if (temp.isValid()) { diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h index 476f1ff30d..4f84de900b 100644 --- a/audio/aidl/default/include/core-impl/Stream.h +++ b/audio/aidl/default/include/core-impl/Stream.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,8 @@ class StreamContext { StreamContext(std::unique_ptr commandMQ, std::unique_ptr replyMQ, const ::aidl::android::media::audio::common::AudioFormatDescription& format, const ::aidl::android::media::audio::common::AudioChannelLayout& channelLayout, - int sampleRate, std::unique_ptr dataMQ, + int sampleRate, const ::aidl::android::media::audio::common::AudioIoFlags& flags, + int32_t mixPortHandle, std::unique_ptr dataMQ, std::shared_ptr asyncCallback, std::shared_ptr outEventCallback, DebugParameters debugParameters) @@ -87,6 +89,8 @@ class StreamContext { mFormat(format), mChannelLayout(channelLayout), mSampleRate(sampleRate), + mFlags(flags), + mMixPortHandle(mixPortHandle), mDataMQ(std::move(dataMQ)), mAsyncCallback(asyncCallback), mOutEventCallback(outEventCallback), @@ -98,6 +102,8 @@ class StreamContext { mFormat(other.mFormat), mChannelLayout(other.mChannelLayout), mSampleRate(other.mSampleRate), + mFlags(std::move(other.mFlags)), + mMixPortHandle(other.mMixPortHandle), mDataMQ(std::move(other.mDataMQ)), mAsyncCallback(std::move(other.mAsyncCallback)), mOutEventCallback(std::move(other.mOutEventCallback)), @@ -109,6 +115,8 @@ class StreamContext { mFormat = std::move(other.mFormat); mChannelLayout = std::move(other.mChannelLayout); mSampleRate = other.mSampleRate; + mFlags = std::move(other.mFlags); + mMixPortHandle = other.mMixPortHandle; mDataMQ = std::move(other.mDataMQ); mAsyncCallback = std::move(other.mAsyncCallback); mOutEventCallback = std::move(other.mOutEventCallback); @@ -126,10 +134,12 @@ class StreamContext { ::aidl::android::media::audio::common::AudioFormatDescription getFormat() const { return mFormat; } + ::aidl::android::media::audio::common::AudioIoFlags getFlags() const { return mFlags; } bool getForceTransientBurst() const { return mDebugParameters.forceTransientBurst; } bool getForceSynchronousDrain() const { return mDebugParameters.forceSynchronousDrain; } size_t getFrameSize() const; int getInternalCommandCookie() const { return mInternalCommandCookie; } + int32_t getMixPortHandle() const { return mMixPortHandle; } std::shared_ptr getOutEventCallback() const { return mOutEventCallback; } @@ -146,6 +156,8 @@ class StreamContext { ::aidl::android::media::audio::common::AudioFormatDescription mFormat; ::aidl::android::media::audio::common::AudioChannelLayout mChannelLayout; int mSampleRate; + ::aidl::android::media::audio::common::AudioIoFlags mFlags; + int32_t mMixPortHandle; std::unique_ptr mDataMQ; std::shared_ptr mAsyncCallback; std::shared_ptr mOutEventCallback; // Only used by output streams