diff options
-rw-r--r-- | sound/pci/atiixp.c | 12 | ||||
-rw-r--r-- | sound/pci/atiixp_modem.c | 12 |
2 files changed, 6 insertions, 18 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 8bae10d93529..36395d0f3d87 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -328,12 +328,6 @@ static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg, | |||
328 | #define atiixp_update(chip,reg,mask,val) \ | 328 | #define atiixp_update(chip,reg,mask,val) \ |
329 | snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) | 329 | snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) |
330 | 330 | ||
331 | /* delay for one tick */ | ||
332 | #define do_delay() do { \ | ||
333 | schedule_timeout_uninterruptible(1); \ | ||
334 | } while (0) | ||
335 | |||
336 | |||
337 | /* | 331 | /* |
338 | * handling DMA packets | 332 | * handling DMA packets |
339 | * | 333 | * |
@@ -513,7 +507,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip) | |||
513 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, | 507 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, |
514 | ATI_REG_CMD_AC_SYNC); | 508 | ATI_REG_CMD_AC_SYNC); |
515 | atiixp_read(chip, CMD); | 509 | atiixp_read(chip, CMD); |
516 | do_delay(); | 510 | msleep(1); |
517 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); | 511 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); |
518 | if (--timeout) { | 512 | if (--timeout) { |
519 | snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); | 513 | snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); |
@@ -561,9 +555,9 @@ static int snd_atiixp_codec_detect(atiixp_t *chip) | |||
561 | chip->codec_not_ready_bits = 0; | 555 | chip->codec_not_ready_bits = 0; |
562 | atiixp_write(chip, IER, CODEC_CHECK_BITS); | 556 | atiixp_write(chip, IER, CODEC_CHECK_BITS); |
563 | /* wait for the interrupts */ | 557 | /* wait for the interrupts */ |
564 | timeout = HZ / 10; | 558 | timeout = 50; |
565 | while (timeout-- > 0) { | 559 | while (timeout-- > 0) { |
566 | do_delay(); | 560 | msleep(1); |
567 | if (chip->codec_not_ready_bits) | 561 | if (chip->codec_not_ready_bits) |
568 | break; | 562 | break; |
569 | } | 563 | } |
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 | } |