sound/usb/caiaq/control.c
Source file repositories/reference/linux-study-clean/sound/usb/caiaq/control.c
File Facts
- System
- Linux kernel
- Corpus path
sound/usb/caiaq/control.c- Extension
.c- Size
- 22096 bytes
- Lines
- 664
- Domain
- Driver Families
- Bucket
- sound/usb
- 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/device.hlinux/init.hlinux/usb.hsound/control.hsound/core.hsound/pcm.hdevice.hcontrol.h
Detected Declarations
struct caiaq_controllerfunction Copyrightfunction control_getfunction control_putfunction USB_IDfunction add_controlsfunction snd_usb_caiaq_control_init
Annotated Snippet
struct caiaq_controller {
char *name;
int index;
};
static const struct caiaq_controller ak1_controller[] = {
{ "LED left", 2 },
{ "LED middle", 1 },
{ "LED right", 0 },
{ "LED ring", 3 }
};
static const struct caiaq_controller rk2_controller[] = {
{ "LED 1", 5 },
{ "LED 2", 4 },
{ "LED 3", 3 },
{ "LED 4", 2 },
{ "LED 5", 1 },
{ "LED 6", 0 },
{ "LED pedal", 6 },
{ "LED 7seg_1b", 8 },
{ "LED 7seg_1c", 9 },
{ "LED 7seg_2a", 10 },
{ "LED 7seg_2b", 11 },
{ "LED 7seg_2c", 12 },
{ "LED 7seg_2d", 13 },
{ "LED 7seg_2e", 14 },
{ "LED 7seg_2f", 15 },
{ "LED 7seg_2g", 16 },
{ "LED 7seg_3a", 17 },
{ "LED 7seg_3b", 18 },
{ "LED 7seg_3c", 19 },
{ "LED 7seg_3d", 20 },
{ "LED 7seg_3e", 21 },
{ "LED 7seg_3f", 22 },
{ "LED 7seg_3g", 23 }
};
static const struct caiaq_controller rk3_controller[] = {
{ "LED 7seg_1a", 0 + 0 },
{ "LED 7seg_1b", 0 + 1 },
{ "LED 7seg_1c", 0 + 2 },
{ "LED 7seg_1d", 0 + 3 },
{ "LED 7seg_1e", 0 + 4 },
{ "LED 7seg_1f", 0 + 5 },
{ "LED 7seg_1g", 0 + 6 },
{ "LED 7seg_1p", 0 + 7 },
{ "LED 7seg_2a", 8 + 0 },
{ "LED 7seg_2b", 8 + 1 },
{ "LED 7seg_2c", 8 + 2 },
{ "LED 7seg_2d", 8 + 3 },
{ "LED 7seg_2e", 8 + 4 },
{ "LED 7seg_2f", 8 + 5 },
{ "LED 7seg_2g", 8 + 6 },
{ "LED 7seg_2p", 8 + 7 },
{ "LED 7seg_3a", 16 + 0 },
{ "LED 7seg_3b", 16 + 1 },
{ "LED 7seg_3c", 16 + 2 },
{ "LED 7seg_3d", 16 + 3 },
{ "LED 7seg_3e", 16 + 4 },
{ "LED 7seg_3f", 16 + 5 },
{ "LED 7seg_3g", 16 + 6 },
{ "LED 7seg_3p", 16 + 7 },
{ "LED 7seg_4a", 24 + 0 },
{ "LED 7seg_4b", 24 + 1 },
{ "LED 7seg_4c", 24 + 2 },
{ "LED 7seg_4d", 24 + 3 },
{ "LED 7seg_4e", 24 + 4 },
{ "LED 7seg_4f", 24 + 5 },
{ "LED 7seg_4g", 24 + 6 },
{ "LED 7seg_4p", 24 + 7 },
{ "LED 1", 32 + 0 },
{ "LED 2", 32 + 1 },
{ "LED 3", 32 + 2 },
{ "LED 4", 32 + 3 },
{ "LED 5", 32 + 4 },
{ "LED 6", 32 + 5 },
{ "LED 7", 32 + 6 },
{ "LED 8", 32 + 7 },
{ "LED pedal", 32 + 8 }
};
static const struct caiaq_controller kore_controller[] = {
{ "LED F1", 8 | CNT_INTVAL },
{ "LED F2", 12 | CNT_INTVAL },
{ "LED F3", 0 | CNT_INTVAL },
Annotation
- Immediate include surface: `linux/device.h`, `linux/init.h`, `linux/usb.h`, `sound/control.h`, `sound/core.h`, `sound/pcm.h`, `device.h`, `control.h`.
- Detected declarations: `struct caiaq_controller`, `function Copyright`, `function control_get`, `function control_put`, `function USB_ID`, `function add_controls`, `function snd_usb_caiaq_control_init`.
- Atlas domain: Driver Families / sound/usb.
- 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.