sound/soc/sdw_utils/soc_sdw_rt_dmic.c
Source file repositories/reference/linux-study-clean/sound/soc/sdw_utils/soc_sdw_rt_dmic.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sdw_utils/soc_sdw_rt_dmic.c- Extension
.c- Size
- 2722 bytes
- Lines
- 86
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/errno.hlinux/soundwire/sdw.hlinux/soundwire/sdw_type.hsound/soc.hsound/soc-acpi.hsound/soc_sdw_utils.hsound/sdca_function.h
Detected Declarations
function asoc_sdw_rt_dmic_rtd_initfunction for_each_card_components
Annotated Snippet
for_each_card_components(card, component) {
if (!is_sdw_slave(component->dev))
continue;
sdw_peripheral = dev_to_sdw_dev(component->dev);
if (sdw_peripheral->id.part_id != part_id)
continue;
for (i = 0; i < sdw_peripheral->sdca_data.num_functions; i++) {
if (sdw_peripheral->sdca_data.function[i].type ==
SDCA_FUNCTION_TYPE_SMART_MIC) {
rt1320_dmic_num++;
break;
}
}
}
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
"%s mic:%s cfg-mics:%d", card->components,
mic_name, rt1320_dmic_num);
} else {
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
"%s mic:%s", card->components,
mic_name);
}
if (!card->components)
return -ENOMEM;
dev_dbg(card->dev, "card->components: %s\n", card->components);
return 0;
}
EXPORT_SYMBOL_NS(asoc_sdw_rt_dmic_rtd_init, "SND_SOC_SDW_UTILS");
Annotation
- Immediate include surface: `linux/device.h`, `linux/errno.h`, `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`, `sound/soc.h`, `sound/soc-acpi.h`, `sound/soc_sdw_utils.h`, `sound/sdca_function.h`.
- Detected declarations: `function asoc_sdw_rt_dmic_rtd_init`, `function for_each_card_components`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: integration 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.