sound/pci/au88x0/au88x0.h

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

File Facts

System
Linux kernel
Corpus path
sound/pci/au88x0/au88x0.h
Extension
.h
Size
8442 bytes
Lines
282
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 pcm_vol {
	struct snd_kcontrol *kctl;
	int active;
	int dma;
	int mixin[4];
	int vol[4];
};

/* Structs */
typedef struct {
	//int this_08;          /* Still unknown */
	int fifo_enabled;	/* this_24 */
	int fifo_status;	/* this_1c */
	u32 dma_ctrl;		/* this_78 (ADB), this_7c (WT) */
	int dma_unknown;	/* this_74 (ADB), this_78 (WT). WDM: +8 */
	int cfg0;
	int cfg1;

	int nr_ch;		/* Nr of PCM channels in use */
	int type;		/* Output type (ac97, a3d, spdif, i2s, dsp) */
	int dma;		/* Hardware DMA index. */
	int dir;		/* Stream Direction. */
	u32 resources[5];

	/* Virtual page extender stuff */
	int nr_periods;
	int period_bytes;
	int period_real;
	int period_virt;

	struct snd_pcm_substream *substream;
} stream_t;

typedef struct snd_vortex vortex_t;
struct snd_vortex {
	/* ALSA structs. */
	struct snd_card *card;
	struct snd_pcm *pcm[VORTEX_PCM_LAST];

	struct snd_rawmidi *rmidi;	/* Legacy Midi interface. */
	struct snd_ac97 *codec;

	/* Stream structs. */
	stream_t dma_adb[NR_ADB];
	int spdif_sr;
#ifndef CHIP_AU8810
	stream_t dma_wt[NR_WT];
	wt_voice_t wt_voice[NR_WT];	/* WT register cache. */
	s8 mixwt[(NR_WT / NR_WTPB) * 6];	/* WT mixin objects */
#endif

	/* Global resources */
	s8 mixcapt[2];
	s8 mixplayb[4];
#ifndef CHIP_AU8820
	s8 mixspdif[2];
	s8 mixa3d[2];	/* mixers which collect all a3d streams. */
	s8 mixxtlk[2];	/* crosstalk canceler mixer inputs. */
#endif
	u32 fixed_res[5];

#ifndef CHIP_AU8820
	/* Hardware equalizer structs */
	eqlzr_t eq;
	/* A3D structs */
	a3dsrc_t a3d[NR_A3D];
	/* Xtalk canceler */
	int xt_mode;		/* 1: speakers, 0:headphones. */
#endif
	struct pcm_vol pcm_vol[NR_PCM];

	int isquad;		/* cache of extended ID codec flag. */

	/* Gameport stuff. */
	struct gameport *gameport;

	/* PCI hardware resources */
	unsigned long io;
	void __iomem *mmio;
	unsigned int irq;
	spinlock_t lock;

	/* PCI device */
	struct pci_dev *pci_dev;
	u16 vendor;
	u16 device;
	u8 rev;
};

/* Functions. */

Annotation

Implementation Notes