1# Copyright (c) 2023-2024 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 14import("//build/ohos.gni") 15import("../../../distributedaudio.gni") 16 17ohos_shared_library("libaudio_manager_daudio_primary_service_1.0") { 18 include_dirs = [ 19 "${hdf_ser_aud_path}/include", 20 "${hdf_service_path}/hdi_service/common/include", 21 "${hdf_service_path}/hdi_service/common/log/include", 22 "${hdf_service_path}/hdi_service/common/utils/include", 23 ] 24 25 sources = [ 26 "./src/audio_adapter_interface_impl.cpp", 27 "./src/audio_capture_ext_impl.cpp", 28 "./src/audio_capture_interface_impl.cpp", 29 "./src/audio_manager_interface_impl.cpp", 30 "./src/audio_render_ext_impl.cpp", 31 "./src/audio_render_interface_impl.cpp", 32 ] 33 34 public_deps = [ "${hdf_service_path}/hdi_service/common:libdaudio_hdf_utils" ] 35 36 external_deps = [ 37 "cJSON:cjson", 38 "c_utils:utils", 39 "drivers_interface_distributed_audio:libdaudio_stub_1.0", 40 "drivers_interface_distributed_audio:libdaudioext_stub_2.0", 41 "hdf_core:libhdf_host", 42 "hdf_core:libhdf_utils", 43 "hilog:libhilog", 44 "ipc:ipc_single", 45 "samgr:samgr_proxy", 46 ] 47 48 if (drivers_peripheral_distributed_audio_extension) { 49 cflags = [ "-DDAUDIO_SUPPORT_EXTENSION" ] 50 } 51 52 defines = [ 53 "HI_LOG_ENABLE", 54 "LOG_DOMAIN=0xD004130", 55 ] 56 57 if (build_variant == "root") { 58 defines += [ 59 "DUMP_CAPTURE_FILE", 60 "DUMP_RENDER_FILE", 61 ] 62 } 63 64 install_images = [ chipset_base_dir ] 65 subsystem_name = "hdf" 66 part_name = "drivers_peripheral_distributed_audio" 67} 68 69ohos_shared_library("libdaudio_primary_driver") { 70 include_dirs = [ "${hdf_ser_aud_path}/include" ] 71 72 sources = [ "./src/audio_driver.cpp" ] 73 74 deps = [ "${hdf_ser_aud_path}:libaudio_manager_daudio_primary_service_1.0" ] 75 76 external_deps = [ 77 "c_utils:utils", 78 "drivers_interface_distributed_audio:libdaudio_stub_1.0", 79 "drivers_interface_distributed_audio:libdaudioext_stub_2.0", 80 "hdf_core:libhdf_host", 81 "hdf_core:libhdf_ipc_adapter", 82 "hdf_core:libhdf_utils", 83 "hdf_core:libhdi", 84 "hilog:libhilog", 85 "ipc:ipc_single", 86 ] 87 88 shlib_type = "hdi" 89 install_images = [ chipset_base_dir ] 90 subsystem_name = "hdf" 91 part_name = "drivers_peripheral_distributed_audio" 92} 93 94group("hdf_daudio_primary_service") { 95 deps = [ 96 ":libaudio_manager_daudio_primary_service_1.0", 97 ":libdaudio_primary_driver", 98 ] 99} 100