sound/pci/cs46xx/cs46xx.h

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

File Facts

System
Linux kernel
Corpus path
sound/pci/cs46xx/cs46xx.h
Extension
.h
Size
72879 bytes
Lines
1733
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_cs46xx_pcm {
	struct snd_dma_buffer hw_buf;
  
	unsigned int ctl;
	unsigned int shift;	/* Shift count to trasform frames in bytes */
	struct snd_pcm_indirect pcm_rec;
	struct snd_pcm_substream *substream;

	struct dsp_pcm_channel_descriptor * pcm_channel;

	int pcm_channel_id;    /* Fron Rear, Center Lfe  ... */
};

struct snd_cs46xx_region {
	char name[24];
	unsigned long base;
	void __iomem *remap_addr;
	unsigned long size;
};

struct snd_cs46xx {
	int irq;
	unsigned long ba0_addr;
	unsigned long ba1_addr;
	union {
		struct {
			struct snd_cs46xx_region ba0;
			struct snd_cs46xx_region data0;
			struct snd_cs46xx_region data1;
			struct snd_cs46xx_region pmem;
			struct snd_cs46xx_region reg;
		} name;
		struct snd_cs46xx_region idx[5];
	} region;

	unsigned int mode;
	
	struct {
		struct snd_dma_buffer hw_buf;

		unsigned int ctl;
		unsigned int shift;	/* Shift count to trasform frames in bytes */
		struct snd_pcm_indirect pcm_rec;
		struct snd_pcm_substream *substream;
	} capt;


	int nr_ac97_codecs;
	struct snd_ac97_bus *ac97_bus;
	struct snd_ac97 *ac97[MAX_NR_AC97];

	struct pci_dev *pci;
	struct snd_card *card;
	struct snd_pcm *pcm;

	struct snd_rawmidi *rmidi;
	struct snd_rawmidi_substream *midi_input;
	struct snd_rawmidi_substream *midi_output;

	spinlock_t reg_lock;
	unsigned int midcr;
	unsigned int uartm;

	int amplifier;
	void (*amplifier_ctrl)(struct snd_cs46xx *, int);
	void (*active_ctrl)(struct snd_cs46xx *, int);
  	void (*mixer_init)(struct snd_cs46xx *);

	int acpi_port;
	struct snd_kcontrol *eapd_switch; /* for amplifier hack */
	int accept_valid;	/* accept mmap valid (for OSS) */
	int in_suspend;

	struct gameport *gameport;

#ifdef CONFIG_SND_CS46XX_NEW_DSP
	struct mutex spos_mutex;

	struct dsp_spos_instance * dsp_spos_instance;

	struct snd_pcm *pcm_rear;
	struct snd_pcm *pcm_center_lfe;
	struct snd_pcm *pcm_iec958;

#define CS46XX_DSP_MODULES	5
	struct dsp_module_desc *modules[CS46XX_DSP_MODULES];
#else /* for compatibility */
	struct snd_cs46xx_pcm *playback_pcm;
	unsigned int play_ctl;

Annotation

Implementation Notes