Commit 248e88247a0e03125a663be69f2656d2e158371e

Authored by Takashi Iwai

Merge commit 'alsa/master' into for-linus

* commit 'alsa/master':
  [ALSA] intel8x0: another attempt to fix ac97_clock measure routine
  [ALSA] ac97_codec: increase timeout for analog subsections

Showing 2 changed files Side-by-side Diff

sound/pci/ac97/ac97_codec.c
... ... @@ -2122,7 +2122,7 @@
2122 2122 }
2123 2123 /* nothing should be in powerdown mode */
2124 2124 snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0);
2125   - end_time = jiffies + msecs_to_jiffies(100);
  2125 + end_time = jiffies + msecs_to_jiffies(120);
2126 2126 do {
2127 2127 if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f)
2128 2128 goto __ready_ok;
sound/pci/intel8x0.c
... ... @@ -2751,11 +2751,12 @@
2751 2751 if (pos == 0) {
2752 2752 snd_printk(KERN_ERR "intel8x0: measure - unreliable DMA position..\n");
2753 2753 __retry:
2754   - if (attempt < 2) {
  2754 + if (attempt < 3) {
  2755 + msleep(300);
2755 2756 attempt++;
2756 2757 goto __again;
2757 2758 }
2758   - return;
  2759 + goto __end;
2759 2760 }
2760 2761  
2761 2762 pos /= 4;
... ... @@ -2782,6 +2783,7 @@
2782 2783 else if (pos < 47500 || pos > 48500)
2783 2784 /* not 48000Hz, tuning the clock.. */
2784 2785 chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos;
  2786 + __end:
2785 2787 printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock);
2786 2788 snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0);
2787 2789 }