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 14import("//build/ohos.gni") 15import("//drivers/adapter/uhdf2/uhdf.gni") 16import("//drivers/peripheral/audio/audio.gni") 17 18if (defined(ohos_lite)) { 19 ohos_executable("audio_sample_render") { 20 include_dirs = [ 21 "//drivers/peripheral/audio/interfaces/include", 22 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 23 "//utils/native/base/include", 24 "//third_party/bounds_checking_function/include", 25 ] 26 27 sources = [ "framework_render.c" ] 28 29 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 30 external_deps = [ "device_driver_framework:libhdf_utils" ] 31 defines = [] 32 if (enable_audio_device_mpi) { 33 defines += [ "AUDIO_HAL_USER" ] 34 } 35 install_enable = true 36 subsystem_name = "hdf" 37 part_name = "audio_device_driver" 38 } 39 40 ohos_executable("audio_sample_capture") { 41 include_dirs = [ 42 "//drivers/peripheral/audio/interfaces/include", 43 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 44 "//utils/native/base/include", 45 "//third_party/bounds_checking_function/include", 46 "//drivers/peripheral/audio/hal/hdi_binder/server/include", 47 ] 48 49 sources = [ "framework_capture.c" ] 50 51 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 52 external_deps = [ "device_driver_framework:libhdf_utils" ] 53 defines = [] 54 if (enable_audio_device_mpi) { 55 defines += [ "AUDIO_HAL_USER" ] 56 } 57 install_enable = true 58 subsystem_name = "hdf" 59 part_name = "audio_device_driver" 60 } 61} else { 62 ohos_executable("audio_sample_render") { 63 include_dirs = [ 64 "//drivers/peripheral/audio/interfaces/include", 65 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 66 ] 67 68 sources = [ "framework_render.c" ] 69 70 defines = [] 71 if (enable_audio_device_mpi) { 72 defines += [ "AUDIO_HAL_USER" ] 73 } 74 75 if (is_standard_system) { 76 external_deps = [ 77 "device_driver_framework:libhdf_host", 78 "device_driver_framework:libhdf_ipc_adapter", 79 "device_driver_framework:libhdf_utils", 80 "device_driver_framework:libhdi", 81 "hiviewdfx_hilog_native:libhilog", 82 "utils_base:utils", 83 ] 84 } else { 85 external_deps = [ "hilog:libhilog" ] 86 } 87 88 install_enable = true 89 install_images = [ chipset_base_dir ] 90 subsystem_name = "hdf" 91 part_name = "audio_device_driver" 92 } 93 94 ohos_executable("audio_sample_capture") { 95 include_dirs = [ 96 "//drivers/peripheral/audio/interfaces/include", 97 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 98 "//drivers/peripheral/audio/hal/hdi_binder/server/include", 99 ] 100 101 sources = [ "framework_capture.c" ] 102 103 defines = [] 104 if (enable_audio_device_mpi) { 105 defines += [ "AUDIO_HAL_USER" ] 106 } 107 108 if (is_standard_system) { 109 deps = [ 110 "//drivers/peripheral/audio/hal/hdi_binder/server:hdi_audio_server", 111 ] 112 external_deps = [ 113 "device_driver_framework:libhdf_host", 114 "device_driver_framework:libhdf_ipc_adapter", 115 "device_driver_framework:libhdf_utils", 116 "device_driver_framework:libhdi", 117 "hiviewdfx_hilog_native:libhilog", 118 "utils_base:utils", 119 ] 120 } else { 121 external_deps = [ "hilog:libhilog" ] 122 } 123 124 install_enable = true 125 install_images = [ chipset_base_dir ] 126 subsystem_name = "hdf" 127 part_name = "audio_device_driver" 128 } 129} 130