sound/usb/usx2y/usbus428ctldefs.h

Source file repositories/reference/linux-study-clean/sound/usb/usx2y/usbus428ctldefs.h

File Facts

System
Linux kernel
Corpus path
sound/usb/usx2y/usbus428ctldefs.h
Extension
.h
Size
1569 bytes
Lines
94
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct us428_ctls {
	unsigned char	fader[9];
	unsigned char	transport;
	unsigned char	modifier;
	unsigned char	filters_elect;
	unsigned char	select;
	unsigned char	mute;
	unsigned char	unknown;
	unsigned char	wswitch;
	unsigned char	wheel[5];
};

struct us428_set_byte {
	unsigned char offset,
		value;
};

enum {
	ELT_VOLUME = 0,
	ELT_LIGHT
};

struct usx2y_volume {
	unsigned char channel,
		lh,
		ll,
		rh,
		rl;
};

struct us428_lights {
	struct us428_set_byte light[7];
};

struct us428_p4out {
	char type;
	union {
		struct usx2y_volume vol;
		struct us428_lights lights;
	} val;
};

#define N_US428_CTL_BUFS 16
#define N_US428_P4OUT_BUFS 16
struct us428ctls_sharedmem {
	struct us428_ctls	ctl_snapshot[N_US428_CTL_BUFS];
	int			ctl_snapshot_differs_at[N_US428_CTL_BUFS];
	int			ctl_snapshot_last, ctl_snapshot_red;
	struct us428_p4out	p4out[N_US428_P4OUT_BUFS];
	int			p4out_last, p4out_sent;
};

#define US428_SHAREDMEM_PAGES	PAGE_ALIGN(sizeof(struct us428ctls_sharedmem))

Annotation

Implementation Notes