1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 #include "audio_parse_test.h" 9 #include "audio_parse.h" 10 #include "devsvc_manager_clnt.h" 11 12 #define HDF_LOG_TAG audio_parse_test 13 AudioFillConfigDataTest(void)14int32_t AudioFillConfigDataTest(void) 15 { 16 struct HdfDeviceObject *device = NULL; 17 struct AudioConfigData configData; 18 HDF_LOGI("enter"); 19 20 if (AudioFillConfigData(NULL, NULL) == HDF_SUCCESS) { 21 HDF_LOGE("AudioFillConfigData fail"); 22 return HDF_FAILURE; 23 } 24 25 device = DevSvcManagerClntGetDeviceObject("hdf_audio_codec_dev0"); 26 if (AudioFillConfigData(device, &configData) != HDF_SUCCESS) { 27 HDF_LOGE("AudioFillConfigData fail"); 28 return HDF_FAILURE; 29 } 30 31 HDF_LOGI("success"); 32 return HDF_SUCCESS; 33 } 34 CodecGetRegConfigTest(void)35int32_t CodecGetRegConfigTest(void) 36 { 37 struct HdfDeviceObject *device = NULL; 38 struct AudioRegCfgData regCfgData; 39 HDF_LOGI("enter"); 40 41 if (CodecGetRegConfig(NULL, NULL) == HDF_SUCCESS) { 42 HDF_LOGE("AudioFillConfigData fail"); 43 return HDF_FAILURE; 44 } 45 46 device = DevSvcManagerClntGetDeviceObject("hdf_audio_codec_dev0"); 47 if (CodecGetRegConfig(device, ®CfgData) != HDF_SUCCESS) { 48 HDF_LOGE("AudioFillConfigData fail"); 49 } 50 51 HDF_LOGI("success"); 52 return HDF_SUCCESS; 53 } 54