sound/soc/codecs/cs47l90.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/cs47l90.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/cs47l90.c- Extension
.c- Size
- 97900 bytes
- Lines
- 2658
- 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/device.hlinux/delay.hlinux/init.hlinux/pm.hlinux/pm_runtime.hlinux/regmap.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/tlv.hlinux/irqchip/irq-madera.hlinux/mfd/madera/core.hlinux/mfd/madera/registers.hmadera.hwm_adsp.h
Detected Declarations
struct cs47l90function cs47l90_adsp_power_evfunction cs47l90_set_fllfunction cs47l90_openfunction cs47l90_adsp2_irqfunction cs47l90_component_probefunction cs47l90_component_removefunction cs47l90_probefunction cs47l90_remove
Annotated Snippet
struct cs47l90 {
struct madera_priv core;
struct madera_fll fll[3];
};
static const struct cs_dsp_region cs47l90_dsp1_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x080000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x0e0000 },
{ .type = WMFW_ADSP2_XM, .base = 0x0a0000 },
{ .type = WMFW_ADSP2_YM, .base = 0x0c0000 },
};
static const struct cs_dsp_region cs47l90_dsp2_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x100000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x160000 },
{ .type = WMFW_ADSP2_XM, .base = 0x120000 },
{ .type = WMFW_ADSP2_YM, .base = 0x140000 },
};
static const struct cs_dsp_region cs47l90_dsp3_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x180000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x1e0000 },
{ .type = WMFW_ADSP2_XM, .base = 0x1a0000 },
{ .type = WMFW_ADSP2_YM, .base = 0x1c0000 },
};
static const struct cs_dsp_region cs47l90_dsp4_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x200000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x260000 },
{ .type = WMFW_ADSP2_XM, .base = 0x220000 },
{ .type = WMFW_ADSP2_YM, .base = 0x240000 },
};
static const struct cs_dsp_region cs47l90_dsp5_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x280000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x2e0000 },
{ .type = WMFW_ADSP2_XM, .base = 0x2a0000 },
{ .type = WMFW_ADSP2_YM, .base = 0x2c0000 },
};
static const struct cs_dsp_region cs47l90_dsp6_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x300000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x360000 },
{ .type = WMFW_ADSP2_XM, .base = 0x320000 },
{ .type = WMFW_ADSP2_YM, .base = 0x340000 },
};
static const struct cs_dsp_region cs47l90_dsp7_regions[] = {
{ .type = WMFW_ADSP2_PM, .base = 0x380000 },
{ .type = WMFW_ADSP2_ZM, .base = 0x3e0000 },
{ .type = WMFW_ADSP2_XM, .base = 0x3a0000 },
{ .type = WMFW_ADSP2_YM, .base = 0x3c0000 },
};
static const struct cs_dsp_region *cs47l90_dsp_regions[] = {
cs47l90_dsp1_regions,
cs47l90_dsp2_regions,
cs47l90_dsp3_regions,
cs47l90_dsp4_regions,
cs47l90_dsp5_regions,
cs47l90_dsp6_regions,
cs47l90_dsp7_regions,
};
static const int cs47l90_dsp_control_bases[] = {
MADERA_DSP1_CONFIG_1,
MADERA_DSP2_CONFIG_1,
MADERA_DSP3_CONFIG_1,
MADERA_DSP4_CONFIG_1,
MADERA_DSP5_CONFIG_1,
MADERA_DSP6_CONFIG_1,
MADERA_DSP7_CONFIG_1,
};
static int cs47l90_adsp_power_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{
struct snd_soc_component *component =
snd_soc_dapm_to_component(w->dapm);
struct cs47l90 *cs47l90 = snd_soc_component_get_drvdata(component);
struct madera_priv *priv = &cs47l90->core;
struct madera *madera = priv->madera;
unsigned int freq;
int ret;
ret = regmap_read(madera->regmap, MADERA_DSP_CLOCK_2, &freq);
if (ret != 0) {
dev_err(madera->dev,
"Failed to read MADERA_DSP_CLOCK_2: %d\n", ret);
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/device.h`, `linux/delay.h`, `linux/init.h`, `linux/pm.h`, `linux/pm_runtime.h`, `linux/regmap.h`.
- Detected declarations: `struct cs47l90`, `function cs47l90_adsp_power_ev`, `function cs47l90_set_fll`, `function cs47l90_open`, `function cs47l90_adsp2_irq`, `function cs47l90_component_probe`, `function cs47l90_component_remove`, `function cs47l90_probe`, `function cs47l90_remove`.
- 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.