sound/soc/codecs/wm5110.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/wm5110.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/wm5110.c- Extension
.c- Size
- 88464 bytes
- Lines
- 2546
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/moduleparam.hlinux/init.hlinux/delay.hlinux/pm.hlinux/pm_runtime.hlinux/regmap.hlinux/slab.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/jack.hsound/initval.hsound/tlv.hlinux/mfd/arizona/core.hlinux/mfd/arizona/registers.harizona.hwm_adsp.hwm5110.h
Detected Declarations
struct wm5110_privfunction wm5110_sysclk_evfunction wm5110_adsp_power_evfunction wm5110_hp_pre_enablefunction wm5110_hp_pre_disablefunction wm5110_hp_evfunction wm5110_clear_pga_volumefunction wm5110_put_drefunction wm5110_in_pga_getfunction wm5110_in_pga_putfunction wm5110_in_analog_evfunction wm5110_in_evfunction wm5110_set_fllfunction wm5110_openfunction wm5110_adsp2_irqfunction wm5110_component_probefunction wm5110_component_removefunction wm5110_probefunction wm5110_remove
Annotated Snippet
struct wm5110_priv {
struct arizona_priv core;
struct arizona_fll fll[2];
unsigned int in_value;
int in_pre_pending;
int in_post_pending;
unsigned int in_pga_cache[6];
};
static const struct cs_dsp_region wm5110_dsp1_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x100000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x180000 },
{ .type = WMFW_ADSP2_XM, .base = 0x190000 },
{ .type = WMFW_ADSP2_YM, .base = 0x1a8000 },
};
static const struct cs_dsp_region wm5110_dsp2_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x200000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x280000 },
{ .type = WMFW_ADSP2_XM, .base = 0x290000 },
{ .type = WMFW_ADSP2_YM, .base = 0x2a8000 },
};
static const struct cs_dsp_region wm5110_dsp3_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x300000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x380000 },
{ .type = WMFW_ADSP2_XM, .base = 0x390000 },
{ .type = WMFW_ADSP2_YM, .base = 0x3a8000 },
};
static const struct cs_dsp_region wm5110_dsp4_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x400000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x480000 },
{ .type = WMFW_ADSP2_XM, .base = 0x490000 },
{ .type = WMFW_ADSP2_YM, .base = 0x4a8000 },
};
static const struct cs_dsp_region *wm5110_dsp_regions[] = {
wm5110_dsp1_regions,
wm5110_dsp2_regions,
wm5110_dsp3_regions,
wm5110_dsp4_regions,
};
static const struct reg_default wm5110_sysclk_revd_patch[] = {
{ 0x3093, 0x1001 },
{ 0x30E3, 0x1301 },
{ 0x3133, 0x1201 },
{ 0x3183, 0x1501 },
{ 0x31D3, 0x1401 },
{ 0x0049, 0x01ea },
{ 0x004a, 0x01f2 },
{ 0x0057, 0x01e7 },
{ 0x0058, 0x01fb },
{ 0x33ce, 0xc4f5 },
{ 0x33cf, 0x1361 },
{ 0x33d0, 0x0402 },
{ 0x33d1, 0x4700 },
{ 0x33d2, 0x026d },
{ 0x33d3, 0xff00 },
{ 0x33d4, 0x026d },
{ 0x33d5, 0x0101 },
{ 0x33d6, 0xc4f5 },
{ 0x33d7, 0x0361 },
{ 0x33d8, 0x0402 },
{ 0x33d9, 0x6701 },
{ 0x33da, 0xc4f5 },
{ 0x33db, 0x136f },
{ 0x33dc, 0xc4f5 },
{ 0x33dd, 0x134f },
{ 0x33de, 0xc4f5 },
{ 0x33df, 0x131f },
{ 0x33e0, 0x026d },
{ 0x33e1, 0x4f01 },
{ 0x33e2, 0x026d },
{ 0x33e3, 0xf100 },
{ 0x33e4, 0x026d },
{ 0x33e5, 0x0001 },
{ 0x33e6, 0xc4f5 },
{ 0x33e7, 0x0361 },
{ 0x33e8, 0x0402 },
{ 0x33e9, 0x6601 },
{ 0x33ea, 0xc4f5 },
{ 0x33eb, 0x136f },
{ 0x33ec, 0xc4f5 },
{ 0x33ed, 0x134f },
{ 0x33ee, 0xc4f5 },
{ 0x33ef, 0x131f },
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/delay.h`, `linux/pm.h`, `linux/pm_runtime.h`, `linux/regmap.h`, `linux/slab.h`.
- Detected declarations: `struct wm5110_priv`, `function wm5110_sysclk_ev`, `function wm5110_adsp_power_ev`, `function wm5110_hp_pre_enable`, `function wm5110_hp_pre_disable`, `function wm5110_hp_ev`, `function wm5110_clear_pga_volume`, `function wm5110_put_dre`, `function wm5110_in_pga_get`, `function wm5110_in_pga_put`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.