[ALSA] ad1848/cs4231: replace commented out debug code with snd-printd{,d}

While I'm at it another 'while I'm there' -- replace commented out debug
code with snd-printd{,d}.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
Rene Herman 2007-09-10 23:22:55 +02:00 коммит произвёл Jaroslav Kysela
Родитель bc962efa6c
Коммит d44df2d0f2
2 изменённых файлов: 23 добавлений и 26 удалений

Просмотреть файл

@ -213,13 +213,14 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
/* end of cleanup sequence */ /* end of cleanup sequence */
for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--) for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--)
udelay(100); udelay(100);
#if 0
printk("(1) timeout = %i\n", timeout); snd_printdd("(1) timeout = %d\n", timeout);
#endif
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL)); snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL));
#endif #endif
chip->mce_bit &= ~AD1848_MCE; chip->mce_bit &= ~AD1848_MCE;
timeout = inb(AD1848P(chip, REGSEL)); timeout = inb(AD1848P(chip, REGSEL));
outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL)); outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL));
@ -236,9 +237,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
* which at the slowest possible rate of 5.5125 kHz means 907 us. * which at the slowest possible rate of 5.5125 kHz means 907 us.
*/ */
msleep(1); msleep(1);
#if 0
printk("(2) jiffies = %li\n", jiffies); snd_printdd("(2) jiffies = %lu\n", jiffies);
#endif
time = msecs_to_jiffies(250); time = msecs_to_jiffies(250);
while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) { while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) {
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
@ -249,9 +250,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
time = schedule_timeout(time); time = schedule_timeout(time);
spin_lock_irqsave(&chip->reg_lock, flags); spin_lock_irqsave(&chip->reg_lock, flags);
} }
#if 0
printk("(3) jiffies = %li\n", jiffies); snd_printdd("(3) jiffies = %lu\n", jiffies);
#endif
time = msecs_to_jiffies(100); time = msecs_to_jiffies(100);
while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) { while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) {
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
@ -263,10 +264,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
spin_lock_irqsave(&chip->reg_lock, flags); spin_lock_irqsave(&chip->reg_lock, flags);
} }
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
#if 0
printk("(4) jiffies = %li\n", jiffies); snd_printdd("(4) jiffies = %lu\n", jiffies);
snd_printk("mce_down - exit = 0x%x\n", inb(AD1848P(chip, REGSEL))); snd_printd("mce_down - exit = 0x%x\n", inb(AD1848P(chip, REGSEL)));
#endif
} }
static unsigned int snd_ad1848_get_count(unsigned char format, static unsigned int snd_ad1848_get_count(unsigned char format,

Просмотреть файл

@ -316,9 +316,7 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip)
int timeout; int timeout;
snd_cs4231_busy_wait(chip); snd_cs4231_busy_wait(chip);
#if 0
printk("(1) timeout = %i\n", timeout);
#endif
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
if (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) if (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT)
snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", (long)CS4231P(REGSEL)); snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", (long)CS4231P(REGSEL));
@ -342,9 +340,9 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip)
* which at the slowest possible rate of 5.5125 kHz means 907 us. * which at the slowest possible rate of 5.5125 kHz means 907 us.
*/ */
msleep(1); msleep(1);
#if 0
printk("(2) jiffies = %li\n", jiffies); snd_printdd("(1) jiffies = %lu\n", jiffies);
#endif
/* in 10 ms increments, check condition, up to 250 ms */ /* in 10 ms increments, check condition, up to 250 ms */
timeout = 25; timeout = 25;
while (snd_cs4231_in(chip, CS4231_TEST_INIT) & CS4231_CALIB_IN_PROGRESS) { while (snd_cs4231_in(chip, CS4231_TEST_INIT) & CS4231_CALIB_IN_PROGRESS) {
@ -354,9 +352,9 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip)
} }
msleep(10); msleep(10);
} }
#if 0
printk("(3) jiffies = %li\n", jiffies); snd_printdd("(2) jiffies = %lu\n", jiffies);
#endif
/* in 10 ms increments, check condition, up to 100 ms */ /* in 10 ms increments, check condition, up to 100 ms */
timeout = 10; timeout = 10;
while (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) { while (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) {
@ -366,10 +364,9 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip)
} }
msleep(10); msleep(10);
} }
#if 0
printk("(4) jiffies = %li\n", jiffies); snd_printdd("(3) jiffies = %lu\n", jiffies);
snd_printk("mce_down - exit = 0x%x\n", cs4231_inb(chip, CS4231P(REGSEL))); snd_printd("mce_down - exit = 0x%x\n", cs4231_inb(chip, CS4231P(REGSEL)));
#endif
} }
static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size) static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size)