aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp_modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/atiixp_modem.c')
-rw-r--r--sound/pci/atiixp_modem.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 3174b6625419..649a999214e2 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -305,12 +305,6 @@ static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
305#define atiixp_update(chip,reg,mask,val) \ 305#define atiixp_update(chip,reg,mask,val) \
306 snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) 306 snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val)
307 307
308/* delay for one tick */
309#define do_delay() do { \
310 schedule_timeout_uninterruptible(1); \
311} while (0)
312
313
314/* 308/*
315 * handling DMA packets 309 * handling DMA packets
316 * 310 *
@@ -495,7 +489,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip)
495 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, 489 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET,
496 ATI_REG_CMD_AC_SYNC); 490 ATI_REG_CMD_AC_SYNC);
497 atiixp_read(chip, CMD); 491 atiixp_read(chip, CMD);
498 do_delay(); 492 msleep(1);
499 atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); 493 atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET);
500 if (--timeout) { 494 if (--timeout) {
501 snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n"); 495 snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n");
@@ -543,9 +537,9 @@ static int snd_atiixp_codec_detect(atiixp_t *chip)
543 chip->codec_not_ready_bits = 0; 537 chip->codec_not_ready_bits = 0;
544 atiixp_write(chip, IER, CODEC_CHECK_BITS); 538 atiixp_write(chip, IER, CODEC_CHECK_BITS);
545 /* wait for the interrupts */ 539 /* wait for the interrupts */
546 timeout = HZ / 10; 540 timeout = 50;
547 while (timeout-- > 0) { 541 while (timeout-- > 0) {
548 do_delay(); 542 msleep(1);
549 if (chip->codec_not_ready_bits) 543 if (chip->codec_not_ready_bits)
550 break; 544 break;
551 } 545 }