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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/list.hlinux/regmap.hsound/soc.hsound/asound.h../common/mtk-base-afe.hmt8365-reg.h
Detected Declarations
struct mt8365_fe_dai_datastruct mt8365_be_dai_datastruct mt8365_cm_ctrl_regstruct mt8365_control_datastruct mt8365_gasrc_ctrl_regstruct mt8365_gasrc_datastruct mt8365_afe_privateenum mt8365_afe_tdm_ch_startenum mt8365_cm_numenum mt8365_cm2_mux_inenum cm2_mux_conn_inenum dmic_input_modeenum iir_modefunction rx_frequency_palettefunction AutoRstThHifunction AutoRstThLo
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
- Immediate include surface: `linux/clk.h`, `linux/list.h`, `linux/regmap.h`, `sound/soc.h`, `sound/asound.h`, `../common/mtk-base-afe.h`, `mt8365-reg.h`.
- Detected declarations: `struct mt8365_fe_dai_data`, `struct mt8365_be_dai_data`, `struct mt8365_cm_ctrl_reg`, `struct mt8365_control_data`, `struct mt8365_gasrc_ctrl_reg`, `struct mt8365_gasrc_data`, `struct mt8365_afe_private`, `enum mt8365_afe_tdm_ch_start`, `enum mt8365_cm_num`, `enum mt8365_cm2_mux_in`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.