rem: TRACE(("init chan finished\n"));
add: LOG(("init chan finished\n"));
context: void init_chan(ich_chan *chan){	int i;	ASSERT(BUFFER_COUNT <= ICH_BD_COUNT);	TRACE(("init chan\n"));	chan->lastindex = 0;	chan->played_frames_count = 0;	chan->played_real_time = 0;	chan->running = false;	for (i = 0; i < BUFFER_COUNT; i++) {		chan->userbuffer[i] = ((char *)chan->userbuffer_base) + i * BUFFER_SIZE;	}	for (i = 0; i < ICH_BD_COUNT; i++) {		chan->buffer[i] = ((char *)chan->buffer_log_base) + (i % BUFFER_COUNT) * BUFFER_SIZE;		chan->bd[i] = (ich_bd *) (((char *)chan->bd_log_base) + i * sizeof(ich_bd));			chan->bd[i]->buffer = ((uint32)chan->buffer_phy_base) + (i % BUFFER_COUNT) * BUFFER_SIZE;		chan->bd[i]->length = BUFFER_SIZE / config->sample_size;		chan->bd[i]->flags = ICH_BDC_FLAG_IOC;	}		// set physical buffer descriptor base address	ich_reg_write_32(chan->regbase, (uint32)chan->bd_phy_base);	TRACE(("init chan finished\n"));}