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 Original line Diff line number Diff line
@@ -42,11 +42,20 @@ struct DescribeColorFormat2Params;
struct DataConverter;
struct DataConverter;


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

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


struct ACodec : public AHierarchicalStateMachine, public CodecBase {
struct ACodec : public AHierarchicalStateMachine, public CodecBase {
+1 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,7 @@ LOCAL_SHARED_LIBRARIES += \
    android.hardware.audio.common@2.0      \
    android.hardware.audio.common@2.0      \
    android.hardware.audio.common@2.0-util \
    android.hardware.audio.common@2.0-util \
    android.hardware.audio.effect@2.0      \
    android.hardware.audio.effect@2.0      \
    android.hidl.allocator@1.0             \
    android.hidl.memory@1.0                \
    android.hidl.memory@1.0                \
    libmedia_helper  \
    libmedia_helper  \
    libmediautils
    libmediautils
+2 −2
Original line number Original line Diff line number Diff line
@@ -19,7 +19,7 @@
#define LOG_TAG "EffectBufferHalHidl"
#define LOG_TAG "EffectBufferHalHidl"
//#define LOG_NDEBUG 0
//#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 <hidlmemory/mapping.h>
#include <utils/Log.h>
#include <utils/Log.h>


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


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


namespace android {
namespace android {


+2 −2
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
#define LOG_TAG "EffectsFactoryHalHidl"
#define LOG_TAG "EffectsFactoryHalHidl"
//#define LOG_NDEBUG 0
//#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 <cutils/native_handle.h>
#include <hidl/ServiceManagement.h>
#include <hidl/ServiceManagement.h>
#include <media/EffectsFactoryApi.h>
#include <media/EffectsFactoryApi.h>
@@ -50,7 +50,7 @@ EffectsFactoryHalHidl::EffectsFactoryHalHidl() : ConversionHelperHidl("EffectsFa
    // TODO: Waiting should not be needed (b/34772726).
    // TODO: Waiting should not be needed (b/34772726).
    // Also remove include of IAllocator.h and ServiceManagement.h
    // Also remove include of IAllocator.h and ServiceManagement.h
    android::hardware::details::waitForHwService(
    android::hardware::details::waitForHwService(
            hidl::memory::V1_0::IAllocator::descriptor, "ashmem");
            hidl::allocator::V1_0::IAllocator::descriptor, "ashmem");
}
}


EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {
EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {
+1 −1
Original line number Original line Diff line number Diff line
@@ -61,7 +61,7 @@
#include "include/SharedMemoryBuffer.h"
#include "include/SharedMemoryBuffer.h"
#include "omx/OMXUtils.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 <android/hidl/memory/1.0/IMemory.h>
#include "omx/hal/1.0/utils/WOmxNode.h"
#include "omx/hal/1.0/utils/WOmxNode.h"


Loading