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

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

audio: Add android.hardware.audio[.common]@7.1-util modules am: ec8ef38a

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

Change-Id: Icc048416563b33e5dbe27af6ff920ee271027afc
parents 84a54dfc ec8ef38a
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -157,6 +157,28 @@ cc_library {
    ],
}

cc_library {
    name: "android.hardware.audio.common@7.1-util",
    defaults: ["android.hardware.audio.common-util_default"],
    srcs: [
        "7.0/HidlUtils.cpp",
        "HidlUtilsCommon.cpp",
        "UuidUtils.cpp",
    ],
    shared_libs: [
        "android.hardware.audio.common@7.0",
        "android.hardware.audio.common@7.1-enums",
        "libbase",
    ],
    cflags: [
        "-DMAJOR_VERSION=7",
        "-DMINOR_VERSION=1",
        "-DCOMMON_TYPES_MINOR_VERSION=0",
        "-DCORE_TYPES_MINOR_VERSION=0",
        "-include common/all-versions/VersionMacro.h",
    ],
}

// Note: this isn't a VTS test, but rather a unit test
// to verify correctness of conversion utilities.
cc_test {
@@ -214,3 +236,35 @@ cc_test {

    test_suites: ["device-tests"],
}

cc_test {
    name: "android.hardware.audio.common@7.1-util_tests",
    defaults: ["android.hardware.audio.common-util_default"],

    srcs: ["tests/hidlutils_tests.cpp"],

    // Use static linking to allow running in presubmit on
    // targets that don't have HAL V7.1.
    static_libs: [
        "android.hardware.audio.common@7.1-enums",
        "android.hardware.audio.common@7.1-util",
        "android.hardware.audio.common@7.0",
    ],

    shared_libs: [
        "libbase",
        "libxml2",
    ],

    cflags: [
        "-Werror",
        "-Wall",
        "-DMAJOR_VERSION=7",
        "-DMINOR_VERSION=1",
        "-DCOMMON_TYPES_MINOR_VERSION=0",
        "-DCORE_TYPES_MINOR_VERSION=0",
        "-include common/all-versions/VersionMacro.h",
    ],

    test_suites: ["device-tests"],
}
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ namespace android {
namespace hardware {
namespace audio {
namespace common {
namespace CPP_VERSION {
namespace COMMON_TYPES_CPP_VERSION {
namespace implementation {

status_t HidlUtils::audioPortConfigsFromHal(unsigned int numHalConfigs,
@@ -51,7 +51,7 @@ status_t HidlUtils::audioPortConfigsToHal(const hidl_vec<AudioPortConfig>& confi
}

}  // namespace implementation
}  // namespace CPP_VERSION
}  // namespace COMMON_TYPES_CPP_VERSION
}  // namespace common
}  // namespace audio
}  // namespace hardware
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
    },
    {
      "name": "android.hardware.audio.common@7.0-util_tests"
    },
    {
      "name": "android.hardware.audio.common@7.1-util_tests"
    }
  ]
}
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include <log/log.h>

#include <HidlUtils.h>
#include <android_audio_policy_configuration_V7_0-enums.h>
#include PATH(APM_XSD_ENUMS_H_FILENAME)
#include <system/audio.h>
#include <xsdc/XsdcSupport.h>

@@ -32,7 +32,7 @@ using ::android::hardware::hidl_vec;
using namespace ::android::hardware::audio::common::COMMON_TYPES_CPP_VERSION;
using ::android::hardware::audio::common::COMMON_TYPES_CPP_VERSION::implementation::HidlUtils;
namespace xsd {
using namespace ::android::audio::policy::configuration::V7_0;
using namespace ::android::audio::policy::configuration::CPP_VERSION;
}

static constexpr audio_channel_mask_t kInvalidHalChannelMask = AUDIO_CHANNEL_INVALID;
+2 −2
Original line number Diff line number Diff line
@@ -168,10 +168,10 @@ cc_defaults {
    shared_libs: [
        "android.hardware.audio@7.0",
        "android.hardware.audio@7.1",
        "android.hardware.audio@7.0-util",
        "android.hardware.audio@7.1-util",
        "android.hardware.audio.common@7.0",
        "android.hardware.audio.common@7.1-enums",
        "android.hardware.audio.common@7.0-util",
        "android.hardware.audio.common@7.1-util",
        "libbase",
    ],
    cflags: [
Loading