sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c
Source file repositories/reference/linux-study-clean/sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c- Extension
.c- Size
- 1580 bytes
- Lines
- 59
- 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/dmi.hlinux/soundwire/sdw_intel.hsound/sdca.hsound/soc-acpi.hsoc-acpi-intel-sdca-quirks.h
Detected Declarations
function Copyrightfunction snd_soc_acpi_intel_no_function_topology
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* soc-acpi-intel-sdca-quirks.c - tables and support for SDCA quirks
*
* Copyright (c) 2024, Intel Corporation.
*
*/
#include <linux/dmi.h>
#include <linux/soundwire/sdw_intel.h>
#include <sound/sdca.h>
#include <sound/soc-acpi.h>
#include "soc-acpi-intel-sdca-quirks.h"
/*
* Pretend machine quirk. The argument type is not the traditional
* 'struct snd_soc_acpi_mach' pointer but instead the sdw_intel_ctx
* which contains the peripheral information required for the
* SoundWire/SDCA filter on the SMART_MIC setup and interface
* revision. When the return value is false, the entry in the
* 'snd_soc_acpi_mach' table needs to be skipped.
*/
bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg)
{
struct sdw_intel_ctx *ctx = arg;
int i;
if (!ctx)
return false;
for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
if (sdca_device_quirk_match(ctx->peripherals->array[i],
SDCA_QUIRKS_RT712_VB))
return true;
}
return false;
}
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_sdca_is_device_rt712_vb, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
static const struct dmi_system_id function_topology_quirk_table[] = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
},
},
{}
};
bool snd_soc_acpi_intel_no_function_topology(void *arg)
{
return !!dmi_check_system(function_topology_quirk_table);
}
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_no_function_topology, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
MODULE_DESCRIPTION("ASoC ACPI Intel SDCA quirks");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("SND_SOC_SDCA");
Annotation
- Immediate include surface: `linux/dmi.h`, `linux/soundwire/sdw_intel.h`, `sound/sdca.h`, `sound/soc-acpi.h`, `soc-acpi-intel-sdca-quirks.h`.
- Detected declarations: `function Copyright`, `function snd_soc_acpi_intel_no_function_topology`.
- 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.