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

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

File Facts

System
Linux kernel
Corpus path
sound/soc/mediatek/mt8365/mt8365-afe-common.h
Extension
.h
Size
9698 bytes
Lines
449
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 mt8365_fe_dai_data {
	bool use_sram;
	unsigned int sram_phy_addr;
	void __iomem *sram_vir_addr;
	unsigned int sram_size;
};

struct mt8365_be_dai_data {
	bool prepared[SNDRV_PCM_STREAM_LAST + 1];
	unsigned int fmt_mode;
};

#define MT8365_CLK_26M 26000000
#define MT8365_CLK_24M 24000000
#define MT8365_CLK_22M 22000000
#define MT8365_CM_UPDATA_CNT_SET 8

enum mt8365_cm_num {
	MT8365_CM1 = 0,
	MT8365_CM2,
	MT8365_CM_NUM,
};

enum mt8365_cm2_mux_in {
	MT8365_FROM_GASRC1 = 1,
	MT8365_FROM_GASRC2,
	MT8365_FROM_TDM_ASRC,
	MT8365_CM_MUX_NUM,
};

enum cm2_mux_conn_in {
	GENERAL2_ASRC_OUT_LCH = 0,
	GENERAL2_ASRC_OUT_RCH = 1,
	TDM_IN_CH0 = 2,
	TDM_IN_CH1 = 3,
	TDM_IN_CH2 = 4,
	TDM_IN_CH3 = 5,
	TDM_IN_CH4 = 6,
	TDM_IN_CH5 = 7,
	TDM_IN_CH6 = 8,
	TDM_IN_CH7 = 9,
	GENERAL1_ASRC_OUT_LCH = 10,
	GENERAL1_ASRC_OUT_RCH = 11,
	TDM_OUT_ASRC_CH0 = 12,
	TDM_OUT_ASRC_CH1 = 13,
	TDM_OUT_ASRC_CH2 = 14,
	TDM_OUT_ASRC_CH3 = 15,
	TDM_OUT_ASRC_CH4 = 16,
	TDM_OUT_ASRC_CH5 = 17,
	TDM_OUT_ASRC_CH6 = 18,
	TDM_OUT_ASRC_CH7 = 19
};

struct mt8365_cm_ctrl_reg {
	unsigned int con0;
	unsigned int con1;
	unsigned int con2;
	unsigned int con3;
	unsigned int con4;
};

struct mt8365_control_data {
	bool bypass_cm1;
	bool bypass_cm2;
	unsigned int loopback_type;
};

enum dmic_input_mode {
	DMIC_MODE_3P25M = 0,
	DMIC_MODE_1P625M,
	DMIC_MODE_812P5K,
	DMIC_MODE_406P25K,
};

enum iir_mode {
	IIR_MODE0 = 0,
	IIR_MODE1,
	IIR_MODE2,
	IIR_MODE3,
	IIR_MODE4,
	IIR_MODE5,
};

enum {
	MT8365_GASRC1 = 0,
	MT8365_GASRC2,
	MT8365_GASRC_NUM,
	MT8365_TDM_ASRC1 = MT8365_GASRC_NUM,
	MT8365_TDM_ASRC2,
	MT8365_TDM_ASRC3,

Annotation

Implementation Notes