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 #ifndef AUDIO_CODEC_BASE_H 10 #define AUDIO_CODEC_BASE_H 11 12 #include "audio_codec_if.h" 13 #include "audio_core.h" 14 #include "osal_io.h" 15 16 #ifdef __cplusplus 17 #if __cplusplus 18 extern "C" { 19 #endif 20 #endif /* __cplusplus */ 21 22 int32_t CodecDeviceReadReg(const struct CodecDevice *codec, uint32_t reg, uint32_t *value); 23 int32_t CodecDeviceWriteReg(const struct CodecDevice *codec, uint32_t reg, uint32_t value); 24 int32_t CodecAiaoDeviceReadReg(const struct CodecDevice *codec, uint32_t reg, uint32_t *value); 25 int32_t CodecAiaoDeviceWriteReg(const struct CodecDevice *codec, uint32_t reg, uint32_t value); 26 int32_t CodecGetServiceName(const struct HdfDeviceObject *device, const char **drvCodecName); 27 int32_t CodecGetDaiName(const struct HdfDeviceObject *device, const char **drvDaiName); 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 } 32 #endif 33 #endif /* __cplusplus */ 34 35 #endif 36