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 "//third_party/bounds_checking_function/include", 37 "$hdf_hdi_service_path/vendor_interface/utils", 38 ] 39 40 if (drivers_peripheral_audio_feature_hal_notsupport_pathselect) { 41 defines += [ "AUDIO_HAL_NOTSUPPORT_PATHSELECT" ] 42 } 43 } else { 44 sources = [ 45 "vendor_src/audio_adapter_vendor.c", 46 "vendor_src/audio_capture_vendor.c", 47 "vendor_src/audio_common_vendor.c", 48 "vendor_src/audio_manager_vendor.c", 49 "vendor_src/audio_render_vendor.c", 50 ] 51 52 include_dirs = [ 53 "vendor_include/include", 54 "//third_party/bounds_checking_function/include", 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 (use_jemalloc && use_jemalloc_dfx_intf) { 64 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 65 } 66 67 if (is_standard_system) { 68 external_deps = [ 69 "c_utils:utils", 70 "drivers_interface_audio:audio_idl_headers", 71 "hdf_core:libhdf_ipc_adapter", 72 "hdf_core:libhdi", 73 "hdf_core:libpub_utils", 74 "hilog:libhilog", 75 ] 76 } else { 77 external_deps = [ "hilog:libhilog" ] 78 } 79 80 install_images = [ chipset_base_dir ] 81 subsystem_name = "hdf" 82 part_name = "drivers_peripheral_audio" 83} 84 85ohos_shared_library("vdi_audio_v1_0") { 86 defines = [] 87 if (drivers_peripheral_audio_feature_community) { 88 } else { 89 sources = [ 90 "vdi_src/audio_adapter_vdi.c", 91 "vdi_src/audio_capture_vdi.c", 92 "vdi_src/audio_common_vdi.c", 93 "vdi_src/audio_manager_vdi.c", 94 "vdi_src/audio_render_vdi.c", 95 ] 96 97 include_dirs = [ 98 "$hdf_audio_path/interfaces/sound/v1_0", 99 "//third_party/bounds_checking_function/include", 100 "$hdf_hdi_service_path/vendor_interface/utils", 101 ] 102 } 103 104 if (enable_audio_hal_hdf_log) { 105 defines += [ "AUDIO_HDF_LOG" ] 106 } 107 108 if (use_jemalloc && use_jemalloc_dfx_intf) { 109 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 110 } 111 112 if (is_standard_system) { 113 external_deps = [ 114 "c_utils:utils", 115 "drivers_interface_audio:audio_idl_headers", 116 "hdf_core:libhdf_ipc_adapter", 117 "hdf_core:libhdi", 118 "hdf_core:libpub_utils", 119 "hilog:libhilog", 120 ] 121 } else { 122 external_deps = [ "hilog:libhilog" ] 123 } 124 125 install_images = [ chipset_base_dir ] 126 subsystem_name = "hdf" 127 part_name = "drivers_peripheral_audio" 128} 129