1094332d3Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2094332d3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3094332d3Sopenharmony_ci# you may not use this file except in compliance with the License. 4094332d3Sopenharmony_ci# You may obtain a copy of the License at 5094332d3Sopenharmony_ci# 6094332d3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7094332d3Sopenharmony_ci# 8094332d3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9094332d3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10094332d3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11094332d3Sopenharmony_ci# See the License for the specific language governing permissions and 12094332d3Sopenharmony_ci# limitations under the License. 13094332d3Sopenharmony_ci 14094332d3Sopenharmony_cihdf_audio_path = "./../../.." 15094332d3Sopenharmony_cihdf_hal_path = "./../.." 16094332d3Sopenharmony_ciimport("//build/ohos.gni") 17094332d3Sopenharmony_ciimport("$hdf_audio_path/audio.gni") 18094332d3Sopenharmony_ci 19094332d3Sopenharmony_ciif (drivers_peripheral_audio_feature_hdf_proxy_stub == true) { 20094332d3Sopenharmony_ci ohos_shared_library("hdi_audio_usb_server") { 21094332d3Sopenharmony_ci include_dirs = [ 22094332d3Sopenharmony_ci "$hdf_audio_path/interfaces/include", 23094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/include", 24094332d3Sopenharmony_ci "include", 25094332d3Sopenharmony_ci ] 26094332d3Sopenharmony_ci 27094332d3Sopenharmony_ci sources = [ 28094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/src/audio_adapter_info_common.c", 29094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/src/audio_common.c", 30094332d3Sopenharmony_ci "src/hdf_audio_events.c", 31094332d3Sopenharmony_ci "src/hdf_audio_server_capture.c", 32094332d3Sopenharmony_ci "src/hdf_audio_server_common.c", 33094332d3Sopenharmony_ci "src/hdf_audio_server_manager.c", 34094332d3Sopenharmony_ci "src/hdf_audio_server_render.c", 35094332d3Sopenharmony_ci "src/hdf_audio_usb_server.c", 36094332d3Sopenharmony_ci ] 37094332d3Sopenharmony_ci 38094332d3Sopenharmony_ci if (is_standard_system) { 39094332d3Sopenharmony_ci external_deps = [ 40094332d3Sopenharmony_ci "hdf_core:libhdf_host", 41094332d3Sopenharmony_ci "hdf_core:libhdf_utils", 42094332d3Sopenharmony_ci "hilog:libhilog", 43094332d3Sopenharmony_ci ] 44094332d3Sopenharmony_ci if (enable_c_utils) { 45094332d3Sopenharmony_ci external_deps += [ "c_utils:utils" ] 46094332d3Sopenharmony_ci } 47094332d3Sopenharmony_ci } else if (defined(ohos_lite)) { 48094332d3Sopenharmony_ci external_deps = [ "hilog_lite:hilog_shared" ] 49094332d3Sopenharmony_ci } else { 50094332d3Sopenharmony_ci external_deps = [ "hilog:libhilog" ] 51094332d3Sopenharmony_ci } 52094332d3Sopenharmony_ci external_deps += [ "bounds_checking_function:libsec_shared" ] 53094332d3Sopenharmony_ci defines = [] 54094332d3Sopenharmony_ci if (enable_audio_hal_hdf_log) { 55094332d3Sopenharmony_ci defines += [ "AUDIO_HDF_LOG" ] 56094332d3Sopenharmony_ci } 57094332d3Sopenharmony_ci 58094332d3Sopenharmony_ci shlib_type = "hdi" 59094332d3Sopenharmony_ci install_images = [ chipset_base_dir ] 60094332d3Sopenharmony_ci subsystem_name = "hdf" 61094332d3Sopenharmony_ci part_name = "drivers_peripheral_audio" 62094332d3Sopenharmony_ci } 63094332d3Sopenharmony_ci 64094332d3Sopenharmony_ci ohos_shared_library("hdi_audio_a2dp_server") { 65094332d3Sopenharmony_ci include_dirs = [ 66094332d3Sopenharmony_ci "$hdf_audio_path/interfaces/include", 67094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/include", 68094332d3Sopenharmony_ci "include", 69094332d3Sopenharmony_ci ] 70094332d3Sopenharmony_ci 71094332d3Sopenharmony_ci sources = [ 72094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/src/audio_adapter_info_common.c", 73094332d3Sopenharmony_ci "$hdf_hal_path/hdi_passthrough/src/audio_common.c", 74094332d3Sopenharmony_ci "src/hdf_audio_a2dp_server.c", 75094332d3Sopenharmony_ci "src/hdf_audio_events.c", 76094332d3Sopenharmony_ci "src/hdf_audio_server_capture.c", 77094332d3Sopenharmony_ci "src/hdf_audio_server_common.c", 78094332d3Sopenharmony_ci "src/hdf_audio_server_manager.c", 79094332d3Sopenharmony_ci "src/hdf_audio_server_render.c", 80094332d3Sopenharmony_ci ] 81094332d3Sopenharmony_ci 82094332d3Sopenharmony_ci if (is_standard_system) { 83094332d3Sopenharmony_ci external_deps = [ 84094332d3Sopenharmony_ci "hdf_core:libhdf_host", 85094332d3Sopenharmony_ci "hdf_core:libhdf_utils", 86094332d3Sopenharmony_ci "hilog:libhilog", 87094332d3Sopenharmony_ci ] 88094332d3Sopenharmony_ci if (enable_c_utils) { 89094332d3Sopenharmony_ci external_deps += [ "c_utils:utils" ] 90094332d3Sopenharmony_ci } 91094332d3Sopenharmony_ci } else if (defined(ohos_lite)) { 92094332d3Sopenharmony_ci external_deps = [ "hilog_lite:hilog_shared" ] 93094332d3Sopenharmony_ci } else { 94094332d3Sopenharmony_ci external_deps = [ "hilog:libhilog" ] 95094332d3Sopenharmony_ci } 96094332d3Sopenharmony_ci external_deps += [ "bounds_checking_function:libsec_shared" ] 97094332d3Sopenharmony_ci defines = [] 98094332d3Sopenharmony_ci if (enable_audio_hal_hdf_log) { 99094332d3Sopenharmony_ci defines += [ "AUDIO_HDF_LOG" ] 100094332d3Sopenharmony_ci } 101094332d3Sopenharmony_ci 102094332d3Sopenharmony_ci shlib_type = "hdi" 103094332d3Sopenharmony_ci install_images = [ chipset_base_dir ] 104094332d3Sopenharmony_ci subsystem_name = "hdf" 105094332d3Sopenharmony_ci part_name = "drivers_peripheral_audio" 106094332d3Sopenharmony_ci } 107094332d3Sopenharmony_ci} 108