linux/sound/soc/mediatek/mt8186/mt8186-afe-common.h

/* SPDX-License-Identifier: GPL-2.0
 *
 * mt8186-afe-common.h  --  Mediatek 8186 audio driver definitions
 *
 * Copyright (c) 2022 MediaTek Inc.
 * Author: Jiaxin Yu <[email protected]>
 */

#ifndef _MT_8186_AFE_COMMON_H_
#define _MT_8186_AFE_COMMON_H_
#include <sound/soc.h>
#include <linux/list.h>
#include <linux/regmap.h>
#include "mt8186-reg.h"
#include "../common/mtk-base-afe.h"

enum {};

#define MT8186_RECORD_MEMIF
#define MT8186_ECHO_REF_MEMIF
#define MT8186_PRIMARY_MEMIF
#define MT8186_FAST_MEMIF
#define MT8186_DEEP_MEMIF
#define MT8186_VOIP_MEMIF
#define MT8186_MMAP_DL_MEMIF
#define MT8186_MMAP_UL_MEMIF
#define MT8186_BARGEIN_MEMIF

enum {};

enum {};

enum {};

enum {};

#define MTK_SPK_I2S_0_STR
#define MTK_SPK_I2S_1_STR
#define MTK_SPK_I2S_2_STR
#define MTK_SPK_I2S_3_STR

/* MCLK */
enum {};

struct snd_pcm_substream;
struct mtk_base_irq_data;
struct clk;

struct mt8186_afe_private {};

int mt8186_dai_adda_register(struct mtk_base_afe *afe);
int mt8186_dai_i2s_register(struct mtk_base_afe *afe);
int mt8186_dai_tdm_register(struct mtk_base_afe *afe);
int mt8186_dai_hw_gain_register(struct mtk_base_afe *afe);
int mt8186_dai_src_register(struct mtk_base_afe *afe);
int mt8186_dai_pcm_register(struct mtk_base_afe *afe);
int mt8186_dai_hostless_register(struct mtk_base_afe *afe);

int mt8186_add_misc_control(struct snd_soc_component *component);

unsigned int mt8186_general_rate_transform(struct device *dev,
					   unsigned int rate);
unsigned int mt8186_rate_transform(struct device *dev,
				   unsigned int rate, int aud_blk);
unsigned int mt8186_tdm_relatch_rate_transform(struct device *dev,
					       unsigned int rate);

int mt8186_dai_i2s_set_share(struct mtk_base_afe *afe, const char *main_i2s_name,
			     const char *secondary_i2s_name);

int mt8186_dai_set_priv(struct mtk_base_afe *afe, int id,
			int priv_size, const void *priv_data);

#endif