sound/soc/amd/acp-da7219-max98357a.c
Source file repositories/reference/linux-study-clean/sound/soc/amd/acp-da7219-max98357a.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/amd/acp-da7219-max98357a.c- Extension
.c- Size
- 23571 bytes
- Lines
- 809
- 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.
- 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
sound/core.hsound/soc.hsound/pcm.hsound/pcm_params.hsound/soc-dapm.hsound/jack.hlinux/clk.hlinux/module.hlinux/regulator/machine.hlinux/regulator/driver.hlinux/i2c.hlinux/input.hlinux/acpi.hacp.h../codecs/da7219.h../codecs/rt5682.h
Detected Declarations
function cz_da7219_initfunction da7219_clk_enablefunction da7219_clk_disablefunction cz_rt5682_initfunction rt5682_clk_enablefunction rt5682_clk_disablefunction cz_da7219_play_startupfunction cz_da7219_cap_startupfunction cz_max_startupfunction cz_dmic0_startupfunction cz_dmic1_startupfunction cz_da7219_shutdownfunction cz_rt5682_play_startupfunction cz_rt5682_cap_startupfunction cz_rt5682_max_startupfunction cz_rt5682_dmic0_startupfunction cz_rt5682_dmic1_startupfunction cz_rt5682_shutdownfunction cz_probe
Annotated Snippet
if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "Failed to register regulator: %d\n",
(int)PTR_ERR(rdev));
return -EINVAL;
}
}
machine = devm_kzalloc(&pdev->dev, sizeof(struct acp_platform_info),
GFP_KERNEL);
if (!machine)
return -ENOMEM;
card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) {
return dev_err_probe(&pdev->dev, ret,
"devm_snd_soc_register_card(%s) failed\n",
card->name);
}
acp_bt_uart_enable = !device_property_read_bool(&pdev->dev,
"bt-pad-enable");
return 0;
}
#ifdef CONFIG_ACPI
static const struct acpi_device_id cz_audio_acpi_match[] = {
{ "AMD7219", (unsigned long)&cz_card },
{ "AMDI5682", (unsigned long)&cz_rt5682_card},
{},
};
MODULE_DEVICE_TABLE(acpi, cz_audio_acpi_match);
#endif
static struct platform_driver cz_pcm_driver = {
.driver = {
.name = "cz-da7219-max98357a",
.acpi_match_table = ACPI_PTR(cz_audio_acpi_match),
.pm = &snd_soc_pm_ops,
},
.probe = cz_probe,
};
module_platform_driver(cz_pcm_driver);
MODULE_AUTHOR("akshu.agrawal@amd.com");
MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
MODULE_DESCRIPTION("DA7219, RT5682 & MAX98357A audio support");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `sound/core.h`, `sound/soc.h`, `sound/pcm.h`, `sound/pcm_params.h`, `sound/soc-dapm.h`, `sound/jack.h`, `linux/clk.h`, `linux/module.h`.
- Detected declarations: `function cz_da7219_init`, `function da7219_clk_enable`, `function da7219_clk_disable`, `function cz_rt5682_init`, `function rt5682_clk_enable`, `function rt5682_clk_disable`, `function cz_da7219_play_startup`, `function cz_da7219_cap_startup`, `function cz_max_startup`, `function cz_dmic0_startup`.
- 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.