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 RK3588_PLATFORM_OPS_H
10 #define RK3588_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 Rk3588DmaBufAlloc(struct PlatformData *data, const enum AudioStreamType streamType);
23 int32_t Rk3588DmaBufFree(struct PlatformData *data, const enum AudioStreamType streamType);
24 int32_t Rk3588DmaRequestChannel(const struct PlatformData *data, const enum AudioStreamType streamType);
25 int32_t Rk3588DmaConfigChannel(const struct PlatformData *data, const enum AudioStreamType streamType);
26 int32_t Rk3588PcmPointer(struct PlatformData *data, const enum AudioStreamType streamType, uint32_t *pointer);
27 int32_t Rk3588DmaPrep(const struct PlatformData *data, const enum AudioStreamType streamType);
28 int32_t Rk3588DmaSubmit(const struct PlatformData *data, const enum AudioStreamType streamType);
29 int32_t Rk3588DmaPending(struct PlatformData *data, const enum AudioStreamType streamType);
30 int32_t Rk3588DmaPause(struct PlatformData *data, const enum AudioStreamType streamType);
31 int32_t Rk3588DmaResume(const struct PlatformData *data, const enum AudioStreamType streamType);
32 
33 #ifdef __cplusplus
34 #if __cplusplus
35 }
36 #endif
37 #endif /* __cplusplus */
38 
39 #endif /* RK3588_PLATFORM_OPS_H */
40