Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
78 lines
2.9 KiB
C
78 lines
2.9 KiB
C
/*
|
|
* mtk-afe-fe-dais.h -- Mediatek afe fe dai operator definition
|
|
*
|
|
* Copyright (c) 2016 MediaTek Inc.
|
|
* Author: Garlic Tseng <garlic.tseng@mediatek.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef _MTK_AFE_FE_DAI_H_
|
|
#define _MTK_AFE_FE_DAI_H_
|
|
|
|
struct snd_soc_dai_ops;
|
|
struct mtk_base_afe;
|
|
struct mtk_base_afe_memif;
|
|
struct mtk_base_irq_data;
|
|
struct regmap;
|
|
|
|
int mtk_regmap_update_bits(struct regmap *map, int reg,
|
|
unsigned int mask,
|
|
unsigned int val);
|
|
int mtk_regmap_write(struct regmap *map, int reg, unsigned int val);
|
|
|
|
int mtk_afe_fe_startup(struct snd_pcm_substream *substream,
|
|
struct snd_soc_dai *dai);
|
|
void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream,
|
|
struct snd_soc_dai *dai);
|
|
int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
|
|
struct snd_pcm_hw_params *params,
|
|
struct snd_soc_dai *dai);
|
|
int mtk_afe_fe_hw_free(struct snd_pcm_substream *substream,
|
|
struct snd_soc_dai *dai);
|
|
int mtk_afe_fe_prepare(struct snd_pcm_substream *substream,
|
|
struct snd_soc_dai *dai);
|
|
int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
|
|
struct snd_soc_dai *dai);
|
|
|
|
extern const struct snd_soc_dai_ops mtk_afe_fe_ops;
|
|
|
|
int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe);
|
|
int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id);
|
|
int mtk_afe_dai_suspend(struct snd_soc_dai *dai);
|
|
int mtk_afe_dai_resume(struct snd_soc_dai *dai);
|
|
|
|
int mtk_memif_set_enable(struct mtk_base_afe *afe, int id);
|
|
int mtk_memif_set_disable(struct mtk_base_afe *afe, int id);
|
|
int mtk_memif_set_addr(struct mtk_base_afe *afe, int id,
|
|
unsigned char *dma_area,
|
|
dma_addr_t dma_addr,
|
|
size_t dma_bytes);
|
|
int mtk_memif_set_channel(struct mtk_base_afe *afe,
|
|
int id, unsigned int channel);
|
|
int mtk_memif_set_rate(struct mtk_base_afe *afe,
|
|
int id, unsigned int rate);
|
|
int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
|
|
int id, unsigned int rate);
|
|
int mtk_memif_set_format(struct mtk_base_afe *afe,
|
|
int id, snd_pcm_format_t format);
|
|
int mtk_memif_set_pbuf_size(struct mtk_base_afe *afe,
|
|
int id, int pbuf_size);
|
|
|
|
#if defined(CONFIG_MTK_AUDIODSP_SUPPORT)
|
|
/* using 3 way samephore to ensure ap/dsp sync */
|
|
int mtk_dsp_memif_set_enable(struct mtk_base_afe *afe, int id);
|
|
int mtk_dsp_memif_set_disable(struct mtk_base_afe *afe, int id);
|
|
int mtk_dsp_irq_set_enable(struct mtk_base_afe *afe, const struct mtk_base_irq_data *irq_data);
|
|
int mtk_dsp_irq_set_disable(struct mtk_base_afe *afe, const struct mtk_base_irq_data *irq_data);
|
|
#endif
|
|
|
|
#endif
|