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_manager.c", 35 "src/hdf_audio_server_render.c", 36 "src/hdf_audio_usb_server.c", 37 ] 38 39 if (is_standard_system) { 40 external_deps = [ 41 "c_utils:utils", 42 "hdf_core:libhdf_host", 43 "hdf_core:libhdf_utils", 44 "hilog:libhilog", 45 ] 46 } else { 47 external_deps = [ "hilog:libhilog" ] 48 } 49 defines = [] 50 if (enable_audio_hal_hdf_log) { 51 defines += [ "AUDIO_HDF_LOG" ] 52 } 53 54 shlib_type = "hdi" 55 install_images = [ chipset_base_dir ] 56 subsystem_name = "hdf" 57 part_name = "drivers_peripheral_audio" 58 } 59 60 ohos_shared_library("hdi_audio_a2dp_server") { 61 include_dirs = [ 62 "$hdf_audio_path/interfaces/include", 63 "$hdf_hal_path/hdi_passthrough/include", 64 "include", 65 "//third_party/bounds_checking_function/include", 66 ] 67 68 sources = [ 69 "$hdf_hal_path/hdi_passthrough/src/audio_adapter_info_common.c", 70 "$hdf_hal_path/hdi_passthrough/src/audio_common.c", 71 "src/hdf_audio_a2dp_server.c", 72 "src/hdf_audio_events.c", 73 "src/hdf_audio_server_capture.c", 74 "src/hdf_audio_server_common.c", 75 "src/hdf_audio_server_manager.c", 76 "src/hdf_audio_server_render.c", 77 ] 78 79 if (is_standard_system) { 80 external_deps = [ 81 "c_utils:utils", 82 "hdf_core:libhdf_host", 83 "hdf_core:libhdf_utils", 84 "hilog:libhilog", 85 ] 86 } else { 87 external_deps = [ "hilog:libhilog" ] 88 } 89 defines = [] 90 if (enable_audio_hal_hdf_log) { 91 defines += [ "AUDIO_HDF_LOG" ] 92 } 93 94 shlib_type = "hdi" 95 install_images = [ chipset_base_dir ] 96 subsystem_name = "hdf" 97 part_name = "drivers_peripheral_audio" 98 } 99} 100