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 = "./../.." 15hdf_hdi_service_path = "./.." 16import("//build/ohos.gni") 17import("$hdf_audio_path/audio.gni") 18 19ohos_shared_library("audio_primary_impl_vendor") { 20 defines = [] 21 if (drivers_peripheral_audio_feature_community) { 22 sources = [ 23 "src/audio_adapter.c", 24 "src/audio_adapter_info_common.c", 25 "src/audio_capture.c", 26 "src/audio_common.c", 27 "src/audio_manager.c", 28 "src/audio_render.c", 29 ] 30 31 include_dirs = [ 32 "include", 33 "$hdf_hdi_service_path/pathselect/include", 34 "$hdf_audio_path/supportlibs/adm_adapter/include", 35 "$hdf_audio_path/supportlibs/interfaces/include", 36 "$hdf_hdi_service_path/vendor_interface/utils", 37 ] 38 39 if (drivers_peripheral_audio_feature_hal_notsupport_pathselect) { 40 defines += [ "AUDIO_HAL_NOTSUPPORT_PATHSELECT" ] 41 } 42 } else { 43 sources = [ 44 "vdi_src/audio_adapter_vdi.c", 45 "vdi_src/audio_capture_vdi.c", 46 "vdi_src/audio_common_vdi.c", 47 "vdi_src/audio_manager_vdi.c", 48 "vdi_src/audio_render_vdi.c", 49 ] 50 51 deps = [ "$hdf_audio_path/audio_dfx:libaudio_dfx_static" ] 52 53 include_dirs = [ 54 "$hdf_audio_path/interfaces/sound/v1_0", 55 "$hdf_hdi_service_path/vendor_interface/utils", 56 ] 57 } 58 59 if (enable_audio_hal_hdf_log) { 60 defines += [ "AUDIO_HDF_LOG" ] 61 } 62 63 if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) { 64 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 65 } 66 67 if (is_standard_system) { 68 external_deps = [ 69 "drivers_interface_audio:libaudio_proxy_5.0", 70 "hdf_core:libhdf_ipc_adapter", 71 "hdf_core:libhdi", 72 "hdf_core:libpub_utils", 73 "hilog:libhilog", 74 ] 75 if (enable_c_utils) { 76 external_deps += [ "c_utils:utils" ] 77 } 78 } else if (defined(ohos_lite)) { 79 external_deps = [ "hilog_lite:hilog_shared" ] 80 } else { 81 external_deps = [ "hilog:libhilog" ] 82 } 83 84 external_deps += [ "bounds_checking_function:libsec_shared" ] 85 86 install_images = [ chipset_base_dir ] 87 subsystem_name = "hdf" 88 part_name = "drivers_peripheral_audio" 89} 90