1 /* SPDX-License-Identifier: BSD-3-Clause 2 * 3 * Copyright(c) 2022 AMD. All rights reserved. 4 * 5 * Author: Basavaraj Hiregoudar <basavaraj.hiregoudar@amd.com> 6 * Anup Kulkarni<anup.kulkarni@amd.com> 7 * Bala Kishore <balakishore.pati@amd.com> 8 */ 9 #ifndef __SOF_DRIVERS_ACPDMA_H__ 10 #define __SOF_DRIVERS_ACPDMA_H__ 11 12 #include <ipc/dai.h> 13 #include <ipc/dai-amd.h> 14 #include <sof/lib/dai.h> 15 #include <rtos/bit.h> 16 #include <sof/trace/trace.h> 17 #include <user/trace.h> 18 19 #if CONFIG_AMD_BT 20 #define ACP_BT_ENABLE 21 #endif 22 23 #if CONFIG_AMD_SP 24 #define ACP_SP_ENABLE 25 #endif 26 27 int acp_dma_init(struct sof *sof); 28 29 #define ACP_DMA_BUFFER_PERIOD_COUNT 2 30 31 /* default max number of channels supported */ 32 #define ACP_DEFAULT_NUM_CHANNELS 2 33 34 /* default sample rate */ 35 #define ACP_DEFAULT_SAMPLE_RATE 48000 36 37 #define ACP_DMA_BUFFER_ALIGN 64 38 #define ACP_DMA_BUFFER_ALIGN_128 128 39 #define ACP_DMA_TRANS_SIZE 64 40 #define ACP_DMA_TRANS_SIZE_128 128 41 #define ACP_DAI_DMA_BUFFER_PERIOD_COUNT 2 42 #define ACP_DRAM_ADDRESS_MASK 0x0FFFFFFF 43 #define ACP_ACLK_CLK_SEL 0x3 44 #define ACP_INTERNAL_CLK_SEL 0x0 45 46 extern const struct dai_driver acp_spdai_driver; 47 extern const struct dai_driver acp_sp_virtual_dai_driver; 48 extern const struct dai_driver acp_btdai_driver; 49 extern const struct dai_driver acp_dmic_dai_driver; 50 extern const struct dai_driver acp_hsdai_driver; 51 extern const struct dai_driver acp_hs_virtual_dai_driver; 52 53 /* ACP private data */ 54 struct acp_pdata { 55 struct sof_ipc_dai_config config; 56 struct sof_ipc_dai_acpdmic_params dmic_params; 57 struct sof_ipc_dai_acp_params params; 58 }; 59 #endif /* __SOF_DRIVERS_ACPDMA_H__ */ 60