audio: clean up makefiles

* Restructure to remove dependencies elsewhere in the AOSP tree, move APEX
  definition from subdirectory, 'bpfmt -s -w Andoid.bp', etc.
* Remove package license definitions that are not visible in this context.
This commit is contained in:
Konsta
2025-10-22 18:34:31 +03:00
parent 375a38c961
commit a0f3530f2e
8 changed files with 85 additions and 204 deletions

View File

@@ -1,34 +1,35 @@
package {
default_team: "trendy_team_android_media_audio_framework",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
// Copyright (C) 2022 The Android Open Source Project
// Copyright (C) 2025 KonstaKANG
//
// SPDX-License-Identifier: Apache-2.0
cc_defaults {
name: "aidlaudioservice_rpi_defaults",
vendor: true,
shared_libs: [
"android.hardware.audio.core-V3-ndk",
"android.hardware.audio.core.sounddose-V3-ndk",
"android.hardware.bluetooth.audio-V5-ndk",
"android.hardware.bluetooth.audio-impl",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"android.media.audio.common.types-V4-ndk",
"libalsautilsv2-rpi",
"libaudio_aidl_conversion_common_ndk",
"libaudioaidlcommon",
"libaudioutils",
"libbase",
"libbinder_ndk",
"libbluetooth_audio_session_aidl",
"libcutils",
"libfmq",
"libnbaio_mono",
"liblog",
"libmedia_helper",
"libnbaio_mono",
"libstagefright_foundation",
"libtinyalsav2",
"libutils",
"libxml2",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
],
header_libs: [
"libaudio_system_headers",
@@ -37,18 +38,16 @@ cc_defaults {
],
cflags: [
"-DBACKEND_NDK",
"-Wall",
"-Werror",
"-Wextra",
"-Wthread-safety",
],
}
cc_library {
name: "libaudioserviceimpl-rpi",
defaults: [
"aidlaudioservice_rpi_defaults",
"latest_android_media_audio_common_types_ndk_shared",
"latest_android_hardware_audio_core_ndk_shared",
"latest_android_hardware_audio_core_sounddose_ndk_shared",
"latest_android_hardware_bluetooth_audio_ndk_shared",
],
defaults: ["aidlaudioservice_rpi_defaults"],
export_include_dirs: ["include"],
srcs: [
"AidlConversionXsdc.cpp",
@@ -75,8 +74,8 @@ cc_library {
"primary/PrimaryMixer.cpp",
"primary/StreamPrimary.cpp",
"r_submix/ModuleRemoteSubmix.cpp",
"r_submix/SubmixRoute.cpp",
"r_submix/StreamRemoteSubmix.cpp",
"r_submix/SubmixRoute.cpp",
"stub/ApeHeader.cpp",
"stub/DriverStubImpl.cpp",
"stub/ModuleStub.cpp",
@@ -103,49 +102,22 @@ cc_library {
"audio_policy_engine_configuration_aidl_rpi",
],
shared_libs: [
"android.hardware.bluetooth.audio-impl",
"libaudio_aidl_conversion_common_ndk",
"libaudioutils",
"libbluetooth_audio_session_aidl",
"liblog",
"libmedia_helper",
"libmediautils_vendor",
"libstagefright_foundation",
],
export_shared_lib_headers: [
"libaudio_aidl_conversion_common_ndk",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wthread-safety",
"-DBACKEND_NDK",
],
}
cc_library {
name: "libeffectconfig-rpi",
defaults: ["aidlaudioeffectservice_rpi_defaults"],
srcs: [
"EffectConfig.cpp",
],
defaults: [
"latest_android_hardware_audio_effect_ndk_shared",
"latest_android_media_audio_common_types_ndk_shared",
],
shared_libs: [
"libaudioutils",
"libaudio_aidl_conversion_common_ndk",
"libbase",
"libbinder_ndk",
"liblog",
"libmedia_helper",
"libtinyxml2",
"libutils",
],
header_libs: [
"libaudio_system_headers",
"libaudioaidl_rpi_headers",
],
export_shared_lib_headers: [
"libtinyxml2",
@@ -153,86 +125,42 @@ cc_library {
export_include_dirs: [
"include",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-DBACKEND_NDK",
],
vendor: true,
host_supported: true,
target: {
android: {
shared_libs: [
"libapexsupport",
],
},
},
}
cc_binary {
name: "android.hardware.audio.service.rpi",
relative_install_path: "hw",
defaults: [
"aidlaudioservice_rpi_defaults",
"latest_android_hardware_audio_core_sounddose_ndk_shared",
"latest_android_hardware_audio_core_ndk_shared",
"latest_android_hardware_bluetooth_audio_ndk_shared",
"latest_android_media_audio_common_types_ndk_shared",
],
defaults: ["aidlaudioservice_rpi_defaults"],
static_libs: [
"libaudioserviceimpl-rpi",
],
shared_libs: [
"android.hardware.bluetooth.audio-impl",
"libaudio_aidl_conversion_common_ndk",
"libbluetooth_audio_session_aidl",
"liblog",
"libmedia_helper",
"libstagefright_foundation",
],
srcs: ["main.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wthread-safety",
"-DBACKEND_NDK",
],
installable: false, //installed in apex com.android.hardware.audio.rpi5
installable: false,
}
cc_defaults {
name: "aidlaudioeffectservice_rpi_defaults",
defaults: [
"latest_android_media_audio_common_types_ndk_shared",
"latest_android_hardware_audio_effect_ndk_shared",
],
vendor: true,
shared_libs: [
"android.hardware.audio.effect-V3-ndk",
"android.media.audio.common.types-V4-ndk",
"libapexsupport",
"libaudio_aidl_conversion_common_ndk",
"libaudioaidlcommon",
"libaudioutils",
"libbase",
"libbinder_ndk",
"libcutils",
"libfmq",
"liblog",
"libutils",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
],
header_libs: [
"libaudioaidl_rpi_headers",
"libaudio_system_headers",
"libsystem_headers",
"libaudioaidl_rpi_headers",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wthread-safety",
"-DBACKEND_NDK",
"-Wall",
"-Werror",
"-Wextra",
],
}
@@ -241,21 +169,30 @@ cc_binary {
relative_install_path: "hw",
defaults: ["aidlaudioeffectservice_rpi_defaults"],
shared_libs: [
"libapexsupport",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"libaudioaidlcommon",
"libcutils",
"libeffectconfig-rpi",
"libfmq",
],
header_libs: [
"libsystem_headers",
],
srcs: [
"EffectFactory.cpp",
"EffectMain.cpp",
],
installable: false, //installed in apex com.android.hardware.audio.rpi5
cflags: [
"-Wthread-safety",
],
installable: false,
}
cc_library_headers {
name: "libaudioaidl_rpi_headers",
export_include_dirs: ["include"],
vendor_available: true,
host_supported: true,
}
prebuilt_etc {
@@ -270,3 +207,30 @@ prebuilt_etc {
sub_dir: "vintf",
installable: false,
}
apex {
name: "com.android.hardware.audio.rpi5",
manifest: "manifest.json",
file_contexts: "file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
vendor: true,
binaries: [
"android.hardware.audio.effect.service.rpi",
"android.hardware.audio.service.rpi",
],
prebuilts: [
"android.hardware.audio.service.rpi.rc",
"android.hardware.audio.service.rpi.xml",
"android.hardware.bluetooth.audio.xml",
],
required: [
"aidl_audio_set_configurations_bfbs",
"aidl_audio_set_scenarios_bfbs",
"aidl_default_audio_set_configurations_json",
"aidl_default_audio_set_scenarios_json",
"hfp_codec_capabilities_xml",
],
}

View File

@@ -1,27 +1,10 @@
// Copyright (C) 2015 The Android Open Source Project
// Copyright (C) 2025 KonstaKANG
//
// 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.
// SPDX-License-Identifier: Apache-2.0
package {
// http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// the below license kinds from "system_media_license":
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["system_media_license"],
}
cc_defaults {
name: "libalsautils_rpi_defaults",
cc_library {
name: "libalsautilsv2-rpi",
vendor_available: true,
srcs: [
"alsa_device_profile.c",
@@ -40,6 +23,7 @@ cc_defaults {
"libaudioutils",
"libcutils",
"liblog",
"libtinyalsav2",
],
cflags: [
"-Wall",
@@ -47,19 +31,3 @@ cc_defaults {
"-Wno-unused-parameter",
],
}
cc_library {
name: "libalsautils-rpi",
defaults: ["libalsautils_rpi_defaults"],
shared_libs: [
"libtinyalsa",
],
}
cc_library {
name: "libalsautilsv2-rpi",
defaults: ["libalsautils_rpi_defaults"],
shared_libs: [
"libtinyalsav2",
],
}

View File

@@ -1,36 +0,0 @@
package {
default_team: "trendy_team_android_media_audio_framework",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
apex {
name: "com.android.hardware.audio.rpi5",
manifest: "manifest.json",
file_contexts: "file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
vendor: true,
binaries: [
"android.hardware.audio.service.rpi",
"android.hardware.audio.effect.service.rpi",
],
prebuilts: [
"android.hardware.audio.service.rpi.rc",
"android.hardware.audio.service.rpi.xml",
"android.hardware.bluetooth.audio.xml",
],
required: [
"aidl_audio_set_configurations_bfbs",
"aidl_default_audio_set_configurations_json",
"aidl_audio_set_scenarios_bfbs",
"aidl_default_audio_set_scenarios_json",
"hfp_codec_capabilities_xml",
],
}

View File

@@ -1,12 +1,7 @@
package {
default_team: "trendy_team_android_media_audio_framework",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
// Copyright (C) 2022 The Android Open Source Project
// Copyright (C) 2025 KonstaKANG
//
// SPDX-License-Identifier: Apache-2.0
xsd_config {
name: "audio_policy_configuration_aidl_rpi",

View File

@@ -1,12 +1,7 @@
package {
default_team: "trendy_team_android_media_audio_framework",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
// Copyright (C) 2022 The Android Open Source Project
// Copyright (C) 2025 KonstaKANG
//
// SPDX-License-Identifier: Apache-2.0
xsd_config {
name: "audio_policy_capengine_configuration_aidl_rpi",

View File

@@ -1,12 +1,7 @@
package {
default_team: "trendy_team_android_media_audio_framework",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
// Copyright (C) 2022 The Android Open Source Project
// Copyright (C) 2025 KonstaKANG
//
// SPDX-License-Identifier: Apache-2.0
xsd_config {
name: "audio_policy_engine_configuration_aidl_rpi",