• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16import("//drivers/peripheral/audio/audio.gni")
17
18if (drivers_peripheral_audio_hdf_proxy_stub == true) {
19  if (defined(ohos_lite)) {
20    ohos_shared_library("hdi_audio_client") {
21      include_dirs = [
22        "//drivers/peripheral/audio/interfaces/include",
23        "//drivers/peripheral/audio/hal/hdi_passthrough/include",
24        "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
25        "//drivers/peripheral/audio/hal/hdi_binder/server/include",
26        "//third_party/cJSON",
27        "//third_party/bounds_checking_function/include",
28        "//drivers/hdf_core/adapter/uhdf2/include/hdi",
29        "//drivers/hdf_core/adapter/uhdf2/shared/include",
30      ]
31
32      sources = [
33        "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_adapter_info_common.c",
34        "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_common.c",
35        "//third_party/cJSON/cJSON.c",
36        "src/audio_proxy_adapter.c",
37        "src/audio_proxy_capture.c",
38        "src/audio_proxy_common.c",
39        "src/audio_proxy_manager.c",
40        "src/audio_proxy_render.c",
41      ]
42
43      deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
44
45      if (enable_audio_hal_hdf_log) {
46        defines = [ "AUDIO_HDF_LOG" ]
47      }
48
49      subsystem_name = "hdf"
50      part_name = "drivers_peripheral_audio"
51    }
52  } else {
53    ohos_shared_library("hdi_audio_client") {
54      include_dirs = [
55        "//drivers/peripheral/audio/interfaces/include",
56        "//drivers/peripheral/audio/hal/hdi_passthrough/include",
57        "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
58        "//drivers/peripheral/audio/hal/hdi_binder/server/include",
59        "//third_party/cJSON",
60        "//third_party/bounds_checking_function/include",
61        "//drivers/hdf_core/adapter/uhdf2/include/host",
62      ]
63
64      sources = [
65        "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_adapter_info_common.c",
66        "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_common.c",
67        "//third_party/cJSON/cJSON.c",
68        "src/audio_proxy_adapter.c",
69        "src/audio_proxy_capture.c",
70        "src/audio_proxy_common.c",
71        "src/audio_proxy_manager.c",
72        "src/audio_proxy_render.c",
73      ]
74
75      if (is_standard_system) {
76        external_deps = [
77          "c_utils:utils",
78          "hdf_core:libhdf_ipc_adapter",
79          "hdf_core:libhdf_utils",
80          "hdf_core:libhdi",
81          "hiviewdfx_hilog_native:libhilog",
82        ]
83      } else {
84        external_deps = [ "hilog:libhilog" ]
85      }
86
87      if (enable_audio_hal_hdf_log) {
88        defines = [ "AUDIO_HDF_LOG" ]
89      }
90
91      install_images = [ chipset_base_dir ]
92      subsystem_name = "hdf"
93      part_name = "drivers_peripheral_audio"
94    }
95  }
96}
97