drivers/media/v4l2-core/v4l2-ctrls-defs.c
Source file repositories/reference/linux-study-clean/drivers/media/v4l2-core/v4l2-ctrls-defs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/v4l2-core/v4l2-ctrls-defs.c- Extension
.c- Size
- 60052 bytes
- Lines
- 1701
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/export.hmedia/v4l2-ctrls.h
Detected Declarations
function Copyrightfunction v4l2_ctrl_fillexport v4l2_ctrl_get_menuexport v4l2_ctrl_get_int_menuexport v4l2_ctrl_get_nameexport v4l2_ctrl_fill
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* V4L2 controls framework control definitions.
*
* Copyright (C) 2010-2021 Hans Verkuil <hverkuil@kernel.org>
*/
#include <linux/export.h>
#include <media/v4l2-ctrls.h>
/*
* Returns NULL or a character pointer array containing the menu for
* the given control ID. The pointer array ends with a NULL pointer.
* An empty string signifies a menu entry that is invalid. This allows
* drivers to disable certain options if it is not supported.
*/
const char * const *v4l2_ctrl_get_menu(u32 id)
{
static const char * const mpeg_audio_sampling_freq[] = {
"44.1 kHz",
"48 kHz",
"32 kHz",
NULL
};
static const char * const mpeg_audio_encoding[] = {
"MPEG-1/2 Layer I",
"MPEG-1/2 Layer II",
"MPEG-1/2 Layer III",
"MPEG-2/4 AAC",
"AC-3",
NULL
};
static const char * const mpeg_audio_l1_bitrate[] = {
"32 kbps",
"64 kbps",
"96 kbps",
"128 kbps",
"160 kbps",
"192 kbps",
"224 kbps",
"256 kbps",
"288 kbps",
"320 kbps",
"352 kbps",
"384 kbps",
"416 kbps",
"448 kbps",
NULL
};
static const char * const mpeg_audio_l2_bitrate[] = {
"32 kbps",
"48 kbps",
"56 kbps",
"64 kbps",
"80 kbps",
"96 kbps",
"112 kbps",
"128 kbps",
"160 kbps",
"192 kbps",
"224 kbps",
"256 kbps",
"320 kbps",
"384 kbps",
NULL
};
static const char * const mpeg_audio_l3_bitrate[] = {
"32 kbps",
"40 kbps",
"48 kbps",
"56 kbps",
"64 kbps",
"80 kbps",
"96 kbps",
"112 kbps",
"128 kbps",
"160 kbps",
"192 kbps",
"224 kbps",
"256 kbps",
"320 kbps",
NULL
};
static const char * const mpeg_audio_ac3_bitrate[] = {
"32 kbps",
"40 kbps",
"48 kbps",
"56 kbps",
"64 kbps",
"80 kbps",
Annotation
- Immediate include surface: `linux/export.h`, `media/v4l2-ctrls.h`.
- Detected declarations: `function Copyright`, `function v4l2_ctrl_fill`, `export v4l2_ctrl_get_menu`, `export v4l2_ctrl_get_int_menu`, `export v4l2_ctrl_get_name`, `export v4l2_ctrl_fill`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration 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.