# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License import("//build/ohos.gni") if (is_standard_system) { AUDIO_JSON_PATH = rebase_path("//vendor/${product_company}/${product_name}/hals/audio") cmd1 = "if [ -f ${AUDIO_JSON_PATH}/adapter_config.json ]; then echo true; else echo false; fi" HAVE_AUDIO_ADAPTER_JSON = exec_script("//build/lite/run_shell_cmd.py", [ cmd1 ], "value") ohos_prebuilt_etc("hdf_audio_json") { if (HAVE_AUDIO_ADAPTER_JSON) { source = "${AUDIO_JSON_PATH}/adapter_config.json" } else { source = "//drivers/peripheral/audio/config/adapter_config.json" } relative_install_dir = "hdfconfig" install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "audio_device_driver" } ohos_prebuilt_etc("hdf_audio_path_json") { source = "//drivers/peripheral/audio/config/parse.json" relative_install_dir = "hdfconfig" install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "audio_device_driver" } }