else if (chip->position_fix == POS_FIX_AUTO && azx_dev->period_updating) { /* check the validity of DMA position */ unsigned int diff = 0; azx_dev->last_pos += azx_dev->fragsize; if (azx_dev->last_pos > pos) diff = azx_dev->last_pos - pos; if (azx_dev->last_pos >= azx_dev->bufsize) { if (pos < azx_dev->fragsize) diff = 0; azx_dev->last_pos = 0; } if (diff > 0 && diff <= azx_dev->fifo_size) pos += azx_dev->fifo_size; else { snd_printdd(KERN_INFO "hda_intel: DMA position fix %d, switching to posbuf\n", diff); chip->position_fix = POS_FIX_POSBUF; pos = *azx_dev->posbuf; } azx_dev->period_updating = 0; } 
static snd_pcm_uframes_t azx_pcm_pointer(snd_pcm_substream_t *substream){	struct azx_pcm *apcm = snd_pcm_substream_chip(substream);	azx_t *chip = apcm->chip;	azx_dev_t *azx_dev = get_azx_dev(substream);	unsigned int pos;	if (chip->position_fix == POS_FIX_POSBUF) {		/* use the position buffer */		pos = *azx_dev->posbuf;	} else {		/* read LPIB */		pos = azx_sd_readl(azx_dev, SD_LPIB);		if (chip->position_fix == POS_FIX_FIFO)			pos += azx_dev->fifo_size;	}	if (pos >= azx_dev->bufsize)		pos = 0;	return bytes_to_frames(substream->runtime, pos);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0be3b5d3fb94c36c517655d18a936681d7108667/hda_intel.c/clean/sound/pci/hda/hda_intel.c