sound/usb/line6/driver.h
Source file repositories/reference/linux-study-clean/sound/usb/line6/driver.h
File Facts
- System
- Linux kernel
- Corpus path
sound/usb/line6/driver.h- Extension
.h- Size
- 5868 bytes
- Lines
- 215
- 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/usb.hlinux/mutex.hlinux/kfifo.hsound/core.hmidi.h
Detected Declarations
struct line6_propertiesstruct usb_line6
Annotated Snippet
struct line6_properties {
/* Card id string (maximum 16 characters).
* This can be used to address the device in ALSA programs as
* "default:CARD=<id>"
*/
const char *id;
/* Card short name (maximum 32 characters) */
const char *name;
/* Bit vector defining this device's capabilities in line6usb driver */
int capabilities;
int altsetting;
unsigned int ctrl_if;
unsigned int ep_ctrl_r;
unsigned int ep_ctrl_w;
unsigned int ep_audio_r;
unsigned int ep_audio_w;
};
/* Capability bits */
enum {
/* device supports settings parameter via USB */
LINE6_CAP_CONTROL = 1 << 0,
/* device supports PCM input/output via USB */
LINE6_CAP_PCM = 1 << 1,
/* device supports hardware monitoring */
LINE6_CAP_HWMON = 1 << 2,
/* device requires output data when input is read */
LINE6_CAP_IN_NEEDS_OUT = 1 << 3,
/* device uses raw MIDI via USB (data endpoints) */
LINE6_CAP_CONTROL_MIDI = 1 << 4,
/* device provides low-level information */
LINE6_CAP_CONTROL_INFO = 1 << 5,
/* device provides hardware monitoring volume control */
LINE6_CAP_HWMON_CTL = 1 << 6,
};
/*
Common data shared by all Line 6 devices.
Corresponds to a pair of USB endpoints.
*/
struct usb_line6 {
/* USB device */
struct usb_device *usbdev;
/* Properties */
const struct line6_properties *properties;
/* Interval for data USB packets */
int interval;
/* ...for isochronous transfers framing */
int intervals_per_second;
/* Number of isochronous URBs used for frame transfers */
int iso_buffers;
/* Maximum size of data USB packet */
int max_packet_size;
/* Device representing the USB interface */
struct device *ifcdev;
/* Line 6 sound card data structure.
* Each device has at least MIDI or PCM.
*/
struct snd_card *card;
/* Line 6 PCM device data structure */
struct snd_line6_pcm *line6pcm;
/* Line 6 MIDI device data structure */
struct snd_line6_midi *line6midi;
/* URB for listening to POD data endpoint */
struct urb *urb_listen;
/* Buffer for incoming data from POD data endpoint */
unsigned char *buffer_listen;
/* Buffer for message to be processed, generated from MIDI layer */
unsigned char *buffer_message;
/* Length of message to be processed, generated from MIDI layer */
int message_length;
/* Circular buffer for non-MIDI control messages */
struct {
Annotation
- Immediate include surface: `linux/usb.h`, `linux/mutex.h`, `linux/kfifo.h`, `sound/core.h`, `midi.h`.
- Detected declarations: `struct line6_properties`, `struct usb_line6`.
- 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.