sound/usb/mixer_maps.c
Source file repositories/reference/linux-study-clean/sound/usb/mixer_maps.c
File Facts
- System
- Linux kernel
- Corpus path
sound/usb/mixer_maps.c- Extension
.c- Size
- 22581 bytes
- Lines
- 775
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct usbmix_dB_mapstruct usbmix_name_mapstruct usbmix_selector_mapstruct usbmix_ctl_map
Annotated Snippet
struct usbmix_dB_map {
int min;
int max;
bool min_mute;
};
struct usbmix_name_map {
int id;
const char *name;
int control;
const struct usbmix_dB_map *dB;
};
struct usbmix_selector_map {
int id;
int count;
const char **names;
};
struct usbmix_ctl_map {
u32 id;
const struct usbmix_name_map *map;
const struct usbmix_selector_map *selector_map;
const struct usbmix_connector_map *connector_map;
};
/*
* USB control mappers for SB Exitigy
*/
/*
* Topology of SB Extigy (see on the wide screen :)
USB_IN[1] --->FU[2]------------------------------+->MU[16]-->PU[17]-+->FU[18]--+->EU[27]--+->EU[21]-->FU[22]--+->FU[23] > Dig_OUT[24]
^ | | | |
USB_IN[3] -+->SU[5]-->FU[6]--+->MU[14] ->PU[15]->+ | | | +->FU[25] > Dig_OUT[26]
^ ^ | | | |
Dig_IN[4] -+ | | | | +->FU[28]---------------------> Spk_OUT[19]
| | | |
Lin-IN[7] -+-->FU[8]---------+ | | +----------------------------------------> Hph_OUT[20]
| | |
Mic-IN[9] --+->FU[10]----------------------------+ |
|| |
|| +----------------------------------------------------+
VV V
++--+->SU[11]-->FU[12] --------------------------------------------------------------------------------------> USB_OUT[13]
*/
static const struct usbmix_name_map extigy_map[] = {
/* 1: IT pcm */
{ 2, "PCM Playback" }, /* FU */
/* 3: IT pcm */
/* 4: IT digital in */
{ 5, NULL }, /* DISABLED: this seems to be bogus on some firmware */
{ 6, "Digital In" }, /* FU */
/* 7: IT line */
{ 8, "Line Playback" }, /* FU */
/* 9: IT mic */
{ 10, "Mic Playback" }, /* FU */
{ 11, "Capture Source" }, /* SU */
{ 12, "Capture" }, /* FU */
/* 13: OT pcm capture */
/* 14: MU (w/o controls) */
/* 15: PU (3D enh) */
/* 16: MU (w/o controls) */
{ 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */
{ 17, "Channel Routing", 2 }, /* PU: mode select */
{ 18, "Tone Control - Bass", UAC_FU_BASS }, /* FU */
{ 18, "Tone Control - Treble", UAC_FU_TREBLE }, /* FU */
{ 18, "Master Playback" }, /* FU; others */
/* 19: OT speaker */
/* 20: OT headphone */
{ 21, NULL }, /* DISABLED: EU (for what?) */
{ 22, "Digital Out Playback" }, /* FU */
{ 23, "Digital Out1 Playback" }, /* FU */ /* FIXME: corresponds to 24 */
/* 24: OT digital out */
{ 25, "IEC958 Optical Playback" }, /* FU */
{ 26, "IEC958 Optical Playback" }, /* OT */
{ 27, NULL }, /* DISABLED: EU (for what?) */
/* 28: FU speaker (mute) */
{ 29, NULL }, /* Digital Input Playback Source? */
{ 0 } /* terminator */
};
/* Sound Blaster MP3+ controls mapping
* The default mixer channels have totally misleading names,
* e.g. no Master and fake PCM volume
* Pavel Mihaylov <bin@bash.info>
*/
static const struct usbmix_dB_map mp3plus_dB_1 = {.min = -4781, .max = 0};
Annotation
- Detected declarations: `struct usbmix_dB_map`, `struct usbmix_name_map`, `struct usbmix_selector_map`, `struct usbmix_ctl_map`.
- Atlas domain: Driver Families / sound/usb.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.