xref: /linux/sound/soc/intel/avs/cldma.h (revision 4f77c3462308c62ffe7129cc18b9ac937f44b5a5)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright(c) 2021-2022 Intel Corporation
4  *
5  * Author: Cezary Rojewski <cezary.rojewski@intel.com>
6  */
7 
8 #ifndef __SOUND_SOC_INTEL_AVS_CLDMA_H
9 #define __SOUND_SOC_INTEL_AVS_CLDMA_H
10 
11 #include <linux/sizes.h>
12 
13 #define AVS_CL_DEFAULT_BUFFER_SIZE	SZ_128K
14 
15 struct hda_cldma;
16 extern struct hda_cldma code_loader;
17 
18 void hda_cldma_fill(struct hda_cldma *cl);
19 void hda_cldma_transfer(struct hda_cldma *cl, unsigned long start_delay);
20 
21 int hda_cldma_start(struct hda_cldma *cl);
22 int hda_cldma_stop(struct hda_cldma *cl);
23 int hda_cldma_reset(struct hda_cldma *cl);
24 
25 void hda_cldma_set_data(struct hda_cldma *cl, void *data, unsigned int size);
26 void hda_cldma_setup(struct hda_cldma *cl);
27 void hda_cldma_interrupt(struct hda_cldma *cl);
28 int hda_cldma_init(struct hda_cldma *cl, struct hdac_bus *bus, void __iomem *dsp_ba,
29 		   unsigned int buffer_size);
30 void hda_cldma_free(struct hda_cldma *cl);
31 
32 #endif
33