blob: f0257f55c80437e926108b9c729b73684443ea8b [file] [log] [blame]
#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V5_0_BSPRIMARYDEVICE_H
#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V5_0_BSPRIMARYDEVICE_H
#include <android-base/macros.h>
#include <cutils/trace.h>
#include <future>
#include <android/hardware/audio/5.0/IPrimaryDevice.h>
#include <hidl/HidlPassthroughSupport.h>
#include <hidl/TaskRunner.h>
namespace android {
namespace hardware {
namespace audio {
namespace V5_0 {
struct BsPrimaryDevice : IPrimaryDevice, ::android::hardware::details::HidlInstrumentor {
explicit BsPrimaryDevice(const ::android::sp<IPrimaryDevice> impl);
/**
* The pure class is what this class wraps.
*/
typedef IPrimaryDevice Pure;
typedef ::android::hardware::details::bs_tag _hidl_tag;
// Methods from ::android::hardware::audio::V5_0::IDevice follow.
::android::hardware::Return<::android::hardware::audio::V5_0::Result> initCheck() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::initCheck::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "initCheck", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->initCheck();
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "initCheck", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setMasterVolume(float volume) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setMasterVolume::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&volume);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setMasterVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setMasterVolume(volume);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setMasterVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getMasterVolume(getMasterVolume_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getMasterVolume::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getMasterVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getMasterVolume([&](const auto &_hidl_out_retval, const auto &_hidl_out_volume) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_volume);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getMasterVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_volume);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setMicMute(bool mute) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setMicMute::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&mute);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setMicMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setMicMute(mute);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setMicMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getMicMute(getMicMute_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getMicMute::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getMicMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getMicMute([&](const auto &_hidl_out_retval, const auto &_hidl_out_mute) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_mute);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getMicMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_mute);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setMasterMute(bool mute) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setMasterMute::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&mute);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setMasterMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setMasterMute(mute);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setMasterMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getMasterMute(getMasterMute_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getMasterMute::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getMasterMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getMasterMute([&](const auto &_hidl_out_retval, const auto &_hidl_out_mute) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_mute);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getMasterMute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_mute);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getInputBufferSize(const ::android::hardware::audio::common::V5_0::AudioConfig& config, getInputBufferSize_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getInputBufferSize::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&config);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getInputBufferSize", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getInputBufferSize(config, [&](const auto &_hidl_out_retval, const auto &_hidl_out_bufferSize) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_bufferSize);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getInputBufferSize", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_bufferSize);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> openOutputStream(int32_t ioHandle, const ::android::hardware::audio::common::V5_0::DeviceAddress& device, const ::android::hardware::audio::common::V5_0::AudioConfig& config, ::android::hardware::hidl_bitfield<::android::hardware::audio::common::V5_0::AudioOutputFlag> flags, const ::android::hardware::audio::common::V5_0::SourceMetadata& sourceMetadata, openOutputStream_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::openOutputStream::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&ioHandle);
_hidl_args.push_back((void *)&device);
_hidl_args.push_back((void *)&config);
_hidl_args.push_back((void *)&flags);
_hidl_args.push_back((void *)&sourceMetadata);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "openOutputStream", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->openOutputStream(ioHandle, device, config, flags, sourceMetadata, [&](const auto &_hidl_out_retval, const auto &_hidl_out_outStream, const auto &_hidl_out_suggestedConfig) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_outStream);
_hidl_args.push_back((void *)&_hidl_out_suggestedConfig);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "openOutputStream", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::audio::V5_0::IStreamOut> _hidl_wrapped__hidl_out_outStream;
if (_hidl_out_outStream != nullptr && !_hidl_out_outStream->isRemote()) {
_hidl_wrapped__hidl_out_outStream = ::android::hardware::details::wrapPassthrough(_hidl_out_outStream);
if (_hidl_wrapped__hidl_out_outStream == nullptr) {
_hidl_error = ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped__hidl_out_outStream = _hidl_out_outStream;
}
_hidl_cb(_hidl_out_retval, _hidl_wrapped__hidl_out_outStream, _hidl_out_suggestedConfig);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> openInputStream(int32_t ioHandle, const ::android::hardware::audio::common::V5_0::DeviceAddress& device, const ::android::hardware::audio::common::V5_0::AudioConfig& config, ::android::hardware::hidl_bitfield<::android::hardware::audio::common::V5_0::AudioInputFlag> flags, const ::android::hardware::audio::common::V5_0::SinkMetadata& sinkMetadata, openInputStream_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::openInputStream::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&ioHandle);
_hidl_args.push_back((void *)&device);
_hidl_args.push_back((void *)&config);
_hidl_args.push_back((void *)&flags);
_hidl_args.push_back((void *)&sinkMetadata);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "openInputStream", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->openInputStream(ioHandle, device, config, flags, sinkMetadata, [&](const auto &_hidl_out_retval, const auto &_hidl_out_inStream, const auto &_hidl_out_suggestedConfig) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_inStream);
_hidl_args.push_back((void *)&_hidl_out_suggestedConfig);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "openInputStream", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::audio::V5_0::IStreamIn> _hidl_wrapped__hidl_out_inStream;
if (_hidl_out_inStream != nullptr && !_hidl_out_inStream->isRemote()) {
_hidl_wrapped__hidl_out_inStream = ::android::hardware::details::wrapPassthrough(_hidl_out_inStream);
if (_hidl_wrapped__hidl_out_inStream == nullptr) {
_hidl_error = ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped__hidl_out_inStream = _hidl_out_inStream;
}
_hidl_cb(_hidl_out_retval, _hidl_wrapped__hidl_out_inStream, _hidl_out_suggestedConfig);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<bool> supportsAudioPatches() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::supportsAudioPatches::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "supportsAudioPatches", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->supportsAudioPatches();
bool _hidl_out_supports = _hidl_return;
(void) _hidl_out_supports;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_supports);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "supportsAudioPatches", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> createAudioPatch(const ::android::hardware::hidl_vec<::android::hardware::audio::common::V5_0::AudioPortConfig>& sources, const ::android::hardware::hidl_vec<::android::hardware::audio::common::V5_0::AudioPortConfig>& sinks, createAudioPatch_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::createAudioPatch::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&sources);
_hidl_args.push_back((void *)&sinks);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "createAudioPatch", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->createAudioPatch(sources, sinks, [&](const auto &_hidl_out_retval, const auto &_hidl_out_patch) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_patch);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "createAudioPatch", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_patch);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> releaseAudioPatch(int32_t patch) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::releaseAudioPatch::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&patch);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "releaseAudioPatch", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->releaseAudioPatch(patch);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "releaseAudioPatch", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getAudioPort(const ::android::hardware::audio::common::V5_0::AudioPort& port, getAudioPort_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getAudioPort::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&port);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getAudioPort", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getAudioPort(port, [&](const auto &_hidl_out_retval, const auto &_hidl_out_resultPort) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_resultPort);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getAudioPort", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_resultPort);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setAudioPortConfig(const ::android::hardware::audio::common::V5_0::AudioPortConfig& config) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setAudioPortConfig::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&config);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setAudioPortConfig", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setAudioPortConfig(config);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setAudioPortConfig", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getHwAvSync(getHwAvSync_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getHwAvSync::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getHwAvSync", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getHwAvSync([&](const auto &_hidl_out_retval, const auto &_hidl_out_hwAvSync) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_hwAvSync);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getHwAvSync", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_hwAvSync);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setScreenState(bool turnedOn) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setScreenState::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&turnedOn);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setScreenState", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setScreenState(turnedOn);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setScreenState", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getParameters(const ::android::hardware::hidl_vec<::android::hardware::audio::V5_0::ParameterValue>& context, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& keys, getParameters_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getParameters::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&context);
_hidl_args.push_back((void *)&keys);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getParameters", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getParameters(context, keys, [&](const auto &_hidl_out_retval, const auto &_hidl_out_parameters) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_parameters);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getParameters", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_parameters);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setParameters(const ::android::hardware::hidl_vec<::android::hardware::audio::V5_0::ParameterValue>& context, const ::android::hardware::hidl_vec<::android::hardware::audio::V5_0::ParameterValue>& parameters) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setParameters::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&context);
_hidl_args.push_back((void *)&parameters);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setParameters", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setParameters(context, parameters);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setParameters", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getMicrophones(getMicrophones_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getMicrophones::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "getMicrophones", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getMicrophones([&](const auto &_hidl_out_retval, const auto &_hidl_out_microphones) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_microphones);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "getMicrophones", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_microphones);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setConnectedState(const ::android::hardware::audio::common::V5_0::DeviceAddress& address, bool connected) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setConnectedState::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&address);
_hidl_args.push_back((void *)&connected);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IDevice", "setConnectedState", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setConnectedState(address, connected);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IDevice", "setConnectedState", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hardware::audio::V5_0::IPrimaryDevice follow.
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setVoiceVolume(float volume) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setVoiceVolume::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&volume);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setVoiceVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setVoiceVolume(volume);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setVoiceVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setMode(::android::hardware::audio::common::V5_0::AudioMode mode) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setMode::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&mode);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setMode(mode);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtScoHeadsetDebugName(const ::android::hardware::hidl_string& name) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtScoHeadsetDebugName::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&name);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoHeadsetDebugName", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtScoHeadsetDebugName(name);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoHeadsetDebugName", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getBtScoNrecEnabled(getBtScoNrecEnabled_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getBtScoNrecEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtScoNrecEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getBtScoNrecEnabled([&](const auto &_hidl_out_retval, const auto &_hidl_out_enabled) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtScoNrecEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_enabled);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtScoNrecEnabled(bool enabled) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtScoNrecEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoNrecEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtScoNrecEnabled(enabled);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoNrecEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getBtScoWidebandEnabled(getBtScoWidebandEnabled_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getBtScoWidebandEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtScoWidebandEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getBtScoWidebandEnabled([&](const auto &_hidl_out_retval, const auto &_hidl_out_enabled) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtScoWidebandEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_enabled);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtScoWidebandEnabled(bool enabled) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtScoWidebandEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoWidebandEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtScoWidebandEnabled(enabled);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtScoWidebandEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getBtHfpEnabled(getBtHfpEnabled_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getBtHfpEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtHfpEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getBtHfpEnabled([&](const auto &_hidl_out_retval, const auto &_hidl_out_enabled) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "getBtHfpEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_enabled);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtHfpEnabled(bool enabled) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtHfpEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtHfpEnabled(enabled);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtHfpSampleRate(uint32_t sampleRateHz) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtHfpSampleRate::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&sampleRateHz);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpSampleRate", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtHfpSampleRate(sampleRateHz);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpSampleRate", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setBtHfpVolume(float volume) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setBtHfpVolume::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&volume);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setBtHfpVolume(volume);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setBtHfpVolume", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getTtyMode(getTtyMode_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getTtyMode::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "getTtyMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getTtyMode([&](const auto &_hidl_out_retval, const auto &_hidl_out_mode) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_mode);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "getTtyMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_mode);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setTtyMode(::android::hardware::audio::V5_0::IPrimaryDevice::TtyMode mode) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setTtyMode::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&mode);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setTtyMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setTtyMode(mode);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setTtyMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getHacEnabled(getHacEnabled_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getHacEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "getHacEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getHacEnabled([&](const auto &_hidl_out_retval, const auto &_hidl_out_enabled) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
_hidl_args.push_back((void *)&_hidl_out_enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "getHacEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_retval, _hidl_out_enabled);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> setHacEnabled(bool enabled) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::setHacEnabled::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&enabled);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "setHacEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setHacEnabled(enabled);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "setHacEnabled", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::audio::V5_0::Result> updateRotation(::android::hardware::audio::V5_0::IPrimaryDevice::Rotation rotation) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::updateRotation::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&rotation);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.audio", "5.0", "IPrimaryDevice", "updateRotation", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->updateRotation(rotation);
::android::hardware::audio::V5_0::Result _hidl_out_retval = _hidl_return;
(void) _hidl_out_retval;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_retval);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.audio", "5.0", "IPrimaryDevice", "updateRotation", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hidl::base::V1_0::IBase follow.
::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::interfaceChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceChain([&](const auto &_hidl_out_descriptors) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptors);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptors);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::debug::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&fd);
_hidl_args.push_back((void *)&options);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->debug(fd, options);
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::interfaceDescriptor::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceDescriptor([&](const auto &_hidl_out_descriptor) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptor);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptor);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getHashChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getHashChain([&](const auto &_hidl_out_hashchain) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_hashchain);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_hashchain);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> setHALInstrumentation() override {
configureInstrumentation();
return ::android::hardware::Void();
}
::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::linkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
_hidl_args.push_back((void *)&cookie);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->linkToDeath(recipient, cookie);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> ping() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::ping::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->ping();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::getDebugInfo::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getDebugInfo([&](const auto &_hidl_out_info) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_info);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_info);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> notifySyspropsChanged() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::notifySyspropsChanged::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = addOnewayTask([mImpl = this->mImpl
#ifdef __ANDROID_DEBUGGABLE__
, mEnableInstrumentation = this->mEnableInstrumentation, mInstrumentationCallbacks = this->mInstrumentationCallbacks
#endif // __ANDROID_DEBUGGABLE__
] {
mImpl->notifySyspropsChanged();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
});
return _hidl_return;
}
::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPrimaryDevice::unlinkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->unlinkToDeath(recipient);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
private:
const ::android::sp<IPrimaryDevice> mImpl;
::android::hardware::details::TaskRunner mOnewayQueue;
::android::hardware::Return<void> addOnewayTask(std::function<void(void)>);
};
} // namespace V5_0
} // namespace audio
} // namespace hardware
} // namespace android
#endif // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V5_0_BSPRIMARYDEVICE_H