xref: /linux/sound/soc/mediatek/common/mtk-afe-platform-driver.h (revision 1aadc0147b42e64645b3ef5e837735b10ca6d205)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * mtk-afe-platform-driver.h  --  Mediatek afe platform driver definition
4  *
5  * Copyright (c) 2016 MediaTek Inc.
6  * Author: Garlic Tseng <garlic.tseng@mediatek.com>
7  */
8 
9 #ifndef _MTK_AFE_PLATFORM_DRIVER_H_
10 #define _MTK_AFE_PLATFORM_DRIVER_H_
11 
12 #define AFE_PCM_NAME "mtk-afe-pcm"
13 extern const struct snd_soc_component_driver mtk_afe_pcm_platform;
14 
15 #define MTK_ALIGN_16BYTES(x) ((x) & GENMASK_ULL(39, 4))
16 
17 struct mtk_base_afe;
18 struct snd_pcm;
19 struct snd_soc_component;
20 struct snd_soc_pcm_runtime;
21 
22 snd_pcm_uframes_t mtk_afe_pcm_pointer(struct snd_soc_component *component,
23 				      struct snd_pcm_substream *substream);
24 int mtk_afe_pcm_new(struct snd_soc_component *component,
25 		    struct snd_soc_pcm_runtime *rtd);
26 
27 int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe);
28 int mtk_afe_add_sub_dai_control(struct snd_soc_component *component);
29 #endif
30 
31