sound/soc/mediatek/common/mtk-base-afe.h
Source file repositories/reference/linux-study-clean/sound/soc/mediatek/common/mtk-base-afe.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/mediatek/common/mtk-base-afe.h- Extension
.h- Size
- 3889 bytes
- Lines
- 174
- 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/soc/mediatek/mtk_sip_svc.h
Detected Declarations
struct mtk_base_memif_datastruct mtk_base_irq_datastruct devicestruct list_headstruct mtk_base_afe_memifstruct mtk_base_afe_irqstruct mtk_base_afe_daistruct regmapstruct snd_pcm_substreamstruct snd_soc_daistruct mtk_base_afestruct mtk_base_afe_memifstruct mtk_base_afe_irqstruct mtk_base_afe_daienum mtk_audio_smc_call_op
Annotated Snippet
struct mtk_base_memif_data {
int id;
const char *name;
int reg_ofs_base;
int reg_ofs_cur;
int reg_ofs_end;
int reg_ofs_base_msb;
int reg_ofs_cur_msb;
int reg_ofs_end_msb;
int fs_reg;
int fs_shift;
int fs_maskbit;
int mono_reg;
int mono_shift;
int mono_invert;
int quad_ch_reg;
int quad_ch_mask;
int quad_ch_shift;
int int_odd_flag_reg;
int int_odd_flag_shift;
int enable_reg;
int enable_shift;
int hd_reg;
int hd_shift;
int hd_align_reg;
int hd_align_mshift;
int msb_reg;
int msb_shift;
int msb_end_reg;
int msb_end_shift;
int agent_disable_reg;
int agent_disable_shift;
int ch_num_reg;
int ch_num_shift;
int ch_num_maskbit;
/* playback memif only */
int pbuf_reg;
int pbuf_mask;
int pbuf_shift;
int minlen_reg;
int minlen_mask;
int minlen_shift;
};
struct mtk_base_irq_data {
int id;
int irq_cnt_reg;
int irq_cnt_shift;
int irq_cnt_maskbit;
int irq_fs_reg;
int irq_fs_shift;
int irq_fs_maskbit;
int irq_en_reg;
int irq_en_shift;
int irq_clr_reg;
int irq_clr_shift;
int irq_status_shift;
};
struct device;
struct list_head;
struct mtk_base_afe_memif;
struct mtk_base_afe_irq;
struct mtk_base_afe_dai;
struct regmap;
struct snd_pcm_substream;
struct snd_soc_dai;
struct mtk_base_afe {
void __iomem *base_addr;
struct device *dev;
struct regmap *regmap;
struct mutex irq_alloc_lock; /* dynamic alloc irq lock */
unsigned int const *reg_back_up_list;
unsigned int *reg_back_up;
unsigned int reg_back_up_list_num;
int (*runtime_suspend)(struct device *dev);
int (*runtime_resume)(struct device *dev);
bool suspended;
struct mtk_base_afe_memif *memif;
int memif_size;
struct mtk_base_afe_irq *irqs;
int irqs_size;
int memif_32bit_supported;
bool preallocate_buffers;
struct list_head sub_dais;
Annotation
- Immediate include surface: `linux/soc/mediatek/mtk_sip_svc.h`.
- Detected declarations: `struct mtk_base_memif_data`, `struct mtk_base_irq_data`, `struct device`, `struct list_head`, `struct mtk_base_afe_memif`, `struct mtk_base_afe_irq`, `struct mtk_base_afe_dai`, `struct regmap`, `struct snd_pcm_substream`, `struct snd_soc_dai`.
- 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.