• 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")
15
16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
17import("//drivers/peripheral/audio/audio.gni")
18
19config("audio_interface_config_alsa") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-Wall",
24    "-Wextra",
25    "-Werror",
26    "-DGST_DISABLE_DEPRECATED",
27    "-DHAVE_CONFIG_H",
28    "-fno-strict-aliasing",
29    "-Wno-sign-compare",
30    "-Wno-builtin-requires-header",
31    "-Wno-implicit-function-declaration",
32    "-Wno-format",
33    "-Wno-int-conversion",
34    "-Wno-unused-function",
35    "-Wno-unused-parameter",
36    "-Wno-thread-safety-attributes",
37    "-Wno-missing-field-initializers",
38    "-Wno-inconsistent-missing-override",
39    "-fno-rtti",
40    "-fno-exceptions",
41    "-ffunction-sections",
42    "-fdata-sections",
43  ]
44
45  ldflags = [ "-Wl" ]
46}
47
48ohos_shared_library("hdi_audio_interface_lib_capture.alsa") {
49  sources = [
50    "//device/unionman/unionpi_tiger/third_party/tinyalsa/mixer.c",
51    "//device/unionman/unionpi_tiger/third_party/tinyalsa/pcm.c",
52    "src/audio_interface_lib_capture_alsa.c",
53  ]
54
55  include_dirs = [
56    "//drivers/peripheral/audio/hal/hdi_passthrough/include",
57    "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
58    "//drivers/peripheral/audio/interfaces/include",
59    "//third_party/bounds_checking_function/include",
60    "//device/unionman/unionpi_tiger/third_party/tinyalsa/include",
61  ]
62
63  deps = [
64    "$hdf_uhdf_path/hdi:libhdi",
65    "$hdf_uhdf_path/host:hdf_devhost",
66    "$hdf_uhdf_path/host:libhdf_host",
67    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
68    "$hdf_uhdf_path/manager:hdf_devmgr",
69    "$hdf_uhdf_path/manager:hdf_devmgr.rc",
70  ]
71
72  install_images = [ chipset_base_dir ]
73
74  external_deps = [
75    "c_utils:utils",
76    "hdf_core:libhdf_utils",
77    "hilog:libhilog",
78  ]
79
80  public_configs = [ ":audio_interface_config_alsa" ]
81
82  subsystem_name = "hdf"
83  part_name = "unionman_products"
84}
85
86ohos_shared_library("hdi_audio_interface_lib_render.alsa") {
87  sources = [
88    "//device/unionman/unionpi_tiger/third_party/tinyalsa/mixer.c",
89    "//device/unionman/unionpi_tiger/third_party/tinyalsa/pcm.c",
90    "src/audio_interface_lib_render_alsa.c",
91  ]
92
93  include_dirs = [
94    "//drivers/peripheral/audio/hal/hdi_passthrough/include",
95    "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
96    "//drivers/peripheral/audio/interfaces/include",
97    "//third_party/bounds_checking_function/include",
98    "//device/unionman/unionpi_tiger/third_party/tinyalsa/include",
99  ]
100
101  deps = [
102    "$hdf_uhdf_path/hdi:libhdi",
103    "$hdf_uhdf_path/host:hdf_devhost",
104    "$hdf_uhdf_path/host:libhdf_host",
105    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
106    "$hdf_uhdf_path/manager:hdf_devmgr",
107    "$hdf_uhdf_path/manager:hdf_devmgr.rc",
108  ]
109
110  install_images = [ chipset_base_dir ]
111
112  external_deps = [
113    "c_utils:utils",
114    "hdf_core:libhdf_utils",
115    "hilog:libhilog",
116  ]
117
118  public_configs = [ ":audio_interface_config_alsa" ]
119
120  subsystem_name = "hdf"
121  part_name = "unionman_products"
122}
123
124group("audio_alsa") {
125  deps = [
126    ":hdi_audio_interface_lib_capture.alsa",
127    ":hdi_audio_interface_lib_render.alsa",
128  ]
129}
130