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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sound/pcm.hsound/mpu401.hsound/ac97_codec.hsound/util_mem.h
Detected Declarations
struct snd_tridentstruct snd_trident_voicestruct snd_trident_pcm_mixerstruct snd_trident_portstruct snd_trident_memblk_argstruct snd_trident_tlbstruct snd_trident_voicestruct snd_4dwavestruct snd_trident_pcm_mixerstruct snd_tridentenum global_control_bitsenum miscint_bitsenum trident_nx_ac97_bitsenum trident_dx_ac97_bitsenum sis7018_ac97_bitsenum serial_intf_ctrl_bits
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
- Immediate include surface: `sound/pcm.h`, `sound/mpu401.h`, `sound/ac97_codec.h`, `sound/util_mem.h`.
- Detected declarations: `struct snd_trident`, `struct snd_trident_voice`, `struct snd_trident_pcm_mixer`, `struct snd_trident_port`, `struct snd_trident_memblk_arg`, `struct snd_trident_tlb`, `struct snd_trident_voice`, `struct snd_4dwave`, `struct snd_trident_pcm_mixer`, `struct snd_trident`.
- Atlas domain: Driver Families / sound/pci.
- 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.