sound/usb/quirks-table.h

Source file repositories/reference/linux-study-clean/sound/usb/quirks-table.h

File Facts

System
Linux kernel
Corpus path
sound/usb/quirks-table.h
Extension
.h
Size
94762 bytes
Lines
4028
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

QUIRK_DATA_AUDIOFORMAT(1) {
			.formats = SNDRV_PCM_FMTBIT_S16_LE,
			.channels = 2,
			.iface = 1,
			.altsetting = 1,
			.altset_idx = 1,
			.endpoint = 0x03,
			.ep_attr = USB_ENDPOINT_XFER_ISOC,
			.attributes = 0,
			.rates = SNDRV_PCM_RATE_CONTINUOUS,
			.rate_min = 48000,
			.rate_max = 48000,
		}
	}
},

/* E-Mu 0202 USB */
{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f02) },
/* E-Mu 0404 USB */
{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f04) },
/* E-Mu Tracker Pre */
{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f0a) },
/* E-Mu 0204 USB */
{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f19) },
/* Ktmicro Usb_audio device */
{ USB_DEVICE_VENDOR_SPEC(0x31b2, 0x0011) },

/*
 * Creative Technology, Ltd Live! Cam Sync HD [VF0770]
 * The device advertises 8 formats, but only a rate of 48kHz is honored by the
 * hardware and 24 bits give chopped audio, so only report the one working
 * combination.
 */
{
	USB_AUDIO_DEVICE(0x041e, 0x4095),
	QUIRK_DRIVER_INFO {
		QUIRK_DATA_COMPOSITE {
			{ QUIRK_DATA_STANDARD_MIXER(2) },
			{
				QUIRK_DATA_AUDIOFORMAT(3) {
					.formats = SNDRV_PCM_FMTBIT_S16_LE,
					.channels = 2,
					.fmt_bits = 16,
					.iface = 3,
					.altsetting = 4,
					.altset_idx = 4,
					.endpoint = 0x82,
					.ep_attr = 0x05,
					.rates = SNDRV_PCM_RATE_48000,
					.rate_min = 48000,
					.rate_max = 48000,
					.nr_rates = 1,
					.rate_table = (unsigned int[]) { 48000 },
				},
			},
			QUIRK_COMPOSITE_END
		},
	},
},

/*
 * HP Wireless Audio
 * When not ignored, causes instability issues for some users, forcing them to
 * skip the entire module.
 */
{
	USB_DEVICE(0x0424, 0xb832),
	QUIRK_DRIVER_INFO {
		.vendor_name = "Standard Microsystems Corp.",
		.product_name = "HP Wireless Audio",
		QUIRK_DATA_COMPOSITE {
			/* Mixer */
			{ QUIRK_DATA_IGNORE(0) },
			/* Playback */
			{ QUIRK_DATA_IGNORE(1) },
			/* Capture */
			{ QUIRK_DATA_IGNORE(2) },
			/* HID Device, .ifnum = 3 */
			QUIRK_COMPOSITE_END
		}
	}
},

/*
 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
 * class matches do not take effect without an explicit ID match.
 */
{ USB_AUDIO_DEVICE(0x046d, 0x0850) },
{ USB_AUDIO_DEVICE(0x046d, 0x08ae) },
{ USB_AUDIO_DEVICE(0x046d, 0x08c6) },

Annotation

Implementation Notes