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

Commit 3271045e authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

Audio HAL V7.1: Update the default implementation am: 8140f566

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1973701

Change-Id: I744d25b19172b8afd94dfc910353059a2a2198e2
parents 54e9a3a8 8140f566
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#define LOG_TAG "HidlUtils"
#include <log/log.h>

#include <android_audio_policy_configuration_V7_0-enums.h>
#include PATH(APM_XSD_ENUMS_H_FILENAME)
#include <common/all-versions/HidlSupport.h>
#include <common/all-versions/VersionUtils.h>

@@ -31,11 +31,11 @@ namespace android {
namespace hardware {
namespace audio {
namespace common {
namespace CPP_VERSION {
namespace COMMON_TYPES_CPP_VERSION {
namespace implementation {

namespace xsd {
using namespace ::android::audio::policy::configuration::V7_0;
using namespace ::android::audio::policy::configuration::CPP_VERSION;
}

#define CONVERT_CHECKED(expr, result)                   \
@@ -1151,7 +1151,7 @@ status_t HidlUtils::deviceAddressToHal(const DeviceAddress& device, audio_device
}

}  // namespace implementation
}  // namespace CPP_VERSION
}  // namespace COMMON_TYPES_CPP_VERSION
}  // namespace common
}  // namespace audio
}  // namespace hardware
+6 −4
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
#ifndef android_hardware_audio_Hidl_Utils_H_
#define android_hardware_audio_Hidl_Utils_H_

#include PATH(android/hardware/audio/common/FILE_VERSION/types.h)
// clang-format off
#include PATH(android/hardware/audio/common/COMMON_TYPES_FILE_VERSION/types.h)
// clang-format on

#include <memory>
#include <string>
@@ -29,11 +31,11 @@ namespace android {
namespace hardware {
namespace audio {
namespace common {
namespace CPP_VERSION {
namespace COMMON_TYPES_CPP_VERSION {
namespace implementation {

using ::android::hardware::hidl_vec;
using namespace ::android::hardware::audio::common::CPP_VERSION;
using namespace ::android::hardware::audio::common::COMMON_TYPES_CPP_VERSION;

struct HidlUtils {
    static status_t audioConfigFromHal(const audio_config_t& halConfig, bool isInput,
@@ -267,7 +269,7 @@ status_t HidlUtils::deviceAddressFromHalImpl(audio_devices_t halDeviceType,
#endif  // MAJOR_VERSION <= 6

}  // namespace implementation
}  // namespace CPP_VERSION
}  // namespace COMMON_TYPES_CPP_VERSION
}  // namespace common
}  // namespace audio
}  // namespace hardware
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <string>

// clang-format off
#include PATH(android/hardware/audio/common/FILE_VERSION/types.h)
#include PATH(android/hardware/audio/common/COMMON_TYPES_FILE_VERSION/types.h)
// clang-format on

#include <system/audio.h>
@@ -32,7 +32,7 @@ namespace common {
namespace CPP_VERSION {
namespace implementation {

using namespace ::android::hardware::audio::common::CPP_VERSION;
using namespace ::android::hardware::audio::common::COMMON_TYPES_CPP_VERSION;

class UuidUtils {
  public:
+24 −1
Original line number Diff line number Diff line
@@ -17,7 +17,30 @@
#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
#define ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H

#include PATH(android/hardware/audio/common/FILE_VERSION/types.h)
// A workaround for b/216149583 (vendor code having its own copy of VersionMacro.h)
#ifndef COMMON_TYPES_MINOR_VERSION
#define COMMON_TYPES_MINOR_VERSION MINOR_VERSION
#endif
#ifndef CORE_TYPES_MINOR_VERSION
#define CORE_TYPES_MINOR_VERSION MINOR_VERSION
#endif
#ifndef COMMON_TYPES_FILE_VERSION
#define COMMON_TYPES_FILE_VERSION EXPAND_CONCAT_3(MAJOR_VERSION, ., COMMON_TYPES_MINOR_VERSION)
#endif
#ifndef CORE_TYPES_FILE_VERSION
#define CORE_TYPES_FILE_VERSION EXPAND_CONCAT_3(MAJOR_VERSION, ., CORE_TYPES_MINOR_VERSION)
#endif
#ifndef COMMON_TYPES_CPP_VERSION
#define COMMON_TYPES_CPP_VERSION EXPAND_CONCAT_4(V, MAJOR_VERSION, _, COMMON_TYPES_MINOR_VERSION)
#endif
#ifndef CORE_TYPES_CPP_VERSION
#define CORE_TYPES_CPP_VERSION EXPAND_CONCAT_4(V, MAJOR_VERSION, _, CORE_TYPES_MINOR_VERSION)
#endif
// End of workaround

// clang-format off
#include PATH(android/hardware/audio/common/COMMON_TYPES_FILE_VERSION/types.h)
// clang-format on

namespace android {
namespace hardware {
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ int main(int /* argc */, char* /* argv */ []) {
    const std::vector<InterfacesList> mandatoryInterfaces = {
        {
            "Audio Core API",
            "android.hardware.audio@7.1::IDevicesFactory",
            "android.hardware.audio@7.0::IDevicesFactory",
            "android.hardware.audio@6.0::IDevicesFactory",
            "android.hardware.audio@5.0::IDevicesFactory",
Loading