sound/soc/sof/sof-pci-dev.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/sof-pci-dev.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/sof-pci-dev.c- Extension
.c- Size
- 8217 bytes
- Lines
- 297
- 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.
- 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/firmware.hlinux/dmi.hlinux/module.hlinux/pci.hlinux/platform_data/x86/soc.hlinux/pm_runtime.hsound/soc-acpi.hsound/soc-acpi-intel-match.hsound/sof.hops.hsof-pci-dev.h
Detected Declarations
function sof_tplg_cbfunction up_use_community_keyfunction chromebook_use_community_keyfunction sof_pci_probe_completefunction sof_pci_probefunction sof_pci_removefunction sof_pci_shutdown
Annotated Snippet
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
//
// This file is provided under a dual BSD/GPLv2 license. When using or
// redistributing this file, you may do so under either license.
//
// Copyright(c) 2018 Intel Corporation
//
// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
//
#include <linux/firmware.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/platform_data/x86/soc.h>
#include <linux/pm_runtime.h>
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>
#include <sound/sof.h>
#include "ops.h"
#include "sof-pci-dev.h"
static char *fw_path;
module_param(fw_path, charp, 0444);
MODULE_PARM_DESC(fw_path, "deprecated - moved to snd-sof module.");
static char *fw_filename;
module_param(fw_filename, charp, 0444);
MODULE_PARM_DESC(fw_filename, "deprecated - moved to snd-sof module.");
static char *lib_path;
module_param(lib_path, charp, 0444);
MODULE_PARM_DESC(lib_path, "deprecated - moved to snd-sof module.");
static char *tplg_path;
module_param(tplg_path, charp, 0444);
MODULE_PARM_DESC(tplg_path, "deprecated - moved to snd-sof module.");
static char *tplg_filename;
module_param(tplg_filename, charp, 0444);
MODULE_PARM_DESC(tplg_filename, "deprecated - moved to snd-sof module.");
static int sof_pci_debug;
module_param_named(sof_pci_debug, sof_pci_debug, int, 0444);
MODULE_PARM_DESC(sof_pci_debug, "SOF PCI debug options (0x0 all off)");
static int sof_pci_ipc_type = -1;
module_param_named(ipc_type, sof_pci_ipc_type, int, 0444);
MODULE_PARM_DESC(ipc_type, "deprecated - moved to snd-sof module.");
static const char *sof_dmi_override_tplg_name;
static bool sof_dmi_use_community_key;
#define SOF_PCI_DISABLE_PM_RUNTIME BIT(0)
static int sof_tplg_cb(const struct dmi_system_id *id)
{
sof_dmi_override_tplg_name = id->driver_data;
return 1;
}
static const struct dmi_system_id sof_tplg_table[] = {
{
.callback = sof_tplg_cb,
.matches = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Volteer"),
DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98373_ALC5682I_I2S_UP4"),
},
.driver_data = "sof-tgl-rt5682-ssp0-max98373-ssp2.tplg",
},
{
.callback = sof_tplg_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"),
},
.driver_data = "sof-adl-rt5682-ssp0-max98373-ssp2.tplg",
},
{
.callback = sof_tplg_cb,
.matches = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Brya"),
DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98390_ALC5682I_I2S"),
},
.driver_data = "sof-adl-max98390-ssp2-rt5682-ssp0.tplg",
},
{
.callback = sof_tplg_cb,
.matches = {
Annotation
- Immediate include surface: `linux/firmware.h`, `linux/dmi.h`, `linux/module.h`, `linux/pci.h`, `linux/platform_data/x86/soc.h`, `linux/pm_runtime.h`, `sound/soc-acpi.h`, `sound/soc-acpi-intel-match.h`.
- Detected declarations: `function sof_tplg_cb`, `function up_use_community_key`, `function chromebook_use_community_key`, `function sof_pci_probe_complete`, `function sof_pci_probe`, `function sof_pci_remove`, `function sof_pci_shutdown`.
- 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.