mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
audio: Add API to get io handle
Add new API to fetch IO handle which is used for offloaded effects. Test: atest VtsHalAudioEffectFactoryTargetTest Test: atest VtsHalAudioEffectTargetTest Change-Id: I82abe76036507e770f0e2aed2feef7905d85a5c9
This commit is contained in:
@@ -49,7 +49,6 @@ ndk::ScopedAStatus EffectImpl::open(const Parameter::Common& common,
|
||||
auto context = createContext(common);
|
||||
RETURN_IF(!context, EX_NULL_POINTER, "createContextFailed");
|
||||
|
||||
RETURN_IF_ASTATUS_NOT_OK(setParameterCommon(common), "setCommParamErr");
|
||||
if (specific.has_value()) {
|
||||
RETURN_IF_ASTATUS_NOT_OK(setParameterSpecific(specific.value()), "setSpecParamErr");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ class EffectContext {
|
||||
DataMQ;
|
||||
|
||||
EffectContext(size_t statusDepth, const Parameter::Common& common) {
|
||||
mSessionId = common.session;
|
||||
auto& input = common.input;
|
||||
auto& output = common.output;
|
||||
|
||||
@@ -63,6 +62,7 @@ class EffectContext {
|
||||
LOG(ERROR) << __func__ << " created invalid FMQ";
|
||||
}
|
||||
mWorkBuffer.reserve(std::max(inBufferSizeInFloat, outBufferSizeInFloat));
|
||||
mCommon = common;
|
||||
}
|
||||
virtual ~EffectContext() {}
|
||||
|
||||
@@ -88,7 +88,8 @@ class EffectContext {
|
||||
}
|
||||
size_t getInputFrameSize() { return mInputFrameSize; }
|
||||
size_t getOutputFrameSize() { return mOutputFrameSize; }
|
||||
int getSessionId() { return mSessionId; }
|
||||
int getSessionId() { return mCommon.session; }
|
||||
int getIoHandle() { return mCommon.ioHandle; }
|
||||
|
||||
virtual RetCode setOutputDevice(
|
||||
const std::vector<aidl::android::media::audio::common::AudioDeviceDescription>&
|
||||
@@ -96,6 +97,7 @@ class EffectContext {
|
||||
mOutputDevice = device;
|
||||
return RetCode::SUCCESS;
|
||||
}
|
||||
|
||||
virtual std::vector<aidl::android::media::audio::common::AudioDeviceDescription>
|
||||
getOutputDevice() {
|
||||
return mOutputDevice;
|
||||
@@ -131,7 +133,6 @@ class EffectContext {
|
||||
|
||||
protected:
|
||||
// common parameters
|
||||
int mSessionId = INVALID_AUDIO_SESSION_ID;
|
||||
size_t mInputFrameSize;
|
||||
size_t mOutputFrameSize;
|
||||
Parameter::Common mCommon;
|
||||
|
||||
Reference in New Issue
Block a user