• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
9 #include "hi3516_codec_ops_test.h"
10 #include "audio_codec_base.h"
11 #include "devsvc_manager_clnt.h"
12 #include "hdf_base.h"
13 #include "hdf_log.h"
14 #include "hi3516_codec_ops.h"
15 #include "hi3516_common_func.h"
16 
17 #define HDF_LOG_TAG hi3516_codec_ops_test
18 
TestCodecDeviceInit(void)19 int32_t TestCodecDeviceInit(void)
20 {
21     int32_t ret;
22     struct AudioCard *audioCard = NULL;
23     struct CodecDevice *codec = NULL;
24     HDF_LOGI("%s: enter", __func__);
25 
26     ret = CodecDeviceInit(audioCard, codec);
27 
28     HDF_LOGI("TestCodecDeviceInit:%s: success", __func__);
29     return HDF_SUCCESS;
30 }
31 
TestCodecDaiDeviceInit(void)32 int32_t TestCodecDaiDeviceInit(void)
33 {
34     int ret;
35     struct AudioCard *card = NULL;
36     struct DaiDevice *device = NULL;
37     HDF_LOGI("%s: enter", __func__);
38 
39     ret = CodecDaiDeviceInit(card, device);
40 
41     HDF_LOGI("TestCodecDaiDeviceInit: success");
42     OsalMemFree(device);
43     return HDF_SUCCESS;
44 }
45 
TestCodecDaiStartup(void)46 int32_t TestCodecDaiStartup(void)
47 {
48     int ret;
49     struct AudioCard *card = NULL;
50     struct DaiDevice *device = NULL;
51     HDF_LOGI("%s: enter", __func__);
52 
53     ret = CodecDaiStartup(card, device);
54 
55     HDF_LOGI("TestCodecDaiStartup: success");
56     return HDF_SUCCESS;
57 }
58 
TestCodecDaiHwParams(void)59 int32_t TestCodecDaiHwParams(void)
60 {
61     struct AudioCard *card = NULL;
62     struct AudioPcmHwParams *param = NULL;
63     int ret;
64     HDF_LOGI("TestCodecDaiHwParams: enter");
65 
66     ret = CodecDaiHwParams(card, param);
67 
68     HDF_LOGI("TestCodecDaiHwParams: success");
69     return HDF_SUCCESS;
70 }
71