drivers/usb/gadget/function/u_uac1_legacy.h
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/function/u_uac1_legacy.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/function/u_uac1_legacy.h- Extension
.h- Size
- 1870 bytes
- Lines
- 80
- Domain
- Driver Families
- Bucket
- drivers/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/err.hlinux/usb/audio.hlinux/usb/composite.hsound/core.hsound/pcm.hsound/pcm_params.h
Detected Declarations
struct gaudio_snd_devstruct gaudiostruct f_uac1_legacy_opts
Annotated Snippet
struct gaudio_snd_dev {
struct gaudio *card;
struct file *filp;
struct snd_pcm_substream *substream;
int access;
int format;
int channels;
int rate;
};
struct gaudio {
struct usb_function func;
struct usb_gadget *gadget;
/* ALSA sound device interfaces */
struct gaudio_snd_dev control;
struct gaudio_snd_dev playback;
struct gaudio_snd_dev capture;
/* TODO */
};
struct f_uac1_legacy_opts {
struct usb_function_instance func_inst;
int req_buf_size;
int req_count;
int audio_buf_size;
char *fn_play;
char *fn_cap;
char *fn_cntl;
unsigned bound:1;
unsigned fn_play_alloc:1;
unsigned fn_cap_alloc:1;
unsigned fn_cntl_alloc:1;
struct mutex lock;
int refcnt;
};
int gaudio_setup(struct gaudio *card);
void gaudio_cleanup(struct gaudio *the_card);
size_t u_audio_playback(struct gaudio *card, void *buf, size_t count);
int u_audio_get_playback_channels(struct gaudio *card);
int u_audio_get_playback_rate(struct gaudio *card);
#endif /* __U_UAC1_LEGACY_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/usb/audio.h`, `linux/usb/composite.h`, `sound/core.h`, `sound/pcm.h`, `sound/pcm_params.h`.
- Detected declarations: `struct gaudio_snd_dev`, `struct gaudio`, `struct f_uac1_legacy_opts`.
- Atlas domain: Driver Families / drivers/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.