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

Commit 1770b3b4 authored by Kevin Rocard's avatar Kevin Rocard
Browse files

Audio HAL: Cleanup implementation



Rename files so that, if they are in a X.0 folder, their name does
not contain that version number. That allows for easier copy paste
when creating a new version.

Conversion.h was included from the all-versions instead of the X.0
headers. This in incoherent with the other headers.

Add VersionMacro.h that will be used in the follow up patch.

Also remove shim from VNDK as only stable ABI&API libraries should be
part of it.

Test: Compile
Bug: 118203066
Change-Id: I9cd77b3df5ccede5ae51c3cc94fab5939c51d9ef
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent 55b1061d
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -17,9 +17,6 @@ cc_library_shared {
    name: "android.hardware.audio.common-util",
    name: "android.hardware.audio.common-util",
    defaults: ["hidl_defaults"],
    defaults: ["hidl_defaults"],
    vendor_available: true,
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    srcs: [
    srcs: [
        "EffectMap.cpp",
        "EffectMap.cpp",
    ],
    ],
+0 −3
Original line number Original line Diff line number Diff line
@@ -2,9 +2,6 @@ cc_library_headers {
    name: "android.hardware.audio.common.util@all-versions",
    name: "android.hardware.audio.common.util@all-versions",
    defaults: ["hidl_defaults"],
    defaults: ["hidl_defaults"],
    vendor_available: true,
    vendor_available: true,
    vndk: {
        enabled: true,
    },


    export_include_dirs: ["include"],
    export_include_dirs: ["include"],
}
}
+43 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2018 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.
 */

#ifndef ANDROID_HARDWARE_VERSION_MACRO_H
#define ANDROID_HARDWARE_VERSION_MACRO_H

#if !defined(MAJOR_VERSION) || !defined(MINOR_VERSION)
#error "MAJOR_VERSION and MINOR_VERSION must be defined"
#endif

/** Allows macro expansion for x and add surrounding `<>`.
 * Is intended to be used for version dependant includes as
 * `#include` do not macro expand if starting with < or "
 * Example usage:
 *      #include PATH(path/to/FILE_VERSION/file)
 * @note: uses the implementation-define "Computed Includes" feature.
 */
#define PATH(x) <x>

#define CONCAT_3(a, b, c) a##b##c
#define EXPAND_CONCAT_3(a, b, c) CONCAT_3(a, b, c)
/** The directory name of the version: <major>.<minor> */
#define FILE_VERSION EXPAND_CONCAT_3(MAJOR_VERSION, ., MINOR_VERSION)

#define CONCAT_4(a, b, c, d) a##b##c##d
#define EXPAND_CONCAT_4(a, b, c, d) CONCAT_4(a, b, c, d)
/** The c++ namespace of the version: V<major>_<minor> */
#define CPP_VERSION EXPAND_CONCAT_4(V, MAJOR_VERSION, _, MINOR_VERSION)

#endif  // ANDROID_HARDWARE_VERSION_MACRO_H
+1 −0
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
 */
 */


#include "core/2.0/default/ParametersUtil.h"
#include "core/2.0/default/ParametersUtil.h"
#include "core/2.0/default/Conversions.h"
#include "core/2.0/default/Util.h"
#include "core/2.0/default/Util.h"


#define AUDIO_HAL_VERSION V2_0
#define AUDIO_HAL_VERSION V2_0
+1 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
#define LOG_TAG "StreamInHAL"
#define LOG_TAG "StreamInHAL"


#include "core/2.0/default/StreamIn.h"
#include "core/2.0/default/StreamIn.h"
#include "core/2.0/default/Conversions.h"
#include "core/2.0/default/Util.h"
#include "core/2.0/default/Util.h"


#define AUDIO_HAL_VERSION V2_0
#define AUDIO_HAL_VERSION V2_0
Loading