Commit 248e8824 authored by Takashi Iwai's avatar 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
parents bc8d489c 30fd9940
...@@ -2122,7 +2122,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, ...@@ -2122,7 +2122,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
} }
/* nothing should be in powerdown mode */ /* nothing should be in powerdown mode */
snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0); snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0);
end_time = jiffies + msecs_to_jiffies(100); end_time = jiffies + msecs_to_jiffies(120);
do { do {
if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f) if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f)
goto __ready_ok; goto __ready_ok;
......
...@@ -2751,11 +2751,12 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2751,11 +2751,12 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
if (pos == 0) { if (pos == 0) {
snd_printk(KERN_ERR "intel8x0: measure - unreliable DMA position..\n"); snd_printk(KERN_ERR "intel8x0: measure - unreliable DMA position..\n");
__retry: __retry:
if (attempt < 2) { if (attempt < 3) {
msleep(300);
attempt++; attempt++;
goto __again; goto __again;
} }
return; goto __end;
} }
pos /= 4; pos /= 4;
...@@ -2782,6 +2783,7 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2782,6 +2783,7 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
else if (pos < 47500 || pos > 48500) else if (pos < 47500 || pos > 48500)
/* not 48000Hz, tuning the clock.. */ /* not 48000Hz, tuning the clock.. */
chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos;
__end:
printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock); printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock);
snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment