• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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
14hdf_audio_path = "./../.."
15
16import("//build/ohos.gni")
17import("$hdf_audio_path/audio.gni")
18
19if (defined(ohos_lite)) {
20} else {
21  ohos_executable("audio_sample_event") {
22    include_dirs = [
23      "$hdf_audio_path/interfaces/include",
24      "$hdf_audio_path/hal/hdi_passthrough/include",
25      "$hdf_audio_path/hal/hdi_binder/server/include",
26    ]
27
28    sources = [
29      "$hdf_audio_path/hal/hdi_binder/server/src/hdf_audio_events.c",
30      "framework_event.c",
31    ]
32
33    defines = []
34
35    if (is_standard_system) {
36      external_deps = [
37        "c_utils:utils",
38        "hdf_core:libhdf_ipc_adapter",
39        "hdf_core:libhdf_utils",
40        "hdf_core:libhdi",
41        "hilog:libhilog",
42      ]
43    } else {
44      external_deps = [ "hilog:libhilog" ]
45    }
46
47    install_enable = true
48    install_images = [ chipset_base_dir ]
49    subsystem_name = "hdf"
50    part_name = "drivers_peripheral_audio"
51  }
52
53  ohos_executable("idl_render") {
54    include_dirs = [ "./" ]
55
56    sources = [
57      "framework_common.c",
58      "idl_render.c",
59    ]
60
61    defines = [ "IDL_SAMPLE" ]
62    if (drivers_peripheral_audio_feature_alsa_lib) {
63      defines += [ "ALSA_LIB_MODE" ]
64    }
65
66    if (is_standard_system) {
67      external_deps = [
68        "c_utils:utils",
69        "drivers_interface_audio:libaudio_proxy_2.0",
70        "hdf_core:libhdf_ipc_adapter",
71        "hdf_core:libhdf_utils",
72        "hdf_core:libhdi",
73        "hilog:libhilog",
74      ]
75    } else {
76      external_deps = [ "hilog:libhilog" ]
77    }
78
79    install_enable = true
80    install_images = [ chipset_base_dir ]
81    subsystem_name = "hdf"
82    part_name = "drivers_peripheral_audio"
83  }
84
85  ohos_executable("idl_capture") {
86    include_dirs = [ "./" ]
87
88    sources = [
89      "framework_common.c",
90      "idl_capture.c",
91    ]
92
93    defines = [ "IDL_SAMPLE" ]
94    if (drivers_peripheral_audio_feature_alsa_lib) {
95      defines += [ "ALSA_LIB_MODE" ]
96    }
97    if (drivers_peripheral_audio_feature_community) {
98      defines += [ "AUDIO_FEATURE_COMMUNITY" ]
99    }
100
101    if (is_standard_system) {
102      external_deps = [
103        "c_utils:utils",
104        "drivers_interface_audio:libaudio_proxy_2.0",
105        "hdf_core:libhdf_utils",
106        "hilog:libhilog",
107      ]
108    } else {
109      external_deps = [ "hilog:libhilog" ]
110    }
111
112    install_enable = true
113    install_images = [ chipset_base_dir ]
114    subsystem_name = "hdf"
115    part_name = "drivers_peripheral_audio"
116  }
117}
118
119group("idl_audio_sample") {
120  if (!defined(ohos_lite)) {
121    if (drivers_peripheral_audio_feature_hdf_proxy_stub == true) {
122      deps = [
123        ":idl_capture",
124        ":idl_render",
125      ]
126    }
127  }
128}
129