u32 csr = sbus_readl(chip->port + APCCSR); /* I don't know why, but on sbus the period counter must * only start counting after the first period is sent. * Therefore this dummy thing. */ unsigned int dummy = 0;  switch (what) { case CS4231_PLAYBACK_ENABLE: if (on) { csr &= ~APC_XINT_PLAY; sbus_writel(csr, chip->port + APCCSR);  csr &= ~APC_PPAUSE; sbus_writel(csr, chip->port + APCCSR);  snd_cs4231_sbus_advance_dma(substream, &dummy);  csr |=  APC_GENL_INT | APC_PLAY_INT | APC_XINT_ENA | APC_XINT_PLAY | APC_XINT_EMPT | APC_XINT_GENL | APC_XINT_PENA | APC_PDMA_READY; sbus_writel(csr, chip->port + APCCSR); } else { csr |= APC_PPAUSE; sbus_writel(csr, chip->port + APCCSR);  csr &= ~APC_PDMA_READY; sbus_writel(csr, chip->port + APCCSR); } break; case CS4231_RECORD_ENABLE: if (on) { csr &= ~APC_XINT_CAPT; sbus_writel(csr, chip->port + APCCSR);  csr &= ~APC_CPAUSE; sbus_writel(csr, chip->port + APCCSR);  snd_cs4231_sbus_advance_dma(substream, &dummy);  csr |=  APC_GENL_INT | APC_CAPT_INT | APC_XINT_ENA | APC_XINT_CAPT | APC_XINT_CEMP | APC_XINT_GENL | APC_CDMA_READY;  sbus_writel(csr, chip->port + APCCSR); } else { csr |= APC_CPAUSE; sbus_writel(csr, chip->port + APCCSR);  csr &= ~APC_CDMA_READY; sbus_writel(csr, chip->port + APCCSR); } break; } 
static void cs4231_dma_trigger(cs4231_t *chip, unsigned int what, int on){#ifdef EBUS_SUPPORT	if (chip->flags & CS4231_FLAG_EBUS) {		if (what & CS4231_PLAYBACK_ENABLE) {			if (on) {				ebus_dma_prepare(&chip->eb2p, 0);				ebus_dma_enable(&chip->eb2p, 1);				snd_cs4231_ebus_advance_dma(&chip->eb2p,					chip->playback_substream,					&chip->p_periods_sent);			} else {				ebus_dma_enable(&chip->eb2p, 0);			}		}		if (what & CS4231_RECORD_ENABLE) {			if (on) {				ebus_dma_prepare(&chip->eb2c, 1);				ebus_dma_enable(&chip->eb2c, 1);				snd_cs4231_ebus_advance_dma(&chip->eb2c,					chip->capture_substream,					&chip->c_periods_sent);			} else {				ebus_dma_enable(&chip->eb2c, 0);			}		}	} else {#endif#ifdef SBUS_SUPPORT#endif#ifdef EBUS_SUPPORT	}#endif}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a131430c200f6bda313bf5d0a8e238c41afdfe0a/cs4231.c/clean/sound/sparc/cs4231.c