drivers/media/test-drivers/vidtv/vidtv_s302m.h
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vidtv/vidtv_s302m.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vidtv/vidtv_s302m.h- Extension
.h- Size
- 2648 bytes
- Lines
- 98
- Domain
- Driver Families
- Bucket
- drivers/media
- 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/types.hvidtv_encoder.h
Detected Declarations
struct vidtv_s302m_ctxstruct vidtv_smpte_s302m_esstruct vidtv_s302m_frame_16struct vidtv_s302m_encoder_init_args
Annotated Snippet
struct vidtv_s302m_ctx {
struct vidtv_encoder *enc;
u32 frame_index;
u32 au_count;
int last_duration;
unsigned int note_offset;
enum musical_notes last_tone;
};
/*
* struct vidtv_smpte_s302m_es - s302m MPEG Elementary Stream header.
*
* See SMPTE 302M 2007 table 1.
*/
struct vidtv_smpte_s302m_es {
/*
*
* audio_packet_size:16;
* num_channels:2;
* channel_identification:8;
* bits_per_sample:2; // 0x0 for 16bits
* zero:4;
*/
__be32 bitfield;
} __packed;
struct vidtv_s302m_frame_16 {
u8 data[5];
} __packed;
/**
* struct vidtv_s302m_encoder_init_args - Args for the s302m encoder.
*
* @name: A name to identify this particular instance
* @src_buf: The source buffer, encoder will default to a sine wave if this is NULL.
* @src_buf_sz: The size of the source buffer.
* @es_pid: The MPEG Elementary Stream PID to use.
* @sync: Attempt to synchronize audio with this video encoder, if not NULL.
* @last_sample_cb: A callback called when the encoder runs out of data.
* @head: Add to this chain
*/
struct vidtv_s302m_encoder_init_args {
char *name;
void *src_buf;
u32 src_buf_sz;
u16 es_pid;
struct vidtv_encoder *sync;
void (*last_sample_cb)(u32 sample_no);
struct vidtv_encoder *head;
};
struct vidtv_encoder
*vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args);
void vidtv_s302m_encoder_destroy(struct vidtv_encoder *encoder);
#endif /* VIDTV_S302M_H */
Annotation
- Immediate include surface: `linux/types.h`, `vidtv_encoder.h`.
- Detected declarations: `struct vidtv_s302m_ctx`, `struct vidtv_smpte_s302m_es`, `struct vidtv_s302m_frame_16`, `struct vidtv_s302m_encoder_init_args`.
- Atlas domain: Driver Families / drivers/media.
- 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.