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.

Dependency Surface

Detected Declarations

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

Implementation Notes