1# Copyright (c) 2021-2022 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("../../../../../config.gni") 16import("../../../../../ressche_part.gni") 17 18config("hdi_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 ".", 23 "../../../audioqosmanager/include", 24 "../../../audioschedule/include", 25 "../../../audioeffect/include", 26 "../../../playbackcapturer/include", 27 "../../../../../interfaces/inner_api/native/audiocommon/include", 28 "../../../../../services/audio_service/common/include", 29 "../../../../../services/audio_service/common/include/limiter", 30 "hdi_adapter_intf/include", 31 "../../../hdiadapter_new/include", 32 ] 33 34 cflags = [ 35 "-Wall", 36 "-Werror", 37 "-DHAVE_CONFIG_H", 38 "-D_GNU_SOURCE", 39 ] 40 if (!audio_framework_feature_new_engine_flag) { 41 cflags += [ 42 "-D__INCLUDED_FROM_PULSE_AUDIO", 43 ] 44 } 45} 46 47ohos_shared_library("module-hdi-sink") { 48 sanitize = { 49 cfi = true 50 cfi_cross_dso = true 51 cfi_vcall_icall_only = true 52 debug = false 53 } 54 sources = [ 55 "hdi_sink.c", 56 "module_hdi_sink.c", 57 ] 58 59 configs = [ ":hdi_config" ] 60 61 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_sink_z_so" ] 62 63 ldflags = [ 64 "-Wl", 65 "--no-undefined", 66 ] 67 68 deps = [ 69 "../../../../../services/audio_service:audio_common", 70 "../../../audioeffect:audio_effect", 71 "../../../audioqosmanager:audio_qosmanager", 72 "../../../audioschedule:audio_schedule", 73 "../../../audioutils:audio_utils", 74 "../../../hdiadapter_new:hdiadapter_new", 75 "../../../playbackcapturer:playback_capturer", 76 "hdi_adapter_intf:sink_adapter", 77 ] 78 79 external_deps = [ 80 "bounds_checking_function:libsec_shared", 81 "c_utils:utils", 82 "drivers_interface_audio:libaudio_proxy_5.0", 83 "hilog:libhilog", 84 "init:libbegetutil", 85 ] 86 defines = [] 87 if (!audio_framework_feature_new_engine_flag) { 88 external_deps += [ 89 "pulseaudio:pulse", 90 "pulseaudio:pulsecommon", 91 "pulseaudio:pulsecore", 92 ] 93 defines += [ "SUPPORT_OLD_ENGINE" ] 94 } 95 if (ressche_enable == true) { 96 external_deps += [ "resource_schedule_service:ressched_client" ] 97 } 98 99 subsystem_name = "multimedia" 100 part_name = "audio_framework" 101} 102 103ohos_shared_library("module-hdi-source") { 104 sanitize = { 105 cfi = true 106 cfi_cross_dso = true 107 cfi_vcall_icall_only = true 108 debug = false 109 } 110 sources = [ 111 "hdi_source.c", 112 "module_hdi_source.c", 113 ] 114 115 defines = [] 116 117 if (is_emulator) { 118 defines += [ "IS_EMULATOR" ] 119 } 120 121 configs = [ ":hdi_config" ] 122 123 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_source_z_so" ] 124 125 deps = [ 126 "../../../audioeffect:audio_effect", 127 "../../../audioschedule:audio_schedule", 128 "../../../audioutils:audio_utils", 129 "../../../hdiadapter_new:hdiadapter_new", 130 "hdi_adapter_intf:source_adapter", 131 ] 132 133 external_deps = [ 134 "bounds_checking_function:libsec_shared", 135 "drivers_interface_audio:libaudio_proxy_5.0", 136 "hdf_core:libhdf_utils", 137 "hilog:libhilog", 138 ] 139 defines = [] 140 if (!audio_framework_feature_new_engine_flag) { 141 external_deps += [ 142 "pulseaudio:pulse", 143 "pulseaudio:pulsecommon", 144 "pulseaudio:pulsecore", 145 ] 146 defines += [ "SUPPORT_OLD_ENGINE" ] 147 } 148 subsystem_name = "multimedia" 149 part_name = "audio_framework" 150} 151 152ohos_shared_library("module-split-stream-sink") { 153 sanitize = { 154 cfi = true 155 cfi_cross_dso = true 156 cfi_vcall_icall_only = true 157 debug = false 158 } 159 sources = [ "module_split_stream_sink.c" ] 160 161 configs = [ ":hdi_config" ] 162 163 cflags = [ "-DPA_MODULE_NAME=libmodule_split_stream_sink_z_so" ] 164 165 ldflags = [ 166 "-Wl", 167 "--no-undefined", 168 ] 169 170 deps = [ 171 "../../../../../services/audio_service:audio_common", 172 "../../../audioschedule:audio_schedule", 173 "../../../audioutils:audio_utils", 174 "../../../hdiadapter_new:hdiadapter_new", 175 "hdi_adapter_intf:sink_adapter", 176 ] 177 178 external_deps = [ 179 "bounds_checking_function:libsec_shared", 180 "c_utils:utils", 181 "hilog:libhilog", 182 ] 183 defines = [] 184 if (!audio_framework_feature_new_engine_flag) { 185 external_deps += [ 186 "pulseaudio:pulse", 187 "pulseaudio:pulsecommon", 188 "pulseaudio:pulsecore", 189 ] 190 defines += [ "SUPPORT_OLD_ENGINE" ] 191 } 192 if (ressche_enable == true) { 193 external_deps += [ "resource_schedule_service:ressched_client" ] 194 } 195 196 subsystem_name = "multimedia" 197 part_name = "audio_framework" 198} 199