• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("../../../distributedaudio.gni")
17
18ohos_shared_library("libaudio_manager_daudio_primary_service_1.0") {
19  include_dirs = [
20    "//third_party/cJSON",
21    "${hdf_ser_aud_path}/include",
22    "${hdf_service_path}/hdi_service/common/include",
23    "${hdf_service_path}/hdi_service/common/log/include",
24    "${hdf_service_path}/hdi_service/common/utils/include",
25  ]
26
27  if (distributed_audio_extension) {
28    include_dirs +=
29        [ "${distributedaudio_ext_path}/hdf_service_extension/include/" ]
30  }
31
32  sources = [
33    "./src/audio_adapter_interface_impl.cpp",
34    "./src/audio_capture_interface_impl.cpp",
35    "./src/audio_manager_interface_impl.cpp",
36    "./src/audio_render_interface_impl.cpp",
37  ]
38
39  if (distributed_audio_extension) {
40    sources += [
41      "${distributedaudio_ext_path}/hdf_service_extension/src/audio_capture_ext_impl.cpp",
42      "${distributedaudio_ext_path}/hdf_service_extension/src/audio_render_ext_impl.cpp",
43    ]
44  }
45
46  deps = [ "//third_party/cJSON:cjson" ]
47  public_deps = [ "${hdf_service_path}/hdi_service/common:libdaudio_hdf_utils" ]
48
49  external_deps = [
50    "c_utils:utils",
51    "drivers_interface_distributed_audio:libdaudio_stub_1.0",
52    "drivers_interface_distributed_audio:libdaudioext_stub_1.0",
53    "hdf_core:libhdf_host",
54    "hdf_core:libhdf_utils",
55    "hilog:libhilog",
56    "ipc:ipc_single",
57    "samgr:samgr_proxy",
58  ]
59
60  if (distributed_audio_extension) {
61    cflags = [ "-DDAUDIO_SUPPORT_EXTENSION" ]
62  }
63
64  defines = [
65    "HI_LOG_ENABLE",
66    "LOG_DOMAIN=0xD004130",
67  ]
68
69  if (build_variant == "root") {
70    defines += [
71      "DUMP_CAPTURE_FILE",
72      "DUMP_RENDER_FILE",
73    ]
74  }
75
76  install_images = [ chipset_base_dir ]
77  subsystem_name = "hdf"
78  part_name = "drivers_peripheral_distributed_audio"
79}
80
81ohos_shared_library("libdaudio_primary_driver") {
82  include_dirs = [ "${hdf_ser_aud_path}/include" ]
83
84  sources = [ "./src/audio_driver.cpp" ]
85
86  deps = [ "${hdf_ser_aud_path}:libaudio_manager_daudio_primary_service_1.0" ]
87
88  external_deps = [
89    "c_utils:utils",
90    "drivers_interface_distributed_audio:libdaudio_stub_1.0",
91    "drivers_interface_distributed_audio:libdaudioext_stub_1.0",
92    "hdf_core:libhdf_host",
93    "hdf_core:libhdf_ipc_adapter",
94    "hdf_core:libhdf_utils",
95    "hdf_core:libhdi",
96    "hilog:libhilog",
97    "ipc:ipc_single",
98  ]
99
100  shlib_type = "hdi"
101  install_images = [ chipset_base_dir ]
102  subsystem_name = "hdf"
103  part_name = "drivers_peripheral_distributed_audio"
104}
105
106group("hdf_daudio_primary_service") {
107  deps = [
108    ":libaudio_manager_daudio_primary_service_1.0",
109    ":libdaudio_primary_driver",
110  ]
111}
112