sound/soc/sof/ipc4-telemetry.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/ipc4-telemetry.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/ipc4-telemetry.c- Extension
.c- Size
- 2428 bytes
- Lines
- 96
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/debugfs.hlinux/io.hlinux/pm_runtime.hsound/sof/debug.hsound/sof/ipc4/header.hsof-priv.hops.hipc4-telemetry.hipc4-priv.h
Detected Declarations
function sof_telemetry_entry_readfunction sof_ipc4_create_exception_debugfs_node
Annotated Snippet
static const struct file_operations sof_telemetry_fops = {
.open = simple_open,
.read = sof_telemetry_entry_read,
};
void sof_ipc4_create_exception_debugfs_node(struct snd_sof_dev *sdev)
{
struct snd_sof_dfsentry *dfse;
dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL);
if (!dfse)
return;
dfse->type = SOF_DFSENTRY_TYPE_IOMEM;
dfse->size = SOF_IPC4_DEBUG_SLOT_SIZE - 4;
dfse->access_type = SOF_DEBUGFS_ACCESS_ALWAYS;
dfse->sdev = sdev;
list_add(&dfse->list, &sdev->dfsentry_list);
debugfs_create_file("exception", 0444, sdev->debugfs_root, dfse, &sof_telemetry_fops);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/io.h`, `linux/pm_runtime.h`, `sound/sof/debug.h`, `sound/sof/ipc4/header.h`, `sof-priv.h`, `ops.h`, `ipc4-telemetry.h`.
- Detected declarations: `function sof_telemetry_entry_read`, `function sof_ipc4_create_exception_debugfs_node`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.