sound/pci/ymfpci/ymfpci.h
Source file repositories/reference/linux-study-clean/sound/pci/ymfpci/ymfpci.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ymfpci/ymfpci.h- Extension
.h- Size
- 11749 bytes
- Lines
- 411
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sound/pcm.hsound/rawmidi.hsound/ac97_codec.hsound/timer.hlinux/gameport.h
Detected Declarations
struct snd_ymfpci_playback_bankstruct snd_ymfpci_capture_bankstruct snd_ymfpci_effect_bankstruct snd_ymfpci_pcmstruct snd_ymfpcistruct snd_ymfpci_voicestruct snd_ymfpci_pcmstruct snd_ymfpcistruct snd_ymfpci_pcm_mixerenum snd_ymfpci_voice_typeenum snd_ymfpci_pcm_type
Annotated Snippet
struct snd_ymfpci_playback_bank {
__le32 format;
__le32 loop_default;
__le32 base; /* 32-bit address */
__le32 loop_start; /* 32-bit offset */
__le32 loop_end; /* 32-bit offset */
__le32 loop_frac; /* 8-bit fraction - loop_start */
__le32 delta_end; /* pitch delta end */
__le32 lpfK_end;
__le32 eg_gain_end;
__le32 left_gain_end;
__le32 right_gain_end;
__le32 eff1_gain_end;
__le32 eff2_gain_end;
__le32 eff3_gain_end;
__le32 lpfQ;
__le32 status;
__le32 num_of_frames;
__le32 loop_count;
__le32 start;
__le32 start_frac;
__le32 delta;
__le32 lpfK;
__le32 eg_gain;
__le32 left_gain;
__le32 right_gain;
__le32 eff1_gain;
__le32 eff2_gain;
__le32 eff3_gain;
__le32 lpfD1;
__le32 lpfD2;
};
struct snd_ymfpci_capture_bank {
__le32 base; /* 32-bit address */
__le32 loop_end; /* 32-bit offset */
__le32 start; /* 32-bit offset */
__le32 num_of_loops; /* counter */
};
struct snd_ymfpci_effect_bank {
__le32 base; /* 32-bit address */
__le32 loop_end; /* 32-bit offset */
__le32 start; /* 32-bit offset */
__le32 temp;
};
struct snd_ymfpci_pcm;
struct snd_ymfpci;
enum snd_ymfpci_voice_type {
YMFPCI_PCM,
YMFPCI_SYNTH,
YMFPCI_MIDI
};
struct snd_ymfpci_voice {
struct snd_ymfpci *chip;
int number;
unsigned int use: 1,
pcm: 1,
synth: 1,
midi: 1;
struct snd_ymfpci_playback_bank *bank;
dma_addr_t bank_addr;
void (*interrupt)(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice);
struct snd_ymfpci_pcm *ypcm;
};
enum snd_ymfpci_pcm_type {
PLAYBACK_VOICE,
CAPTURE_REC,
CAPTURE_AC97,
EFFECT_DRY_LEFT,
EFFECT_DRY_RIGHT,
EFFECT_EFF1,
EFFECT_EFF2,
EFFECT_EFF3
};
struct snd_ymfpci_pcm {
struct snd_ymfpci *chip;
enum snd_ymfpci_pcm_type type;
struct snd_pcm_substream *substream;
struct snd_ymfpci_voice *voices[2]; /* playback only */
unsigned int running: 1,
use_441_slot: 1,
output_front: 1,
output_rear: 1,
swap_rear: 1;
Annotation
- Immediate include surface: `sound/pcm.h`, `sound/rawmidi.h`, `sound/ac97_codec.h`, `sound/timer.h`, `linux/gameport.h`.
- Detected declarations: `struct snd_ymfpci_playback_bank`, `struct snd_ymfpci_capture_bank`, `struct snd_ymfpci_effect_bank`, `struct snd_ymfpci_pcm`, `struct snd_ymfpci`, `struct snd_ymfpci_voice`, `struct snd_ymfpci_pcm`, `struct snd_ymfpci`, `struct snd_ymfpci_pcm_mixer`, `enum snd_ymfpci_voice_type`.
- Atlas domain: Driver Families / sound/pci.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.