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

📄 emu10k1_main.c

📁 linux 内核源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
static int alloc_pm_buffer(struct snd_emu10k1 *emu);static void free_pm_buffer(struct snd_emu10k1 *emu);#endifstatic int snd_emu10k1_free(struct snd_emu10k1 *emu){	if (emu->port) {	/* avoid access to already used hardware */	       	snd_emu10k1_fx8010_tram_setup(emu, 0);		snd_emu10k1_done(emu);		/* remove reserved page */		if (emu->reserved_page) {			snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page);			emu->reserved_page = NULL;		}		snd_emu10k1_free_efx(emu);       	}	if (emu->card_capabilities->emu1010) {		/* Disable 48Volt power to Audio Dock */		snd_emu1010_fpga_write(emu,  EMU_HANA_DOCK_PWR,  0 );		kthread_stop(emu->emu1010.firmware_thread);	}	if (emu->memhdr)		snd_util_memhdr_free(emu->memhdr);	if (emu->silent_page.area)		snd_dma_free_pages(&emu->silent_page);	if (emu->ptb_pages.area)		snd_dma_free_pages(&emu->ptb_pages);	vfree(emu->page_ptr_table);	vfree(emu->page_addr_table);#ifdef CONFIG_PM	free_pm_buffer(emu);#endif	if (emu->irq >= 0)		free_irq(emu->irq, emu);	if (emu->port)		pci_release_regions(emu->pci);	if (emu->card_capabilities->ca0151_chip) /* P16V */			snd_p16v_free(emu);	pci_disable_device(emu->pci);	kfree(emu);	return 0;}static int snd_emu10k1_dev_free(struct snd_device *device){	struct snd_emu10k1 *emu = device->device_data;	return snd_emu10k1_free(emu);}static struct snd_emu_chip_details emu_chip_details[] = {	/* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/	/* Tested by James@superbug.co.uk 3rd July 2005 */	/* DSP: CA0108-IAT	 * DAC: CS4382-KQ	 * ADC: Philips 1361T	 * AC97: STAC9750	 * CA0151: None	 */	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,	 .driver = "Audigy2", .name = "Audigy 2 Value [SB0400]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .spk71 = 1,	 .ac97_chip = 1} ,	/* Audigy4 (Not PRO) SB0610 */	/* Tested by James@superbug.co.uk 4th April 2006 */	/* A_IOCFG bits	 * Output	 * 0: ?	 * 1: ?	 * 2: ?	 * 3: 0 - Digital Out, 1 - Line in	 * 4: ?	 * 5: ?	 * 6: ?	 * 7: ?	 * Input	 * 8: ?	 * 9: ?	 * A: Green jack sense (Front)	 * B: ?	 * C: Black jack sense (Rear/Side Right)	 * D: Yellow jack sense (Center/LFE/Side Left)	 * E: ?	 * F: ?	 *	 * Digital Out/Line in switch using A_IOCFG bit 3 (0x08)	 * 0 - Digital Out	 * 1 - Line in	 */	/* Mic input not tested.	 * Analog CD input not tested	 * Digital Out not tested.	 * Line in working.	 * Audio output 5.1 working. Side outputs not working.	 */	/* DSP: CA10300-IAT LF	 * DAC: Cirrus Logic CS4382-KQZ	 * ADC: Philips 1361T	 * AC97: Sigmatel STAC9750	 * CA0151: None	 */	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102,	 .driver = "Audigy2", .name = "Audigy 4 [SB0610]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .spk71 = 1,	 .adc_1361t = 1,  /* 24 bit capture instead of 16bit */	 .ac97_chip = 1} ,	/* Audigy 2 ZS Notebook Cardbus card.*/	/* Tested by James@superbug.co.uk 6th November 2006 */	/* Audio output 7.1/Headphones working.	 * Digital output working. (AC3 not checked, only PCM)	 * Audio Mic/Line inputs working.	 * Digital input not tested.	 */ 	/* DSP: Tina2	 * DAC: Wolfson WM8768/WM8568	 * ADC: Wolfson WM8775	 * AC97: None	 * CA0151: None	 */	/* Tested by James@superbug.co.uk 4th April 2006 */	/* A_IOCFG bits	 * Output	 * 0: Not Used	 * 1: 0 = Mute all the 7.1 channel out. 1 = unmute.	 * 2: Analog input 0 = line in, 1 = mic in	 * 3: Not Used	 * 4: Digital output 0 = off, 1 = on.	 * 5: Not Used	 * 6: Not Used	 * 7: Not Used	 * Input	 *      All bits 1 (0x3fxx) means nothing plugged in.	 * 8-9: 0 = Line in/Mic, 2 = Optical in, 3 = Nothing.	 * A-B: 0 = Headphones, 2 = Optical out, 3 = Nothing.	 * C-D: 2 = Front/Rear/etc, 3 = nothing.	 * E-F: Always 0	 *	 */	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102,	 .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .ca_cardbus_chip = 1,	 .spi_dac = 1,	 .i2c_adc = 1,	 .spk71 = 1} ,	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102,	 .driver = "Audigy2", .name = "E-mu 1010 Notebook [MAEM8950]", 	 .id = "EMU1010",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .ca_cardbus_chip = 1,	 .spk71 = 1 ,	 .emu1010 = 3} ,	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102,	 .driver = "Audigy2", .name = "E-mu 1010b PCI [MAEM????]", 	 .id = "EMU1010",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .spk71 = 1 ,	 .emu1010 = 2} ,	{.vendor = 0x1102, .device = 0x0008, 	 .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0108_chip = 1,	 .ac97_chip = 1} ,	/* Tested by James@superbug.co.uk 8th July 2005. No sound available yet. */	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,	 .driver = "Audigy2", .name = "E-mu 1010 [4001]", 	 .id = "EMU1010",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .spk71 = 1,	 .emu1010 = 1} ,	/* Tested by James@superbug.co.uk 3rd July 2005 */	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102,	 .driver = "Audigy2", .name = "Audigy 4 PRO [SB0380]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	/* Tested by shane-alsa@cm.nu 5th Nov 2005 */	/* The 0x20061102 does have SB0350 written on it	 * Just like 0x20021102	 */	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102,	 .driver = "Audigy2", .name = "Audigy 2 [SB0350b]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,	 .driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,	 .driver = "Audigy2", .name = "Audigy 2 ZS [2001]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	/* Audigy 2 */	/* Tested by James@superbug.co.uk 3rd July 2005 */	/* DSP: CA0102-IAT	 * DAC: CS4382-KQ	 * ADC: Philips 1361T	 * AC97: STAC9721	 * CA0151: Yes	 */	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10071102,	 .driver = "Audigy2", .name = "Audigy 2 [SB0240]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .adc_1361t = 1,  /* 24 bit capture instead of 16bit */	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102,	 .driver = "Audigy2", .name = "Audigy 2 EX [1005]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1} ,	/* Dell OEM/Creative Labs Audigy 2 ZS */	/* See ALSA bug#1365 */	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102,	 .driver = "Audigy2", .name = "Audigy 2 ZS [SB0353]",	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,	 .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", 	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spk71 = 1,	 .spdif_bug = 1,	 .adc_1361t = 1,  /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .revision = 0x04,	 .driver = "Audigy2", .name = "Audigy 2 [Unknown]",	 .id = "Audigy2",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ca0151_chip = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00531102,	 .driver = "Audigy", .name = "Audigy 1 [SB0090]", 	 .id = "Audigy",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00521102,	 .driver = "Audigy", .name = "Audigy 1 ES [SB0160]", 	 .id = "Audigy",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .spdif_bug = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00511102,	 .driver = "Audigy", .name = "Audigy 1 [SB0090]", 	 .id = "Audigy",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0004,	 .driver = "Audigy", .name = "Audigy 1 [Unknown]", 	 .id = "Audigy",	 .emu10k2_chip = 1,	 .ca0102_chip = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806B1102,	 .driver = "EMU10K1", .name = "SBLive! [SB0105]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806A1102,	 .driver = "EMU10K1", .name = "SBLive! Value [SB0103]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80691102,	 .driver = "EMU10K1", .name = "SBLive! Value [SB0101]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	/* Tested by ALSA bug#1680 26th December 2005 */	/* note: It really has SB0220 written on the card. */	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80661102,	 .driver = "EMU10K1", .name = "SB Live 5.1 Dell OEM [SB0220]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	/* Tested by Thomas Zehetbauer 27th Aug 2005 */	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80651102,	 .driver = "EMU10K1", .name = "SB Live 5.1 [SB0220]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x100a1102,	 .driver = "EMU10K1", .name = "SB Live 5.1 [SB0220]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80641102,	 .driver = "EMU10K1", .name = "SB Live 5.1", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	/* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102,	 .driver = "EMU10K1", .name = "SBLive 5.1 [SB0060]",	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 2, /* ac97 is optional; both SBLive 5.1 and platinum			  * share the same IDs!			  */	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4850]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80401102,	 .driver = "EMU10K1", .name = "SBLive! Platinum [CT4760P]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80321102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4871]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80311102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4831]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80281102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4870]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	/* Tested by James@superbug.co.uk 3rd July 2005 */	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80271102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4832]", 	 .id = "Live",	 .emu10k1_chip = 1,	 .ac97_chip = 1,	 .sblive51 = 1} ,	{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80261102,	 .driver = "EMU10K1", .name = "SBLive! Value [CT4830]", 	 .id = "Live",	 .emu10k1_chip = 1,

⌨️ 快捷键说明

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