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.

Dependency Surface

Detected Declarations

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

Implementation Notes