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

Source file repositories/reference/linux-study-clean/sound/soc/mediatek/mt8186/mt8186-afe-common.h

File Facts

System
Linux kernel
Corpus path
sound/soc/mediatek/mt8186/mt8186-afe-common.h
Extension
.h
Size
4575 bytes
Lines
199
Domain
Driver Families
Bucket
sound/soc
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mt8186_afe_private {
	struct clk **clk;
	struct clk_lookup **lookup;
	struct regmap *topckgen;
	struct regmap *apmixedsys;
	struct regmap *infracfg;
	int irq_cnt[MT8186_MEMIF_NUM];
	int stf_positive_gain_db;
	int pm_runtime_bypass_reg_ctl;
	int sgen_mode;
	int sgen_rate;
	int sgen_amplitude;

	/* xrun assert */
	int xrun_assert[MT8186_MEMIF_NUM];

	/* dai */
	bool dai_on[MT8186_DAI_NUM];
	void *dai_priv[MT8186_DAI_NUM];

	/* adda */
	bool mtkaif_calibration_ok;
	int mtkaif_protocol;
	int mtkaif_chosen_phase[4];
	int mtkaif_phase_cycle[4];
	int mtkaif_calibration_num_phase;
	int mtkaif_dmic;
	int mtkaif_looback0;
	int mtkaif_looback1;

	/* mck */
	int mck_rate[MT8186_MCK_NUM];
};

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

Annotation

Implementation Notes