1 /* 2 * Copyright (C) 2022 HiHope Open Source Organization . 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 RK3568_PLATFORM_OPS_H 10 #define RK3568_PLATFORM_OPS_H 11 12 #include <linux/dmaengine.h> 13 #include "audio_core.h" 14 15 #ifdef __cplusplus 16 #if __cplusplus 17 extern "C" { 18 #endif 19 #endif /* __cplusplus */ 20 21 int32_t AudioDmaDeviceInit(const struct AudioCard *card, const struct PlatformDevice *platform); 22 int32_t Rk3568DmaBufAlloc(struct PlatformData *data, const enum AudioStreamType streamType); 23 int32_t Rk3568DmaBufFree(struct PlatformData *data, const enum AudioStreamType streamType); 24 int32_t Rk3568DmaRequestChannel(const struct PlatformData *data, const enum AudioStreamType streamType); 25 int32_t Rk3568DmaConfigChannel(const struct PlatformData *data, const enum AudioStreamType streamType); 26 int32_t Rk3568PcmPointer(struct PlatformData *data, const enum AudioStreamType streamType, uint32_t *pointer); 27 int32_t Rk3568DmaPrep(const struct PlatformData *data, const enum AudioStreamType streamType); 28 int32_t Rk3568DmaSubmit(const struct PlatformData *data, const enum AudioStreamType streamType); 29 int32_t Rk3568DmaPending(struct PlatformData *data, const enum AudioStreamType streamType); 30 int32_t Rk3568DmaPause(struct PlatformData *data, const enum AudioStreamType streamType); 31 int32_t Rk3568DmaResume(const struct PlatformData *data, const enum AudioStreamType streamType); 32 33 #ifdef __cplusplus 34 #if __cplusplus 35 } 36 #endif 37 #endif /* __cplusplus */ 38 39 #endif /* RK3568_PLATFORM_OPS_H */ 40