sound/hda/common/controller_trace.h
Source file repositories/reference/linux-study-clean/sound/hda/common/controller_trace.h
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/common/controller_trace.h- Extension
.h- Size
- 2203 bytes
- Lines
- 100
- Domain
- Driver Families
- Bucket
- sound/hda
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.htrace/define_trace.h
Detected Declarations
struct azxstruct azx_dev
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM hda_controller
#define TRACE_INCLUDE_FILE controller_trace
#if !defined(_TRACE_HDA_CONTROLLER_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HDA_CONTROLLER_H
#include <linux/tracepoint.h>
struct azx;
struct azx_dev;
TRACE_EVENT(azx_pcm_trigger,
TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd),
TP_ARGS(chip, dev, cmd),
TP_STRUCT__entry(
__field( int, card )
__field( int, idx )
__field( int, cmd )
),
TP_fast_assign(
__entry->card = (chip)->card->number;
__entry->idx = (dev)->core.index;
__entry->cmd = cmd;
),
TP_printk("[%d:%d] cmd=%d", __entry->card, __entry->idx, __entry->cmd)
);
TRACE_EVENT(azx_get_position,
TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay),
TP_ARGS(chip, dev, pos, delay),
TP_STRUCT__entry(
__field( int, card )
__field( int, idx )
__field( unsigned int, pos )
__field( unsigned int, delay )
),
TP_fast_assign(
__entry->card = (chip)->card->number;
__entry->idx = (dev)->core.index;
__entry->pos = pos;
__entry->delay = delay;
),
TP_printk("[%d:%d] pos=%u, delay=%u", __entry->card, __entry->idx, __entry->pos, __entry->delay)
);
DECLARE_EVENT_CLASS(azx_pcm,
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
TP_ARGS(chip, azx_dev),
TP_STRUCT__entry(
__field( unsigned char, stream_tag )
),
TP_fast_assign(
__entry->stream_tag = (azx_dev)->core.stream_tag;
),
TP_printk("stream_tag: %d", __entry->stream_tag)
);
DEFINE_EVENT(azx_pcm, azx_pcm_open,
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
TP_ARGS(chip, azx_dev)
);
DEFINE_EVENT(azx_pcm, azx_pcm_close,
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
TP_ARGS(chip, azx_dev)
);
DEFINE_EVENT(azx_pcm, azx_pcm_hw_params,
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
TP_ARGS(chip, azx_dev)
);
DEFINE_EVENT(azx_pcm, azx_pcm_prepare,
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
TP_ARGS(chip, azx_dev)
Annotation
- Immediate include surface: `linux/tracepoint.h`, `trace/define_trace.h`.
- Detected declarations: `struct azx`, `struct azx_dev`.
- Atlas domain: Driver Families / sound/hda.
- Implementation status: source 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.