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

Commit 13a92687 authored by Steven Moreland's avatar Steven Moreland
Browse files

Use hidl.allocator for IAllocator.

android.hidl.memory is being split into android.hidl.memory and
android.hidl.allocator since the former is a passthrough hal and the
latter is a binderized service.

Bug: 35327976
Test: hidl_test, lshal, youtube/camera works
Change-Id: I7a2e72dcd3721d2689eb7ef95f5b140ecc1c446f
parent 09b92c34
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -42,11 +42,20 @@ struct DescribeColorFormat2Params;
struct DataConverter;

// Treble shared memory
namespace hidl { namespace memory { namespace V1_0 {
namespace hidl {
namespace allocator {
namespace V1_0 {
struct IAllocator;
} // V1_0
} // allocator
namespace memory {
namespace V1_0 {
struct IMemory;
}}};
typedef hidl::memory::V1_0::IAllocator TAllocator;
} // V1_0
} // memory
} // hidl

typedef hidl::allocator::V1_0::IAllocator TAllocator;
typedef hidl::memory::V1_0::IMemory TMemory;

struct ACodec : public AHierarchicalStateMachine, public CodecBase {
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ LOCAL_SHARED_LIBRARIES += \
    android.hardware.audio.common@2.0      \
    android.hardware.audio.common@2.0-util \
    android.hardware.audio.effect@2.0      \
    android.hidl.allocator@1.0             \
    android.hidl.memory@1.0                \
    libmedia_helper  \
    libmediautils
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
#define LOG_TAG "EffectBufferHalHidl"
//#define LOG_NDEBUG 0

#include <android/hidl/memory/1.0/IAllocator.h>
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <hidlmemory/mapping.h>
#include <utils/Log.h>

@@ -28,7 +28,7 @@

using ::android::hardware::Return;
using ::android::hardware::Status;
using ::android::hidl::memory::V1_0::IAllocator;
using ::android::hidl::allocator::V1_0::IAllocator;

namespace android {

+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#define LOG_TAG "EffectsFactoryHalHidl"
//#define LOG_NDEBUG 0

#include <android/hidl/memory/1.0/IAllocator.h>
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <cutils/native_handle.h>
#include <hidl/ServiceManagement.h>
#include <media/EffectsFactoryApi.h>
@@ -50,7 +50,7 @@ EffectsFactoryHalHidl::EffectsFactoryHalHidl() : ConversionHelperHidl("EffectsFa
    // TODO: Waiting should not be needed (b/34772726).
    // Also remove include of IAllocator.h and ServiceManagement.h
    android::hardware::details::waitForHwService(
            hidl::memory::V1_0::IAllocator::descriptor, "ashmem");
            hidl::allocator::V1_0::IAllocator::descriptor, "ashmem");
}

EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@
#include "include/SharedMemoryBuffer.h"
#include "omx/OMXUtils.h"

#include <android/hidl/memory/1.0/IAllocator.h>
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include "omx/hal/1.0/utils/WOmxNode.h"

Loading