add: LIST_INIT(&(card->mem));
context: emuxki_init(emuxki_dev * card){	uint16       i;	uint32       spcs, *ptb;	uint32	 	 silentpage;		/* disable any channel interrupt */	emuxki_chan_write(&card->config, 0, EMU_CLIEL, 0);	emuxki_chan_write(&card->config, 0, EMU_CLIEH, 0);	emuxki_chan_write(&card->config, 0, EMU_SOLEL, 0);	emuxki_chan_write(&card->config, 0, EMU_SOLEH, 0);	/* Set recording buffers sizes to zero */	emuxki_chan_write(&card->config, 0, EMU_MICBS, EMU_RECBS_BUFSIZE_NONE);	emuxki_chan_write(&card->config, 0, EMU_MICBA, 0);	emuxki_chan_write(&card->config, 0, EMU_FXBS, EMU_RECBS_BUFSIZE_NONE);	emuxki_chan_write(&card->config, 0, EMU_FXBA, 0);	emuxki_chan_write(&card->config, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);	emuxki_chan_write(&card->config, 0, EMU_ADCBA, 0);	/* Initialize all channels to stopped and no effects */	for (i = 0; i < EMU_NUMCHAN; i++) {		emuxki_chan_write(&card->config, i, EMU_CHAN_DCYSUSV, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_IP, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_VTFT, 0xffff);		emuxki_chan_write(&card->config, i, EMU_CHAN_CVCF, 0xffff);		emuxki_chan_write(&card->config, i, EMU_CHAN_PTRX, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_CPF, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_CCR, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_PSST, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_DSL, 0x10);	/* Why 16 ? */		emuxki_chan_write(&card->config, i, EMU_CHAN_CCCA, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_Z1, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_Z2, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_FXRT, 0x32100000);		emuxki_chan_write(&card->config, i, EMU_CHAN_ATKHLDM, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_DCYSUSM, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_IFATN, 0xffff);		emuxki_chan_write(&card->config, i, EMU_CHAN_PEFE, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_FMMOD, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_TREMFRQ, 24);		emuxki_chan_write(&card->config, i, EMU_CHAN_FM2FRQ2, 24);		emuxki_chan_write(&card->config, i, EMU_CHAN_TEMPENV, 0);		/*** these are last so OFF prevents writing ***/		emuxki_chan_write(&card->config, i, EMU_CHAN_LFOVAL2, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_LFOVAL1, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_ATKHLDV, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_ENVVOL, 0);		emuxki_chan_write(&card->config, i, EMU_CHAN_ENVVAL, 0);	}	/* set digital outputs format */	spcs = (EMU_SPCS_CLKACCY_1000PPM | EMU_SPCS_SAMPLERATE_48 |	      EMU_SPCS_CHANNELNUM_LEFT | EMU_SPCS_SOURCENUM_UNSPEC |		EMU_SPCS_GENERATIONSTATUS | 0x00001200 /* Cat code. */ |		0x00000000 /* IEC-958 Mode */ | EMU_SPCS_EMPHASIS_NONE |		EMU_SPCS_COPYRIGHT);	emuxki_chan_write(&card->config, 0, EMU_SPCS0, spcs);	emuxki_chan_write(&card->config, 0, EMU_SPCS1, spcs);	emuxki_chan_write(&card->config, 0, EMU_SPCS2, spcs);		if(IS_AUDIGY2(&card->config)) {		emuxki_chan_write(&card->config, 0, EMU_A2_SPDIF_SAMPLERATE, EMU_A2_SPDIF_UNKNOWN);				emuxki_reg_write_32(&card->config, EMU_A2_PTR, EMU_A2_SRCSEL);		emuxki_reg_write_32(&card->config, EMU_A2_DATA, 			EMU_A2_SRCSEL_ENABLE_SPDIF | EMU_A2_SRCSEL_ENABLE_SRCMULTI);				emuxki_reg_write_32(&card->config, EMU_A2_PTR, EMU_A2_SRCMULTI);		emuxki_reg_write_32(&card->config, EMU_A2_DATA, EMU_A2_SRCMULTI_ENABLE_INPUT);	}		/* Let's play with sound processor */	emuxki_initfx(card);		/* allocate memory for our Page Table */	card->ptb_area = alloc_mem(&card->ptb_phy_base, &card->ptb_log_base, 		EMU_MAXPTE * sizeof(uint32), "emuxki ptb");			/* This is necessary unless you like Metallic noise... */	card->silentpage_area = alloc_mem(&card->silentpage_phy_base, &card->silentpage_log_base, 		EMU_PTESIZE, "emuxki sp");			if (card->ptb_area < B_OK || card->silentpage_area < B_OK) {		PRINT(("couldn't allocate memory\n"));		if (card->ptb_area > B_OK)			delete_area(card->ptb_area);		if (card->silentpage_area > B_OK)			delete_area(card->silentpage_area);		return B_ERROR;		}		/* Zero out the silent page */	/* This might not be always true, it might be 128 for 8bit channels */	memset(card->ptb_log_base, 0, EMU_PTESIZE);		/*	 * Set all the PTB Entries to the silent page We shift the physical	 * address by one and OR it with the page number. I don't know what	 * the ORed index is for, might be a very useful unused feature...	 */	silentpage = ((uint32)card->silentpage_phy_base) << 1;	ptb = card->ptb_log_base;	for (i = 0; i < EMU_MAXPTE; i++)		ptb[i] = silentpage | i;	/* Write PTB address and set TCB to none */	emuxki_chan_write(&card->config, 0, EMU_PTB, (uint32)card->ptb_phy_base);	emuxki_chan_write(&card->config, 0, EMU_TCBS, 0);	/* This means 16K TCB */	emuxki_chan_write(&card->config, 0, EMU_TCB, 0);	/* No TCB use for now */	/*	 * Set channels MAPs to the silent page.	 * I don't know what MAPs are for.	 */	silentpage |= EMU_CHAN_MAP_PTI_MASK;	for (i = 0; i < EMU_NUMCHAN; i++) {		emuxki_chan_write(&card->config, i, EMU_CHAN_MAPA, silentpage);		emuxki_chan_write(&card->config, i, EMU_CHAN_MAPB, silentpage);		card->channel[i] = NULL;	}	/* Init streams list */	LIST_INIT(&(card->streams));	/* Timer is stopped */	card->timerstate &= ~EMU_TIMER_STATE_ENABLED;	card->timerate = 0xffff;	return B_OK;}