18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * mt6797-afe-common.h -- Mediatek 6797 audio driver definitions 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2018 MediaTek Inc. 68c2ecf20Sopenharmony_ci * Author: KaiChieh Chuang <kaichieh.chuang@mediatek.com> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _MT_6797_AFE_COMMON_H_ 108c2ecf20Sopenharmony_ci#define _MT_6797_AFE_COMMON_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <sound/soc.h> 138c2ecf20Sopenharmony_ci#include <linux/list.h> 148c2ecf20Sopenharmony_ci#include <linux/regmap.h> 158c2ecf20Sopenharmony_ci#include "../common/mtk-base-afe.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cienum { 188c2ecf20Sopenharmony_ci MT6797_MEMIF_DL1, 198c2ecf20Sopenharmony_ci MT6797_MEMIF_DL2, 208c2ecf20Sopenharmony_ci MT6797_MEMIF_DL3, 218c2ecf20Sopenharmony_ci MT6797_MEMIF_VUL, 228c2ecf20Sopenharmony_ci MT6797_MEMIF_AWB, 238c2ecf20Sopenharmony_ci MT6797_MEMIF_VUL12, 248c2ecf20Sopenharmony_ci MT6797_MEMIF_DAI, 258c2ecf20Sopenharmony_ci MT6797_MEMIF_MOD_DAI, 268c2ecf20Sopenharmony_ci MT6797_MEMIF_NUM, 278c2ecf20Sopenharmony_ci MT6797_DAI_ADDA = MT6797_MEMIF_NUM, 288c2ecf20Sopenharmony_ci MT6797_DAI_PCM_1, 298c2ecf20Sopenharmony_ci MT6797_DAI_PCM_2, 308c2ecf20Sopenharmony_ci MT6797_DAI_HOSTLESS_LPBK, 318c2ecf20Sopenharmony_ci MT6797_DAI_HOSTLESS_SPEECH, 328c2ecf20Sopenharmony_ci MT6797_DAI_NUM, 338c2ecf20Sopenharmony_ci}; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_cienum { 368c2ecf20Sopenharmony_ci MT6797_IRQ_1, 378c2ecf20Sopenharmony_ci MT6797_IRQ_2, 388c2ecf20Sopenharmony_ci MT6797_IRQ_3, 398c2ecf20Sopenharmony_ci MT6797_IRQ_4, 408c2ecf20Sopenharmony_ci MT6797_IRQ_7, 418c2ecf20Sopenharmony_ci MT6797_IRQ_NUM, 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_cistruct clk; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct mt6797_afe_private { 478c2ecf20Sopenharmony_ci struct clk **clk; 488c2ecf20Sopenharmony_ci}; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciunsigned int mt6797_general_rate_transform(struct device *dev, 518c2ecf20Sopenharmony_ci unsigned int rate); 528c2ecf20Sopenharmony_ciunsigned int mt6797_rate_transform(struct device *dev, 538c2ecf20Sopenharmony_ci unsigned int rate, int aud_blk); 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci/* dai register */ 568c2ecf20Sopenharmony_ciint mt6797_dai_adda_register(struct mtk_base_afe *afe); 578c2ecf20Sopenharmony_ciint mt6797_dai_pcm_register(struct mtk_base_afe *afe); 588c2ecf20Sopenharmony_ciint mt6797_dai_hostless_register(struct mtk_base_afe *afe); 598c2ecf20Sopenharmony_ci#endif 60