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 14hdf_audio_path = "./../../.." 15hdf_hal_path = "./../.." 16import("//build/ohos.gni") 17import("$hdf_audio_path/audio.gni") 18 19if (drivers_peripheral_audio_feature_hdf_proxy_stub == true) { 20 ohos_shared_library("hdi_audio_usb_server") { 21 include_dirs = [ 22 "$hdf_audio_path/interfaces/include", 23 "$hdf_hal_path/hdi_passthrough/include", 24 "include", 25 "//third_party/bounds_checking_function/include", 26 ] 27 28 sources = [ 29 "$hdf_hal_path/hdi_passthrough/src/audio_adapter_info_common.c", 30 "$hdf_hal_path/hdi_passthrough/src/audio_common.c", 31 "src/hdf_audio_events.c", 32 "src/hdf_audio_server_capture.c", 33 "src/hdf_audio_server_common.c", 34 "src/hdf_audio_server_render.c", 35 "src/hdf_audio_usb_server.c", 36 ] 37 38 if (is_standard_system) { 39 external_deps = [ 40 "c_utils:utils", 41 "hdf_core:libhdf_host", 42 "hdf_core:libhdf_utils", 43 "hilog:libhilog", 44 ] 45 } else { 46 external_deps = [ "hilog:libhilog" ] 47 } 48 defines = [] 49 if (enable_audio_hal_hdf_log) { 50 defines += [ "AUDIO_HDF_LOG" ] 51 } 52 53 shlib_type = "hdi" 54 install_images = [ chipset_base_dir ] 55 subsystem_name = "hdf" 56 part_name = "drivers_peripheral_audio" 57 } 58 59 ohos_shared_library("hdi_audio_a2dp_server") { 60 include_dirs = [ 61 "$hdf_audio_path/interfaces/include", 62 "$hdf_hal_path/hdi_passthrough/include", 63 "include", 64 "//third_party/bounds_checking_function/include", 65 ] 66 67 sources = [ 68 "$hdf_hal_path/hdi_passthrough/src/audio_adapter_info_common.c", 69 "$hdf_hal_path/hdi_passthrough/src/audio_common.c", 70 "src/hdf_audio_a2dp_server.c", 71 "src/hdf_audio_events.c", 72 "src/hdf_audio_server_capture.c", 73 "src/hdf_audio_server_common.c", 74 "src/hdf_audio_server_render.c", 75 ] 76 77 if (is_standard_system) { 78 external_deps = [ 79 "c_utils:utils", 80 "hdf_core:libhdf_host", 81 "hdf_core:libhdf_utils", 82 "hilog:libhilog", 83 ] 84 } else { 85 external_deps = [ "hilog:libhilog" ] 86 } 87 defines = [] 88 if (enable_audio_hal_hdf_log) { 89 defines += [ "AUDIO_HDF_LOG" ] 90 } 91 92 shlib_type = "hdi" 93 install_images = [ chipset_base_dir ] 94 subsystem_name = "hdf" 95 part_name = "drivers_peripheral_audio" 96 } 97} 98