drivers/media/test-drivers/vidtv/vidtv_s302m.c
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vidtv/vidtv_s302m.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vidtv/vidtv_s302m.c- Extension
.c- Size
- 15183 bytes
- Lines
- 525
- 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.
- 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/bug.hlinux/crc32.hlinux/fixp-arith.hlinux/jiffies.hlinux/kernel.hlinux/math64.hlinux/printk.hlinux/ratelimit.hlinux/slab.hlinux/string.hlinux/types.hlinux/vmalloc.hvidtv_common.hvidtv_encoder.hvidtv_s302m.h
Detected Declarations
struct tone_durationfunction vidtv_s302m_access_unit_destroyfunction vidtv_s302m_alloc_aufunction vidtv_s302m_compute_sample_count_from_videofunction vidtv_s302m_compute_pts_from_videofunction vidtv_s302m_get_samplefunction vidtv_s302m_write_framefunction vidtv_s302m_write_hfunction vidtv_s302m_write_framesfunction vidtv_s302m_clearfunction vidtv_s302m_encoder_destroy
Annotated Snippet
struct tone_duration {
enum musical_notes note;
int duration;
};
#define COMPASS 100 /* beats per minute */
static const struct tone_duration beethoven_fur_elise[] = {
{ NOTE_SILENT, 512},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_GS_5, 128}, { NOTE_B_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_E_5, 128},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_C_6, 128}, { NOTE_B_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_SILENT, 128},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_GS_5, 128}, { NOTE_B_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_E_5, 128},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_C_6, 128}, { NOTE_B_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_B_4, 128},
{ NOTE_C_5, 128}, { NOTE_D_5, 128}, { NOTE_C_4, 128},
{ NOTE_G_4, 128}, { NOTE_C_5, 128}, { NOTE_G_4, 128},
{ NOTE_F_5, 128}, { NOTE_E_5, 128}, { NOTE_G_3, 128},
{ NOTE_G_4, 128}, { NOTE_B_3, 128}, { NOTE_F_4, 128},
{ NOTE_E_5, 128}, { NOTE_D_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_E_4, 128},
{ NOTE_D_5, 128}, { NOTE_C_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_E_5, 128}, { NOTE_E_5, 128},
{ NOTE_E_6, 128}, { NOTE_E_5, 128}, { NOTE_E_6, 128},
{ NOTE_E_5, 128}, { NOTE_E_5, 128}, { NOTE_DS_5, 128},
{ NOTE_E_5, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_5, 128}, { NOTE_E_5, 128}, { NOTE_DS_6, 128},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_GS_5, 128}, { NOTE_B_5, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_E_5, 128},
{ NOTE_E_6, 128}, { NOTE_DS_6, 128}, { NOTE_E_6, 128},
{ NOTE_DS_6, 128}, { NOTE_E_6, 128}, { NOTE_B_5, 128},
{ NOTE_D_6, 128}, { NOTE_C_6, 128}, { NOTE_A_3, 128},
{ NOTE_E_4, 128}, { NOTE_A_4, 128}, { NOTE_C_5, 128},
{ NOTE_E_5, 128}, { NOTE_A_5, 128}, { NOTE_E_3, 128},
{ NOTE_E_4, 128}, { NOTE_GS_4, 128}, { NOTE_E_5, 128},
{ NOTE_C_6, 128}, { NOTE_B_5, 128}, { NOTE_A_5, 512},
{ NOTE_SILENT, 256},
};
static struct vidtv_access_unit *vidtv_s302m_access_unit_init(struct vidtv_access_unit *head)
{
struct vidtv_access_unit *au;
au = kzalloc_obj(*au);
if (!au)
return NULL;
if (head) {
while (head->next)
head = head->next;
head->next = au;
}
return au;
}
static void vidtv_s302m_access_unit_destroy(struct vidtv_encoder *e)
Annotation
- Immediate include surface: `linux/bug.h`, `linux/crc32.h`, `linux/fixp-arith.h`, `linux/jiffies.h`, `linux/kernel.h`, `linux/math64.h`, `linux/printk.h`, `linux/ratelimit.h`.
- Detected declarations: `struct tone_duration`, `function vidtv_s302m_access_unit_destroy`, `function vidtv_s302m_alloc_au`, `function vidtv_s302m_compute_sample_count_from_video`, `function vidtv_s302m_compute_pts_from_video`, `function vidtv_s302m_get_sample`, `function vidtv_s302m_write_frame`, `function vidtv_s302m_write_h`, `function vidtv_s302m_write_frames`, `function vidtv_s302m_clear`.
- 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.