sound/soc/sdw_utils/soc_sdw_rt_amp.c
Source file repositories/reference/linux-study-clean/sound/soc/sdw_utils/soc_sdw_rt_amp.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sdw_utils/soc_sdw_rt_amp.c- Extension
.c- Size
- 8315 bytes
- Lines
- 308
- 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.hsound/control.hsound/soc.hsound/soc-acpi.hsound/soc-dapm.hlinux/soundwire/sdw.hlinux/soundwire/sdw_type.hlinux/dmi.hsound/soc_sdw_utils.hsoc_sdw_rt_amp_coeff_tables.h../codecs/rt1308.h
Detected Declarations
struct rt_amp_platform_datafunction rt_amp_add_device_propsfunction asoc_sdw_rt_amp_spk_rtd_initfunction for_each_rtd_codec_daisfunction rt1308_i2s_hw_paramsfunction asoc_sdw_rt_amp_exitfunction asoc_sdw_rt_amp_init
Annotated Snippet
struct rt_amp_platform_data {
const unsigned char *bq_params;
const unsigned int bq_params_cnt;
};
static const struct rt_amp_platform_data dell_0a5d_platform_data = {
.bq_params = dell_0a5d_bq_params,
.bq_params_cnt = ARRAY_SIZE(dell_0a5d_bq_params),
};
static const struct rt_amp_platform_data dell_0b00_platform_data = {
.bq_params = dell_0b00_bq_params,
.bq_params_cnt = ARRAY_SIZE(dell_0b00_bq_params),
};
static const struct dmi_system_id dmi_platform_data[] = {
/* CometLake devices */
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0990")
},
.driver_data = (void *)&dell_0a5d_platform_data,
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "098F")
},
.driver_data = (void *)&dell_0a5d_platform_data,
},
/* TigerLake devices */
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5D")
},
.driver_data = (void *)&dell_0a5d_platform_data,
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5E")
},
.driver_data = (void *)&dell_0a5d_platform_data,
},
/* AlderLake devices */
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B00")
},
.driver_data = (void *)&dell_0b00_platform_data,
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B01")
},
.driver_data = (void *)&dell_0b00_platform_data,
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AFF")
},
.driver_data = (void *)&dell_0b00_platform_data,
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AFE")
},
.driver_data = (void *)&dell_0b00_platform_data,
},
{},
};
static int rt_amp_add_device_props(struct device *sdw_dev)
{
struct property_entry props[3] = {};
struct fwnode_handle *fwnode;
const struct dmi_system_id *dmi_data;
const struct rt_amp_platform_data *pdata;
unsigned char params[RT_AMP_MAX_BQ_REG];
int ret;
dmi_data = dmi_first_match(dmi_platform_data);
if (!dmi_data)
return 0;
Annotation
- Immediate include surface: `linux/device.h`, `linux/errno.h`, `sound/control.h`, `sound/soc.h`, `sound/soc-acpi.h`, `sound/soc-dapm.h`, `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`.
- Detected declarations: `struct rt_amp_platform_data`, `function rt_amp_add_device_props`, `function asoc_sdw_rt_amp_spk_rtd_init`, `function for_each_rtd_codec_dais`, `function rt1308_i2s_hw_params`, `function asoc_sdw_rt_amp_exit`, `function asoc_sdw_rt_amp_init`.
- 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.