kernels/linux-2.4.0/drivers/sound/aci.c
/*
 * Wait until the ACI microcontroller has set the READYFLAG in the
 * Busy/IRQ Source Register to 0. This is required to avoid
 * overrunning the sound card microcontroller. We do a busy wait here,
 * because the microcontroller is not supposed to signal a busy
 * condition for more than a few clock cycles. In case of a time-out,
 * this function returns -1.
 *
 * This busy wait code normally requires less than 15 loops and
 * practically always less than 100 loops on my i486/DX2 66 MHz.
 *
 * Warning: Waiting on the general status flag after reseting the MUTE
 * function can take a VERY long time, because the PCM12 does some kind
 * of fade-in effect. For this reason, access to the MUTE function has
 * not been implemented at all.
 */
Wait until the ACI microcontroller has set the READYFLAG in the
Busy/IRQ Source Register to 0. This is required to avoid
overrunning the sound card microcontroller. We do a busy wait here,
because the microcontroller is not supposed to signal a busy
condition for more than a few clock cycles. In case of a time-out,
this function returns -1.

This busy wait code normally requires less than 15 loops and
practically always less than 100 loops on my i486/DX2 66 MHz.

Waiting on the general status flag after reseting the MUTE
function can take a VERY long time, because the PCM12 does some kind
of fade-in effect. For this reason, access to the MUTE function has
not been implemented at all.
Wait until the ACI microcontroller has set the READYFLAG in the Busy / IRQ Source Register to 0 . This is required to avoid overrunning the sound card microcontroller . We do a busy wait here because the microcontroller is not supposed to signal a busy condition for more than a few clock cycles . In case of a time - out this function returns - 1 . This busy wait code normally requires less than 15 loops and practically always less than 100 loops on my i486 / DX2 66 MHz . Waiting on the general status flag after reseting the MUTE function can take a VERY long time because the PCM12 does some kind of fade - in effect . For this reason access to the MUTE function has not been implemented at all .
static int busy_wait(void)
{
	long timeout;
	for (timeout = 0; timeout < 10000000L; timeout++)
		if ((inb_p(BUSY_REGISTER) & 1) == 0)
			return 0;
#ifdef DEBUG
	printk("ACI: READYFLAG timed out.\n");
#endif
	return -1;
}
static int busy_wait ( void ) { long timeout ; for ( timeout = 0 ; timeout < 10000000L ; timeout ++ ) if ( ( inb_p ( BUSY_REGISTER ) & 1 ) == 0 ) return 0 ; #ifdef DEBUG printk ( " \n " ) ; #endif return -1 ; }
Wait until the ACI microcontroller has set the READYFLAG in the
 Busy/IRQ Source Register to 0.
Wait until the ACI microcontroller has set the READYFLAG in the Busy / IRQ Source Register to 0 .