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

Commit d4601202 authored by Kevin Rocard's avatar Kevin Rocard Committed by Android (Google) Code Review
Browse files

Merge changes from topic "audio-pre-v5"

* changes:
  libaudiohal: EnumConverter renamed to EnumBitfield
  libaudiohal: Factorize with audio HAL utils
  libaudiohal: Factorize more between version
parents 2a2837d0 7a9f05a6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ cc_library_shared {
    cflags: [
        "-DMAJOR_VERSION=2",
        "-DMINOR_VERSION=0",
        "-include VersionMacro.h",
        "-include common/all-versions/VersionMacro.h",
    ]
}

@@ -81,6 +81,6 @@ cc_library_shared {
    cflags: [
        "-DMAJOR_VERSION=4",
        "-DMINOR_VERSION=0",
        "-include VersionMacro.h",
        "-include common/all-versions/VersionMacro.h",
    ]
}
+1 −2
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
#ifndef ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_H
#define ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_H

#include <android/hardware/audio/2.0/types.h>
#include <android/hardware/audio/4.0/types.h>
#include PATH(android/hardware/audio/FILE_VERSION/types.h)
#include <hidl/HidlSupport.h>
#include <system/audio.h>
#include <utils/String8.h>
+4 −5
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
#define LOG_TAG "DeviceHalHidl"
//#define LOG_NDEBUG 0

#include <android/hardware/audio/2.0/IPrimaryDevice.h>
#include <android/hardware/audio/4.0/IPrimaryDevice.h>
#include PATH(android/hardware/audio/FILE_VERSION/IPrimaryDevice.h)
#include <cutils/native_handle.h>
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
@@ -42,7 +41,7 @@ using ::android::hardware::audio::common::CPP_VERSION::AudioPortConfig;
using ::android::hardware::audio::common::CPP_VERSION::AudioMode;
using ::android::hardware::audio::common::CPP_VERSION::AudioSource;
using ::android::hardware::audio::common::CPP_VERSION::HidlUtils;
using ::android::hardware::audio::common::utils::mkEnumConverter;
using ::android::hardware::audio::common::utils::EnumBitfield;
using ::android::hardware::audio::CPP_VERSION::DeviceAddress;
using ::android::hardware::audio::CPP_VERSION::IPrimaryDevice;
using ::android::hardware::audio::CPP_VERSION::ParameterValue;
@@ -262,7 +261,7 @@ status_t DeviceHalHidl::openOutputStream(
            handle,
            hidlDevice,
            hidlConfig,
            mkEnumConverter<AudioOutputFlag>(flags),
            EnumBitfield<AudioOutputFlag>(flags),
#if MAJOR_VERSION == 4
            {} /* metadata */,
#endif
@@ -302,7 +301,7 @@ status_t DeviceHalHidl::openInputStream(
            handle,
            hidlDevice,
            hidlConfig,
            mkEnumConverter<AudioInputFlag>(flags),
            EnumBitfield<AudioInputFlag>(flags),
            sourceMetadata,
            [&](Result r, const sp<IStreamIn>& result, const AudioConfig& suggestedConfig) {
                retval = r;
+2 −4
Original line number Diff line number Diff line
@@ -17,10 +17,8 @@
#ifndef ANDROID_HARDWARE_DEVICE_HAL_HIDL_H
#define ANDROID_HARDWARE_DEVICE_HAL_HIDL_H

#include <android/hardware/audio/2.0/IDevice.h>
#include <android/hardware/audio/4.0/IDevice.h>
#include <android/hardware/audio/2.0/IPrimaryDevice.h>
#include <android/hardware/audio/4.0/IPrimaryDevice.h>
#include PATH(android/hardware/audio/FILE_VERSION/IDevice.h)
#include PATH(android/hardware/audio/FILE_VERSION/IPrimaryDevice.h)
#include <media/audiohal/DeviceHalInterface.h>

#include "ConversionHelperHidl.h"
+1 −2
Original line number Diff line number Diff line
@@ -20,8 +20,7 @@
#define LOG_TAG "DevicesFactoryHalHidl"
//#define LOG_NDEBUG 0

#include <android/hardware/audio/2.0/IDevice.h>
#include <android/hardware/audio/4.0/IDevice.h>
#include PATH(android/hardware/audio/FILE_VERSION/IDevice.h)
#include <media/audiohal/hidl/HalDeathHandler.h>
#include <utils/Log.h>

Loading