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

Commit 2ebda6a1 authored by Kevin Rocard's avatar Kevin Rocard Committed by android-build-merger
Browse files

Audio V4: Implement the shim core 4.0 -> legacy

am: 5ec29331

Change-Id: I92f49388a021a7573890ce751b76d39c3c21c3f0
parents 47decd1b 5ec29331
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ namespace implementation {

typedef common::V2_0::AudioDevice AudioDeviceBitfield;
typedef common::V2_0::AudioChannelMask AudioChannelBitfield;
typedef common::V2_0::AudioOutputFlag AudioOutputFlagBitfield;
typedef common::V2_0::AudioInputFlag AudioInputFlagBitfield;

}  // namespace implementation
}  // namespace V2_0
+3 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
#define ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H

#include <android/hardware/audio/4.0/types.h>
#include <android/hardware/audio/common/4.0/types.h>

namespace android {
namespace hardware {
@@ -28,6 +28,8 @@ namespace implementation {

typedef hidl_bitfield<common::V4_0::AudioDevice> AudioDeviceBitfield;
typedef hidl_bitfield<common::V4_0::AudioChannelMask> AudioChannelBitfield;
typedef hidl_bitfield<common::V4_0::AudioOutputFlag> AudioOutputFlagBitfield;
typedef hidl_bitfield<common::V4_0::AudioInputFlag> AudioInputFlagBitfield;

}  // namespace implementation
}  // namespace V4_0
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ cc_library_shared {
        "StreamOut.cpp",
    ],

    cflags: [
        "-DAUDIO_HAL_VERSION_2_0",
    ],

    defaults: ["hidl_defaults"],

    export_include_dirs: ["include"],
+53 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "android.hardware.audio@4.0-impl",
    relative_install_path: "hw",
    proprietary: true,
    vendor: true,
    srcs: [
        "Conversions.cpp",
        "Device.cpp",
        "DevicesFactory.cpp",
        "ParametersUtil.cpp",
        "PrimaryDevice.cpp",
        "Stream.cpp",
        "StreamIn.cpp",
        "StreamOut.cpp",
    ],

    cflags: [
        "-DAUDIO_HAL_VERSION_4_0",
    ],

    defaults: ["hidl_defaults"],

    export_include_dirs: ["include"],

    shared_libs: [
        "libbase",
        "libcutils",
        "libfmq",
        "libhardware",
        "libhidlbase",
        "libhidltransport",
        "liblog",
        "libutils",
        "android.hardware.audio@4.0",
        "android.hardware.audio.common@4.0",
        "android.hardware.audio.common@4.0-util",
        "android.hardware.audio.common-util",
    ],

    header_libs: [
        "android.hardware.audio.common.util@all-versions",
        "android.hardware.audio.core@all-versions-impl",
        "libaudioclient_headers",
        "libaudio_system_headers",
        "libhardware_headers",
        "libmedia_headers",
    ],

    whole_static_libs: [
        "libmedia_helper",
    ],

}
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "core/4.0/default/Conversions.h"

#define AUDIO_HAL_VERSION V4_0
#include <core/all-versions/default/Conversions.impl.h>
#undef AUDIO_HAL_VERSION
Loading