diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/ad1848/ad1848_lib.c | 26 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4231_lib.c | 23 |
2 files changed, 23 insertions, 26 deletions
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index c10dfc10e67a..eee941be3b74 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c | |||
@@ -213,13 +213,14 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) | |||
213 | /* end of cleanup sequence */ | 213 | /* end of cleanup sequence */ |
214 | for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--) | 214 | for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--) |
215 | udelay(100); | 215 | udelay(100); |
216 | #if 0 | 216 | |
217 | printk("(1) timeout = %i\n", timeout); | 217 | snd_printdd("(1) timeout = %d\n", timeout); |
218 | #endif | 218 | |
219 | #ifdef CONFIG_SND_DEBUG | 219 | #ifdef CONFIG_SND_DEBUG |
220 | if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) | 220 | if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) |
221 | snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL)); | 221 | snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL)); |
222 | #endif | 222 | #endif |
223 | |||
223 | chip->mce_bit &= ~AD1848_MCE; | 224 | chip->mce_bit &= ~AD1848_MCE; |
224 | timeout = inb(AD1848P(chip, REGSEL)); | 225 | timeout = inb(AD1848P(chip, REGSEL)); |
225 | outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL)); | 226 | outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL)); |
@@ -236,9 +237,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) | |||
236 | * which at the slowest possible rate of 5.5125 kHz means 907 us. | 237 | * which at the slowest possible rate of 5.5125 kHz means 907 us. |
237 | */ | 238 | */ |
238 | msleep(1); | 239 | msleep(1); |
239 | #if 0 | 240 | |
240 | printk("(2) jiffies = %li\n", jiffies); | 241 | snd_printdd("(2) jiffies = %lu\n", jiffies); |
241 | #endif | 242 | |
242 | time = msecs_to_jiffies(250); | 243 | time = msecs_to_jiffies(250); |
243 | while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) { | 244 | while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) { |
244 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 245 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
@@ -249,9 +250,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) | |||
249 | time = schedule_timeout(time); | 250 | time = schedule_timeout(time); |
250 | spin_lock_irqsave(&chip->reg_lock, flags); | 251 | spin_lock_irqsave(&chip->reg_lock, flags); |
251 | } | 252 | } |
252 | #if 0 | 253 | |
253 | printk("(3) jiffies = %li\n", jiffies); | 254 | snd_printdd("(3) jiffies = %lu\n", jiffies); |
254 | #endif | 255 | |
255 | time = msecs_to_jiffies(100); | 256 | time = msecs_to_jiffies(100); |
256 | while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) { | 257 | while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) { |
257 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 258 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
@@ -263,10 +264,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) | |||
263 | spin_lock_irqsave(&chip->reg_lock, flags); | 264 | spin_lock_irqsave(&chip->reg_lock, flags); |
264 | } | 265 | } |
265 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 266 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
266 | #if 0 | 267 | |
267 | printk("(4) jiffies = %li\n", jiffies); | 268 | snd_printdd("(4) jiffies = %lu\n", jiffies); |
268 | snd_printk("mce_down - exit = 0x%x\n", inb(AD1848P(chip, REGSEL))); | 269 | snd_printd("mce_down - exit = 0x%x\n", inb(AD1848P(chip, REGSEL))); |
269 | #endif | ||
270 | } | 270 | } |
271 | 271 | ||
272 | static unsigned int snd_ad1848_get_count(unsigned char format, | 272 | static unsigned int snd_ad1848_get_count(unsigned char format, |
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index 0e604bf6bbee..c0ffb20da996 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c | |||
@@ -316,9 +316,7 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip) | |||
316 | int timeout; | 316 | int timeout; |
317 | 317 | ||
318 | snd_cs4231_busy_wait(chip); | 318 | snd_cs4231_busy_wait(chip); |
319 | #if 0 | 319 | |
320 | printk("(1) timeout = %i\n", timeout); | ||
321 | #endif | ||
322 | #ifdef CONFIG_SND_DEBUG | 320 | #ifdef CONFIG_SND_DEBUG |
323 | if (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) | 321 | if (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) |
324 | snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", (long)CS4231P(REGSEL)); | 322 | 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) | |||
342 | * which at the slowest possible rate of 5.5125 kHz means 907 us. | 340 | * which at the slowest possible rate of 5.5125 kHz means 907 us. |
343 | */ | 341 | */ |
344 | msleep(1); | 342 | msleep(1); |
345 | #if 0 | 343 | |
346 | printk("(2) jiffies = %li\n", jiffies); | 344 | snd_printdd("(1) jiffies = %lu\n", jiffies); |
347 | #endif | 345 | |
348 | /* in 10 ms increments, check condition, up to 250 ms */ | 346 | /* in 10 ms increments, check condition, up to 250 ms */ |
349 | timeout = 25; | 347 | timeout = 25; |
350 | while (snd_cs4231_in(chip, CS4231_TEST_INIT) & CS4231_CALIB_IN_PROGRESS) { | 348 | 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) | |||
354 | } | 352 | } |
355 | msleep(10); | 353 | msleep(10); |
356 | } | 354 | } |
357 | #if 0 | 355 | |
358 | printk("(3) jiffies = %li\n", jiffies); | 356 | snd_printdd("(2) jiffies = %lu\n", jiffies); |
359 | #endif | 357 | |
360 | /* in 10 ms increments, check condition, up to 100 ms */ | 358 | /* in 10 ms increments, check condition, up to 100 ms */ |
361 | timeout = 10; | 359 | timeout = 10; |
362 | while (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) { | 360 | while (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) { |
@@ -366,10 +364,9 @@ void snd_cs4231_mce_down(struct snd_cs4231 *chip) | |||
366 | } | 364 | } |
367 | msleep(10); | 365 | msleep(10); |
368 | } | 366 | } |
369 | #if 0 | 367 | |
370 | printk("(4) jiffies = %li\n", jiffies); | 368 | snd_printdd("(3) jiffies = %lu\n", jiffies); |
371 | snd_printk("mce_down - exit = 0x%x\n", cs4231_inb(chip, CS4231P(REGSEL))); | 369 | snd_printd("mce_down - exit = 0x%x\n", cs4231_inb(chip, CS4231P(REGSEL))); |
372 | #endif | ||
373 | } | 370 | } |
374 | 371 | ||
375 | static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size) | 372 | static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size) |