set_current_state(TASK_INTERRUPTIBLE); time = schedule_timeout(time); 
time = schedule_timeout_interruptible(time); 
static void snd_ad1848_mce_down(ad1848_t *chip){	unsigned long flags;	int timeout;	signed long time;	spin_lock_irqsave(&chip->reg_lock, flags);	for (timeout = 5; timeout > 0; timeout--)		inb(AD1848P(chip, REGSEL));	/* end of cleanup sequence */	for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--)		udelay(100);#if 0	printk("(1) timeout = %i\n", timeout);#endif#ifdef CONFIG_SND_DEBUG	if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)		snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL));#endif	chip->mce_bit &= ~AD1848_MCE;	timeout = inb(AD1848P(chip, REGSEL));	outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL));	if (timeout == 0x80)		snd_printk(KERN_WARNING "mce_down [0x%lx]: serious init problem - codec still busy\n", chip->port);	if ((timeout & AD1848_MCE) == 0) {		spin_unlock_irqrestore(&chip->reg_lock, flags);		return;	}	/* calibration process */	for (timeout = 500; timeout > 0 && (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) == 0; timeout--);	if ((snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) == 0) {		snd_printd("mce_down - auto calibration time out (1)\n");		spin_unlock_irqrestore(&chip->reg_lock, flags);		return;	}#if 0	printk("(2) timeout = %i, jiffies = %li\n", timeout, jiffies);#endif	time = HZ / 4;	while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) {		spin_unlock_irqrestore(&chip->reg_lock, flags);		if (time <= 0) {			snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n");			return;		}		set_current_state(TASK_INTERRUPTIBLE);		time = schedule_timeout(time);		spin_lock_irqsave(&chip->reg_lock, flags);	}#if 0	printk("(3) jiffies = %li\n", jiffies);#endif	time = HZ / 10;	while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) {		spin_unlock_irqrestore(&chip->reg_lock, flags);		if (time <= 0) {			snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n");			return;		}		set_current_state(TASK_INTERRUPTIBLE);		time = schedule_timeout(time);		spin_lock_irqsave(&chip->reg_lock, flags);	}	spin_unlock_irqrestore(&chip->reg_lock, flags);#if 0	printk("(4) jiffies = %li\n", jiffies);	snd_printk("mce_down - exit = 0x%x\n", inb(AD1848P(chip, REGSEL)));#endif}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8433a509c0eb6bb1f33ce39c82c580b8901619ee/ad1848_lib.c/clean/sound/isa/ad1848/ad1848_lib.c