sound/firewire/amdtp-stream.h
Source file repositories/reference/linux-study-clean/sound/firewire/amdtp-stream.h
File Facts
- System
- Linux kernel
- Corpus path
sound/firewire/amdtp-stream.h- Extension
.h- Size
- 11027 bytes
- Lines
- 373
- Domain
- Driver Families
- Bucket
- sound/firewire
- 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/err.hlinux/interrupt.hlinux/mutex.hlinux/sched.hsound/asound.hpackets-buffer.h
Detected Declarations
struct fw_unitstruct fw_iso_contextstruct snd_pcm_substreamstruct snd_pcm_runtimestruct pkt_descstruct amdtp_streamstruct amdtp_domainstruct amdtp_streamstruct seq_descstruct amdtp_domainenum cip_flagsenum cip_sfcenum amdtp_stream_directionfunction amdtp_stream_runningfunction amdtp_streaming_errorfunction amdtp_stream_pcm_runningfunction amdtp_stream_pcm_triggerfunction cip_sfc_is_base_44100function amdtp_domain_set_events_per_periodfunction amdtp_domain_wait_readyfunction list_for_each_entry
Annotated Snippet
struct pkt_desc {
u32 cycle;
u32 syt;
unsigned int data_blocks;
unsigned int data_block_counter;
__be32 *ctx_payload;
struct list_head link;
};
struct amdtp_stream;
typedef void (*amdtp_stream_process_ctx_payloads_t)(struct amdtp_stream *s,
const struct pkt_desc *desc,
unsigned int count,
struct snd_pcm_substream *pcm);
struct amdtp_domain;
struct amdtp_stream {
struct fw_unit *unit;
// The combination of cip_flags enumeration-constants.
unsigned int flags;
enum amdtp_stream_direction direction;
struct mutex mutex;
/* For packet processing. */
struct fw_iso_context *context;
struct iso_packets_buffer buffer;
unsigned int queue_size;
int packet_index;
struct pkt_desc *packet_descs;
struct list_head packet_descs_list;
struct pkt_desc *packet_descs_cursor;
int tag;
union {
struct {
unsigned int ctx_header_size;
// limit for payload of iso packet.
unsigned int max_ctx_payload_length;
// For quirks of CIP headers.
// Fixed interval of dbc between previos/current
// packets.
unsigned int dbc_interval;
// The device starts multiplexing events to the packet.
bool event_starts;
struct {
struct seq_desc *descs;
unsigned int size;
unsigned int pos;
} cache;
} tx;
struct {
// To generate CIP header.
unsigned int fdf;
// To generate constant hardware IRQ.
unsigned int event_count;
// To calculate CIP data blocks and tstamp.
struct {
struct seq_desc *descs;
unsigned int size;
unsigned int pos;
} seq;
unsigned int data_block_state;
unsigned int syt_offset_state;
unsigned int last_syt_offset;
struct amdtp_stream *replay_target;
unsigned int cache_pos;
} rx;
} ctx_data;
/* For CIP headers. */
unsigned int source_node_id_field;
unsigned int data_block_quadlets;
unsigned int data_block_counter;
unsigned int sph;
unsigned int fmt;
// Internal flags.
unsigned int transfer_delay;
enum cip_sfc sfc;
unsigned int syt_interval;
/* For a PCM substream processing. */
struct snd_pcm_substream *pcm;
Annotation
- Immediate include surface: `linux/err.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/sched.h`, `sound/asound.h`, `packets-buffer.h`.
- Detected declarations: `struct fw_unit`, `struct fw_iso_context`, `struct snd_pcm_substream`, `struct snd_pcm_runtime`, `struct pkt_desc`, `struct amdtp_stream`, `struct amdtp_domain`, `struct amdtp_stream`, `struct seq_desc`, `struct amdtp_domain`.
- Atlas domain: Driver Families / sound/firewire.
- 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.