162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * mtk-afe-fe-dais.h -- Mediatek afe fe dai operator definition 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2016 MediaTek Inc. 662306a36Sopenharmony_ci * Author: Garlic Tseng <garlic.tseng@mediatek.com> 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _MTK_AFE_FE_DAI_H_ 1062306a36Sopenharmony_ci#define _MTK_AFE_FE_DAI_H_ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cistruct snd_soc_dai_ops; 1362306a36Sopenharmony_cistruct mtk_base_afe; 1462306a36Sopenharmony_cistruct mtk_base_afe_memif; 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciint mtk_afe_fe_startup(struct snd_pcm_substream *substream, 1762306a36Sopenharmony_ci struct snd_soc_dai *dai); 1862306a36Sopenharmony_civoid mtk_afe_fe_shutdown(struct snd_pcm_substream *substream, 1962306a36Sopenharmony_ci struct snd_soc_dai *dai); 2062306a36Sopenharmony_ciint mtk_afe_fe_hw_params(struct snd_pcm_substream *substream, 2162306a36Sopenharmony_ci struct snd_pcm_hw_params *params, 2262306a36Sopenharmony_ci struct snd_soc_dai *dai); 2362306a36Sopenharmony_ciint mtk_afe_fe_hw_free(struct snd_pcm_substream *substream, 2462306a36Sopenharmony_ci struct snd_soc_dai *dai); 2562306a36Sopenharmony_ciint mtk_afe_fe_prepare(struct snd_pcm_substream *substream, 2662306a36Sopenharmony_ci struct snd_soc_dai *dai); 2762306a36Sopenharmony_ciint mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd, 2862306a36Sopenharmony_ci struct snd_soc_dai *dai); 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciextern const struct snd_soc_dai_ops mtk_afe_fe_ops; 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciint mtk_dynamic_irq_acquire(struct mtk_base_afe *afe); 3362306a36Sopenharmony_ciint mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id); 3462306a36Sopenharmony_ciint mtk_afe_suspend(struct snd_soc_component *component); 3562306a36Sopenharmony_ciint mtk_afe_resume(struct snd_soc_component *component); 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciint mtk_memif_set_enable(struct mtk_base_afe *afe, int id); 3862306a36Sopenharmony_ciint mtk_memif_set_disable(struct mtk_base_afe *afe, int id); 3962306a36Sopenharmony_ciint mtk_memif_set_addr(struct mtk_base_afe *afe, int id, 4062306a36Sopenharmony_ci unsigned char *dma_area, 4162306a36Sopenharmony_ci dma_addr_t dma_addr, 4262306a36Sopenharmony_ci size_t dma_bytes); 4362306a36Sopenharmony_ciint mtk_memif_set_channel(struct mtk_base_afe *afe, 4462306a36Sopenharmony_ci int id, unsigned int channel); 4562306a36Sopenharmony_ciint mtk_memif_set_rate(struct mtk_base_afe *afe, 4662306a36Sopenharmony_ci int id, unsigned int rate); 4762306a36Sopenharmony_ciint mtk_memif_set_rate_substream(struct snd_pcm_substream *substream, 4862306a36Sopenharmony_ci int id, unsigned int rate); 4962306a36Sopenharmony_ciint mtk_memif_set_format(struct mtk_base_afe *afe, 5062306a36Sopenharmony_ci int id, snd_pcm_format_t format); 5162306a36Sopenharmony_ciint mtk_memif_set_pbuf_size(struct mtk_base_afe *afe, 5262306a36Sopenharmony_ci int id, int pbuf_size); 5362306a36Sopenharmony_ci#endif 54