xref: /aosp_15_r20/hardware/libhardware/modules/audio/Android.bp (revision e01b6f769022e40d0923dee176e8dc7cd1d52984)
1*e01b6f76SAndroid Build Coastguard Worker// Copyright (C) 2011 The Android Open Source Project
2*e01b6f76SAndroid Build Coastguard Worker//
3*e01b6f76SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*e01b6f76SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*e01b6f76SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*e01b6f76SAndroid Build Coastguard Worker//
7*e01b6f76SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*e01b6f76SAndroid Build Coastguard Worker//
9*e01b6f76SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*e01b6f76SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*e01b6f76SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*e01b6f76SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*e01b6f76SAndroid Build Coastguard Worker// limitations under the License.
14*e01b6f76SAndroid Build Coastguard Worker
15*e01b6f76SAndroid Build Coastguard Worker// The default audio HAL module, which is a stub, that is loaded if no other
16*e01b6f76SAndroid Build Coastguard Worker// device specific modules are present. The exact load order can be seen in
17*e01b6f76SAndroid Build Coastguard Worker// libhardware/hardware.c
18*e01b6f76SAndroid Build Coastguard Worker//
19*e01b6f76SAndroid Build Coastguard Worker// The format of the name is audio.<type>.<hardware/etc>.so where the only
20*e01b6f76SAndroid Build Coastguard Worker// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
21*e01b6f76SAndroid Build Coastguard Workerpackage {
22*e01b6f76SAndroid Build Coastguard Worker    // See: http://go/android-license-faq
23*e01b6f76SAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
24*e01b6f76SAndroid Build Coastguard Worker    // all of the 'license_kinds' from "hardware_libhardware_license"
25*e01b6f76SAndroid Build Coastguard Worker    // to get the below license kinds:
26*e01b6f76SAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
27*e01b6f76SAndroid Build Coastguard Worker    default_applicable_licenses: ["hardware_libhardware_license"],
28*e01b6f76SAndroid Build Coastguard Worker}
29*e01b6f76SAndroid Build Coastguard Worker
30*e01b6f76SAndroid Build Coastguard Workercc_library_shared {
31*e01b6f76SAndroid Build Coastguard Worker    name: "audio.primary.default",
32*e01b6f76SAndroid Build Coastguard Worker    relative_install_path: "hw",
33*e01b6f76SAndroid Build Coastguard Worker    proprietary: true,
34*e01b6f76SAndroid Build Coastguard Worker    srcs: ["audio_hw.c"],
35*e01b6f76SAndroid Build Coastguard Worker    header_libs: ["libhardware_headers"],
36*e01b6f76SAndroid Build Coastguard Worker    shared_libs: [
37*e01b6f76SAndroid Build Coastguard Worker        "liblog",
38*e01b6f76SAndroid Build Coastguard Worker    ],
39*e01b6f76SAndroid Build Coastguard Worker    cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
40*e01b6f76SAndroid Build Coastguard Worker}
41*e01b6f76SAndroid Build Coastguard Worker
42*e01b6f76SAndroid Build Coastguard Worker// The stub audio HAL module, identical to the default audio hal, but with
43*e01b6f76SAndroid Build Coastguard Worker// different name to be loaded concurrently with other audio HALs if necessary.
44*e01b6f76SAndroid Build Coastguard Worker// This can also be used as skeleton for new implementations
45*e01b6f76SAndroid Build Coastguard Worker//
46*e01b6f76SAndroid Build Coastguard Worker// The format of the name is audio.<type>.<hardware/etc>.so where the only
47*e01b6f76SAndroid Build Coastguard Worker// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
48*e01b6f76SAndroid Build Coastguard Workercc_library_shared {
49*e01b6f76SAndroid Build Coastguard Worker    name: "audio.stub.default",
50*e01b6f76SAndroid Build Coastguard Worker    relative_install_path: "hw",
51*e01b6f76SAndroid Build Coastguard Worker    proprietary: true,
52*e01b6f76SAndroid Build Coastguard Worker    srcs: ["audio_hw.c"],
53*e01b6f76SAndroid Build Coastguard Worker    header_libs: ["libhardware_headers"],
54*e01b6f76SAndroid Build Coastguard Worker    shared_libs: [
55*e01b6f76SAndroid Build Coastguard Worker        "liblog",
56*e01b6f76SAndroid Build Coastguard Worker    ],
57*e01b6f76SAndroid Build Coastguard Worker    cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
58*e01b6f76SAndroid Build Coastguard Worker}
59*e01b6f76SAndroid Build Coastguard Worker
60*e01b6f76SAndroid Build Coastguard Worker// The stub audio policy HAL module that can be used as a skeleton for
61*e01b6f76SAndroid Build Coastguard Worker// new implementations.
62*e01b6f76SAndroid Build Coastguard Workercc_library_shared {
63*e01b6f76SAndroid Build Coastguard Worker    name: "audio_policy.stub",
64*e01b6f76SAndroid Build Coastguard Worker    relative_install_path: "hw",
65*e01b6f76SAndroid Build Coastguard Worker    proprietary: true,
66*e01b6f76SAndroid Build Coastguard Worker    srcs: ["audio_policy.c"],
67*e01b6f76SAndroid Build Coastguard Worker    header_libs: ["libhardware_headers"],
68*e01b6f76SAndroid Build Coastguard Worker    shared_libs: [
69*e01b6f76SAndroid Build Coastguard Worker        "liblog",
70*e01b6f76SAndroid Build Coastguard Worker    ],
71*e01b6f76SAndroid Build Coastguard Worker    cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
72*e01b6f76SAndroid Build Coastguard Worker}
73