developer | be797a3 | 2021-12-16 16:56:09 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * mt79xx-afe-common.h -- Mediatek 79xx audio driver definitions |
| 4 | * |
| 5 | * Copyright (c) 2021 MediaTek Inc. |
| 6 | * Author: Vic Wu <vic.wu@mediatek.com> |
| 7 | */ |
| 8 | |
| 9 | #ifndef _MT_79XX_AFE_COMMON_H_ |
| 10 | #define _MT_79XX_AFE_COMMON_H_ |
| 11 | |
| 12 | #include <sound/soc.h> |
| 13 | #include <linux/list.h> |
| 14 | #include <linux/regmap.h> |
| 15 | #include "../common/mtk-base-afe.h" |
| 16 | |
| 17 | enum { |
| 18 | MT79XX_MEMIF_DL1, |
| 19 | MT79XX_MEMIF_VUL12, |
| 20 | MT79XX_MEMIF_NUM, |
| 21 | MT79XX_DAI_ETDM = MT79XX_MEMIF_NUM, |
| 22 | MT79XX_DAI_NUM, |
| 23 | }; |
| 24 | |
| 25 | enum { |
| 26 | MT79XX_IRQ_0, |
| 27 | MT79XX_IRQ_1, |
developer | 0426ed2 | 2022-01-07 10:49:03 +0800 | [diff] [blame] | 28 | MT79XX_IRQ_2, |
developer | be797a3 | 2021-12-16 16:56:09 +0800 | [diff] [blame] | 29 | MT79XX_IRQ_NUM, |
| 30 | }; |
| 31 | |
| 32 | struct clk; |
| 33 | |
| 34 | struct mt79xx_afe_private { |
| 35 | struct clk **clk; |
| 36 | |
| 37 | int pm_runtime_bypass_reg_ctl; |
| 38 | |
| 39 | /* dai */ |
| 40 | void *dai_priv[MT79XX_DAI_NUM]; |
| 41 | }; |
| 42 | |
| 43 | unsigned int mt79xx_afe_rate_transform(struct device *dev, |
| 44 | unsigned int rate); |
| 45 | |
| 46 | /* dai register */ |
| 47 | int mt79xx_dai_etdm_register(struct mtk_base_afe *afe); |
| 48 | #endif |