⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trident.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
	   SECONDARY_ID= 0x00004000, */	SECONDARY_ID	= 0x00004000,	PCMOUT		= 0x00010000,	SURROUT		= 0x00020000,	CENTEROUT	= 0x00040000,	LFEOUT		= 0x00080000,	LINE1OUT	= 0x00100000,	LINE2OUT	= 0x00200000,	GPIOOUT		= 0x00400000,	SI_AC97_PRIMARY_READY = 0x01000000,	SI_AC97_SECONDARY_READY = 0x02000000,	SI_AC97_POWERDOWN = 0x04000000,};                                                                                                                                   /* PCM defaults */#define T4D_DEFAULT_PCM_VOL	10	/* 0 - 255 */#define T4D_DEFAULT_PCM_PAN	0	/* 0 - 127 */#define T4D_DEFAULT_PCM_RVOL	127	/* 0 - 127 */#define T4D_DEFAULT_PCM_CVOL	127	/* 0 - 127 */struct snd_trident;struct snd_trident_voice;struct snd_trident_pcm_mixer;struct snd_trident_sample_ops {	void (*sample_start)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_position_t position);	void (*sample_stop)(struct snd_trident *gus, struct snd_trident_voice *voice, int mode);	void (*sample_freq)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_frequency_t freq);	void (*sample_volume)(struct snd_trident *gus, struct snd_trident_voice *voice, struct snd_seq_ev_volume *volume);	void (*sample_loop)(struct snd_trident *card, struct snd_trident_voice *voice, struct snd_seq_ev_loop *loop);	void (*sample_pos)(struct snd_trident *card, struct snd_trident_voice *voice, snd_seq_position_t position);	void (*sample_private1)(struct snd_trident *card, struct snd_trident_voice *voice, unsigned char *data);};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 {	unsigned int * entries;		/* 16k-aligned TLB table */	dma_addr_t entries_dmaaddr;	/* 16k-aligned PCI address to TLB table */	unsigned long * shadow_entries;	/* shadow entries with virtual addresses */	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_seq_instr instr;	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_simple_ops simple_ops;	struct snd_seq_kinstr_list *ilist;	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 */};struct snd_trident_pcm_mixer {	struct snd_trident_voice *voice;	/* active voice */	unsigned short vol;		/* front volume */	unsigned char pan;		/* pan control */	unsigned char rvol;		/* rear volume */	unsigned char cvol;		/* center volume */	unsigned char pad;};struct snd_trident {	int irq;	unsigned int device;	/* device ID */        unsigned char  bDMAStart;	unsigned long port;	unsigned long midi_port;	unsigned int spurious_irq_count;	unsigned int spurious_irq_max_delta;        struct snd_trident_tlb tlb;	/* TLB entries for NX cards */	unsigned char spdif_ctrl;	unsigned char spdif_pcm_ctrl;	unsigned int spdif_bits;	unsigned int spdif_pcm_bits;	struct snd_kcontrol *spdif_pcm_ctl;	/* S/PDIF settings */	unsigned int ac97_ctrl;                unsigned int ChanMap[2];	/* allocation map for hardware channels */                int ChanPCM;			/* max number of PCM channels */	int ChanPCMcnt;			/* actual number of PCM channels */	unsigned int ac97_detect: 1;	/* 1 = AC97 in detection phase */	unsigned int in_suspend: 1;	/* 1 during suspend/resume */	struct snd_4dwave synth;	/* synth specific variables */	spinlock_t event_lock;	spinlock_t voice_alloc;	struct snd_dma_device dma_dev;	struct pci_dev *pci;	struct snd_card *card;	struct snd_pcm *pcm;		/* ADC/DAC PCM */	struct snd_pcm *foldback;	/* Foldback PCM */	struct snd_pcm *spdif;	/* SPDIF PCM */	struct snd_rawmidi *rmidi;	struct snd_seq_device *seq_dev;	struct snd_ac97_bus *ac97_bus;	struct snd_ac97 *ac97;	struct snd_ac97 *ac97_sec;	unsigned int musicvol_wavevol;	struct snd_trident_pcm_mixer pcm_mixer[32];	struct snd_kcontrol *ctl_vol;	/* front volume */	struct snd_kcontrol *ctl_pan;	/* pan */	struct snd_kcontrol *ctl_rvol;	/* rear volume */	struct snd_kcontrol *ctl_cvol;	/* center volume */	spinlock_t reg_lock;	struct gameport *gameport;};int snd_trident_create(struct snd_card *card,		       struct pci_dev *pci,		       int pcm_streams,		       int pcm_spdif_device,		       int max_wavetable_size,		       struct snd_trident ** rtrident);int snd_trident_create_gameport(struct snd_trident *trident);int snd_trident_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);int snd_trident_foldback_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);int snd_trident_spdif_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);int snd_trident_attach_synthesizer(struct snd_trident * trident);struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, int type,					     int client, int port);void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice);void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice);void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice);void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice);int snd_trident_suspend(struct pci_dev *pci, pm_message_t state);int snd_trident_resume(struct pci_dev *pci);/* TLB memory allocation */struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident,						struct snd_pcm_substream *substream);int snd_trident_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk);struct snd_util_memblk *snd_trident_synth_alloc(struct snd_trident *trident, unsigned int size);int snd_trident_synth_free(struct snd_trident *trident, struct snd_util_memblk *blk);int snd_trident_synth_copy_from_user(struct snd_trident *trident, struct snd_util_memblk *blk,				     int offset, const char __user *data, int size);#endif /* __SOUND_TRIDENT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -