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.

Dependency Surface

Detected Declarations

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

Implementation Notes