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/hdf_core/adapter/uhdf2/uhdf.gni") 16import("//drivers/peripheral/audio/audio.gni") 17 18group("hdi_audio") { 19 deps = [] 20 if (drivers_peripheral_audio_user_mode == false) { 21 if (drivers_peripheral_audio_rich_device == false) { 22 deps += [ "hal/hdi_passthrough:hdi_audio" ] 23 } 24 } else { 25 deps += [ "//device/soc/${product_company}/common/hal/media:hdi_audio" ] 26 } 27 28 if (defined(ohos_lite)) { 29 deps += [ "config/lite:hdf_audio_adapter_json" ] 30 } else { 31 if (drivers_peripheral_audio_hdf_proxy_stub == true) { 32 deps += [ 33 "config/linux:hdf_audio_adapter_json", 34 "hal/hdi_binder/proxy:hdi_audio_client", 35 "hal/hdi_binder/server:hdi_audio_a2dp_server", 36 "hal/hdi_binder/server:hdi_audio_pnp_server", 37 "hal/hdi_binder/server:hdi_audio_primary_server", 38 "hal/hdi_binder/server:hdi_audio_usb_server", 39 ] 40 } 41 deps += [ "hdi_service:idl_audio" ] 42 43 if (drivers_peripheral_audio_alsa_lib) { 44 deps += [ "config/linux:hdf_alsa_adapter_json" ] 45 } 46 } 47 48 if (drivers_peripheral_audio_user_mode == false) { 49 deps += [ 50 "supportlibs:hdi_audio_interface_lib_capture", 51 "supportlibs:hdi_audio_interface_lib_render", 52 ] 53 } 54 55 if (drivers_peripheral_audio_hal_notsupport_pathselect == false) { 56 deps += [ "hal/pathselect:hdi_audio_path_select" ] 57 58 if (defined(ohos_lite)) { 59 deps += [ "config/lite:hdf_audio_path_json" ] 60 } else { 61 deps += [ "config/linux:hdf_audio_path_json" ] 62 } 63 } 64 65 if (drivers_peripheral_audio_policy_config == true) { 66 deps += [ 67 "//vendor/${product_company}/${product_name}/audio:audio_policy_config", 68 ] 69 } 70} 71