sound/pci/trident/trident.h

Source file repositories/reference/linux-study-clean/sound/pci/trident/trident.h

File Facts

System
Linux kernel
Corpus path
sound/pci/trident/trident.h
Extension
.h
Size
12943 bytes
Lines
423
Domain
Driver Families
Bucket
sound/pci
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 snd_trident_port {
	struct snd_midi_channel_set * chset;
	struct snd_trident * trident;
	int mode;		/* operation mode */
	int client;		/* sequencer client number */
	int port;		/* sequencer port number */
	unsigned int midi_has_voices: 1;
};

struct snd_trident_memblk_arg {
	short first_page, last_page;
};

struct snd_trident_tlb {
	__le32 *entries;		/* 16k-aligned TLB table */
	dma_addr_t entries_dmaaddr;	/* 16k-aligned PCI address to TLB table */
	struct snd_dma_buffer *buffer;
	struct snd_util_memhdr * memhdr;	/* page allocation list */
	struct snd_dma_buffer *silent_page;
};

struct snd_trident_voice {
	unsigned int number;
	unsigned int use: 1,
	    pcm: 1,
	    synth:1,
	    midi: 1;
	unsigned int flags;
	unsigned char client;
	unsigned char port;
	unsigned char index;

	struct snd_trident_sample_ops *sample_ops;

	/* channel parameters */
	unsigned int CSO;		/* 24 bits (16 on DX) */
	unsigned int ESO;		/* 24 bits (16 on DX) */
	unsigned int LBA;		/* 30 bits */
	unsigned short EC;		/* 12 bits */
	unsigned short Alpha;		/* 12 bits */
	unsigned short Delta;		/* 16 bits */
	unsigned short Attribute;	/* 16 bits - SiS 7018 */
	unsigned short Vol;		/* 12 bits (6.6) */
	unsigned char Pan;		/* 7 bits (1.4.2) */
	unsigned char GVSel;		/* 1 bit */
	unsigned char RVol;		/* 7 bits (5.2) */
	unsigned char CVol;		/* 7 bits (5.2) */
	unsigned char FMC;		/* 2 bits */
	unsigned char CTRL;		/* 4 bits */
	unsigned char FMS;		/* 4 bits */
	unsigned char LFO;		/* 8 bits */

	unsigned int negCSO;	/* nonzero - use negative CSO */

	struct snd_util_memblk *memblk;	/* memory block if TLB enabled */

	/* PCM data */

	struct snd_trident *trident;
	struct snd_pcm_substream *substream;
	struct snd_trident_voice *extra;	/* extra PCM voice (acts as interrupt generator) */
	unsigned int running: 1,
            capture: 1,
            spdif: 1,
            foldback: 1,
            isync: 1,
            isync2: 1,
            isync3: 1;
	int foldback_chan;		/* foldback subdevice number */
	unsigned int stimer;		/* global sample timer (to detect spurious interrupts) */
	unsigned int spurious_threshold; /* spurious threshold */
	unsigned int isync_mark;
	unsigned int isync_max;
	unsigned int isync_ESO;

	/* --- */

	void *private_data;
	void (*private_free)(struct snd_trident_voice *voice);
};

struct snd_4dwave {
	int seq_client;

	struct snd_trident_port seq_ports[4];
	struct snd_trident_voice voices[64];	

	int ChanSynthCount;		/* number of allocated synth channels */
	int max_size;			/* maximum synth memory size in bytes */
	int current_size;		/* current allocated synth mem in bytes */

Annotation

Implementation Notes