sound/soc/qcom/apq8096.c
Source file repositories/reference/linux-study-clean/sound/soc/qcom/apq8096.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/qcom/apq8096.c- Extension
.c- Size
- 3958 bytes
- Lines
- 146
- 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
linux/mod_devicetable.hlinux/module.hlinux/platform_device.hsound/soc.hsound/soc-dapm.hsound/pcm.hcommon.h
Detected Declarations
function apq8096_be_hw_params_fixupfunction msm_snd_hw_paramsfunction apq8096_initfunction apq8096_add_be_opsfunction for_each_card_prelinksfunction apq8096_platform_probe
Annotated Snippet
if (link->no_pcm == 1) {
link->be_hw_params_fixup = apq8096_be_hw_params_fixup;
link->init = apq8096_init;
link->ops = &apq8096_ops;
}
}
}
static int apq8096_platform_probe(struct platform_device *pdev)
{
struct snd_soc_card *card;
struct device *dev = &pdev->dev;
int ret;
card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL);
if (!card)
return -ENOMEM;
card->driver_name = "apq8096";
card->dev = dev;
card->owner = THIS_MODULE;
dev_set_drvdata(dev, card);
ret = qcom_snd_parse_of(card);
if (ret)
return ret;
apq8096_add_be_ops(card);
return devm_snd_soc_register_card(dev, card);
}
static const struct of_device_id msm_snd_apq8096_dt_match[] = {
{.compatible = "qcom,apq8096-sndcard"},
{}
};
MODULE_DEVICE_TABLE(of, msm_snd_apq8096_dt_match);
static struct platform_driver msm_snd_apq8096_driver = {
.probe = apq8096_platform_probe,
.driver = {
.name = "msm-snd-apq8096",
.of_match_table = msm_snd_apq8096_dt_match,
},
};
module_platform_driver(msm_snd_apq8096_driver);
MODULE_AUTHOR("Srinivas Kandagatla <srinivas.kandagatla@linaro.org");
MODULE_DESCRIPTION("APQ8096 ASoC Machine Driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/mod_devicetable.h`, `linux/module.h`, `linux/platform_device.h`, `sound/soc.h`, `sound/soc-dapm.h`, `sound/pcm.h`, `common.h`.
- Detected declarations: `function apq8096_be_hw_params_fixup`, `function msm_snd_hw_params`, `function apq8096_init`, `function apq8096_add_be_ops`, `function for_each_card_prelinks`, `function apq8096_platform_probe`.
- 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.