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_DMA_BASE_H 10 #define AUDIO_DMA_BASE_H 11 12 #include "audio_host.h" 13 14 #ifdef __cplusplus 15 #if __cplusplus 16 extern "C" { 17 #endif 18 #endif /* __cplusplus */ 19 20 int32_t AudioDmaBufAlloc(struct PlatformData *data, enum AudioStreamType streamType); 21 int32_t AudioDmaBufFree(struct PlatformData *data, enum AudioStreamType streamType); 22 int32_t AudioDmaRequestChannel(struct PlatformData *data, enum AudioStreamType streamType); 23 int32_t AudioDmaConfigChannel(struct PlatformData *data, enum AudioStreamType streamType); 24 int32_t AudioDmaPrep(struct PlatformData *data, enum AudioStreamType streamType); 25 int32_t AudioDmaSubmit(struct PlatformData *data, enum AudioStreamType streamType); 26 int32_t AudioDmaPending(struct PlatformData *data, enum AudioStreamType streamType); 27 int32_t AudioDmaPause(struct PlatformData *data, enum AudioStreamType streamType); 28 int32_t AudioDmaResume(struct PlatformData *data, enum AudioStreamType streamType); 29 int32_t AudioDmaPointer(struct PlatformData *data, enum AudioStreamType streamType, uint32_t *pointer); 30 int32_t AudioDmaGetConfigInfo(const struct HdfDeviceObject *device, struct PlatformData *data); 31 bool AudioDmaTransferStatusIsNormal(struct PlatformData *data, enum AudioStreamType streamType); 32 33 #ifdef __cplusplus 34 #if __cplusplus 35 } 36 #endif 37 #endif /* __cplusplus */ 38 39 #endif 40