rem: PRINT(("codec vendor id      = %#08x\n",ac97_get_vendor_id(&card->config)));
add: PRINT(("codec vendor id      = %#08lx\n",ac97_get_vendor_id(&card->config)));
context: emuxki_setup(emuxki_dev * card){	status_t err = B_OK;	unsigned char cmd;	PRINT(("setup_emuxki(%p)\n", card));	make_device_names(card);	card->config.nabmbar = card->info.u.h0.base_registers[0];	card->config.irq = card->info.u.h0.interrupt_line;	card->config.type = 0;	if(card->info.device_id == CREATIVELABS_AUDIGY_DEVICE_ID)		card->config.type |= TYPE_AUDIGY;	if(IS_AUDIGY(&card->config) && (card->info.revision == 4 || card->info.revision == 8))		card->config.type |= TYPE_AUDIGY2;		PRINT(("%s deviceid = %#04x chiprev = %x model = %x enhanced at %x\n", card->name, card->info.device_id,		card->info.revision, card->info.u.h0.subsystem_id, card->config.nabmbar));			cmd = (*pci->read_pci_config)(card->info.bus, card->info.device, card->info.function, PCI_command, 2);	PRINT(("PCI command before: %x\n", cmd));	(*pci->write_pci_config)(card->info.bus, card->info.device, card->info.function, PCI_command, 2, cmd | PCI_command_io);	cmd = (*pci->read_pci_config)(card->info.bus, card->info.device, card->info.function, PCI_command, 2);	PRINT(("PCI command after: %x\n", cmd));	dump_hardware_regs(&card->config);	emuxki_reg_write_32(&card->config, EMU_HCFG, EMU_HCFG_LOCKSOUNDCACHE | EMU_HCFG_LOCKTANKCACHE_MASK| 		EMU_HCFG_MUTEBUTTONENABLE);		dump_hardware_regs(&card->config);	#if MIDI	if ((err = (*mpu401->create_device)(card->config.nabmbar + (IS_AUDIGY(&card->config) ? EMU_A_MUDATA1 : EMU_MUDATA), 		&card->midi.driver, 0, midi_interrupt_op, &card->midi)) < B_OK)		return (err);			card->midi.card = card;#endif	/* reset the codec */		PRINT(("codec reset\n"));	emuxki_codec_write(&card->config, 0x00, 0x0000);	snooze(50000); // 50 ms	ac97_init(&card->config);	ac97_amp_enable(&card->config, true);	PRINT(("codec vendor id      = %#08x\n",ac97_get_vendor_id(&card->config)));	PRINT(("codec description     = %s\n",ac97_get_vendor_id_description(&card->config)));	PRINT(("codec 3d enhancement = %s\n",ac97_get_3d_stereo_enhancement(&card->config)));		if(IS_AUDIGY2(&card->config)) {		emuxki_reg_write_32(&card->config, EMU_A_IOCFG, 			EMU_A_IOCFG_GPOUT0 | emuxki_reg_read_32(&card->config, EMU_A_IOCFG));	}		dump_hardware_regs(&card->config);		/*PRINT(("codec master output = %#04x\n",emuxki_codec_read(&card->config, 0x02)));	PRINT(("codec aux output    = %#04x\n",emuxki_codec_read(&card->config, 0x04)));	PRINT(("codec mono output   = %#04x\n",emuxki_codec_read(&card->config, 0x06)));	PRINT(("codec pcm output    = %#04x\n",emuxki_codec_read(&card->config, 0x18)));	PRINT(("codec line in	    = %#04x\n",emuxki_codec_read(&card->config, 0x10)));	PRINT(("codec record line in= %#04x\n",emuxki_codec_read(&card->config, 0x1a)));	PRINT(("codec record gain   = %#04x\n",emuxki_codec_read(&card->config, 0x1c)));*/		/*PRINT(("adc index	    = %#08x\n",emuxki_chan_read(&card->config, EMU_ADCIDX, 0)));	PRINT(("micro index 	= %#08x\n",emuxki_chan_read(&card->config, EMU_MICIDX, 0)));	PRINT(("fx index   		= %#08x\n",emuxki_chan_read(&card->config, EMU_FXIDX, 0)));	PRINT(("adc addr	    = %#08x\n",emuxki_chan_read(&card->config, EMU_ADCBA, 0)));	PRINT(("micro addr 		= %#08x\n",emuxki_chan_read(&card->config, EMU_MICBA, 0)));	PRINT(("fx addr   		= %#08x\n",emuxki_chan_read(&card->config, EMU_FXBA, 0)));	PRINT(("adc size	    = %#08x\n",emuxki_chan_read(&card->config, EMU_ADCBS, 0)));	PRINT(("micro size 		= %#08x\n",emuxki_chan_read(&card->config, EMU_MICBS, 0)));	PRINT(("fx size   		= %#08x\n",emuxki_chan_read(&card->config, EMU_FXBS, 0)));	PRINT(("EMU_ADCCR   		= %#08x\n",emuxki_chan_read(&card->config, EMU_ADCCR, 0)));	PRINT(("EMU_FXWC   		= %#08x\n",emuxki_chan_read(&card->config, EMU_FXWC, 0)));	PRINT(("EMU_FXWC   		= %#08x\n",emuxki_reg_read_32(&card->config, EMU_FXWC)));*/	PRINT(("writing codec registers\n"));	// TODO : to move with AC97	/* enable master output */	emuxki_codec_write(&card->config, AC97_MASTER_VOLUME, 0x0000);	/* enable aux output */	emuxki_codec_write(&card->config, AC97_AUX_OUT_VOLUME, 0x0000);	/* enable mono output */	//emuxki_codec_write(&card->config, AC97_MONO_VOLUME, 0x0004);	/* enable pcm output */	emuxki_codec_write(&card->config, AC97_PCM_OUT_VOLUME, 0x0808);	/* enable line in */	//emuxki_codec_write(&card->config, AC97_LINE_IN_VOLUME, 0x8808);	/* set record line in */	emuxki_codec_write(&card->config, AC97_RECORD_SELECT, 0x0404);	/* set record gain */	//emuxki_codec_write(&card->config, AC97_RECORD_GAIN, 0x0000);	PRINT(("codec master output = %#04x\n",emuxki_codec_read(&card->config, AC97_MASTER_VOLUME)));	PRINT(("codec aux output    = %#04x\n",emuxki_codec_read(&card->config, AC97_AUX_OUT_VOLUME)));	PRINT(("codec mono output   = %#04x\n",emuxki_codec_read(&card->config, AC97_MONO_VOLUME)));	PRINT(("codec pcm output    = %#04x\n",emuxki_codec_read(&card->config, AC97_PCM_OUT_VOLUME)));	PRINT(("codec line in	    = %#04x\n",emuxki_codec_read(&card->config, AC97_LINE_IN_VOLUME)));	PRINT(("codec record line in= %#04x\n",emuxki_codec_read(&card->config, AC97_RECORD_SELECT)));	PRINT(("codec record gain   = %#04x\n",emuxki_codec_read(&card->config, AC97_RECORD_GAIN)));		if (emuxki_codec_read(&card->config, AC97_EXTENDED_AUDIO_ID) & 0x0080) {		card->config.type |= TYPE_LIVE_5_1;		emuxki_chan_write(&card->config, 0, EMU_AC97SLOT, EMU_AC97SLOT_CENTER | EMU_AC97SLOT_LFE);		emuxki_codec_write(&card->config, AC97_SURROUND_VOLUME, 0x0000);	}		if ((err = emuxki_init(card)))		return (err);		if(IS_AUDIGY(&card->config) || IS_LIVE_5_1(&card->config)) {		card->play_mode = 6;	// mode 5.1	} else {		card->play_mode = 4;	// mode 4.0	}		emuxki_reg_write_32(&card->config, EMU_INTE, EMU_INTE_SAMPLERATER | EMU_INTE_PCIERRENABLE);		PRINT(("installing interrupt : %x\n", card->config.irq));	install_io_interrupt_handler(card->config.irq, emuxki_int, card, 0);	emuxki_inte_enable(&card->config, EMU_INTE_VOLINCRENABLE | EMU_INTE_VOLDECRENABLE		| EMU_INTE_MUTEENABLE | EMU_INTE_FXDSPENABLE);	if(IS_AUDIGY2(&card->config)) {		emuxki_reg_write_32(&card->config, EMU_HCFG, EMU_HCFG_AUDIOENABLE |			EMU_HCFG_AC3ENABLE_CDSPDIF | EMU_HCFG_AC3ENABLE_GPSPDIF|			EMU_HCFG_JOYENABLE | EMU_HCFG_AUTOMUTE);	} else if(IS_AUDIGY(&card->config)) {		emuxki_reg_write_32(&card->config, EMU_HCFG, EMU_HCFG_AUDIOENABLE |			EMU_HCFG_JOYENABLE | EMU_HCFG_AUTOMUTE);	} else {		emuxki_reg_write_32(&card->config, EMU_HCFG, EMU_HCFG_AUDIOENABLE |			EMU_HCFG_LOCKTANKCACHE_MASK | EMU_HCFG_JOYENABLE | EMU_HCFG_AUTOMUTE);	}		PRINT(("init_driver done\n"));	return err;}