[alsa-devel] [alsa-cvslog] alsa-kernel: Official ALSA project GIT repository for Linux 2.6 branch, master now at v2.6.27-rc5-122-g1328f04
Takashi Iwai
tiwai at suse.de
Fri Aug 29 12:18:55 CEST 2008
At Fri, 29 Aug 2008 11:35:25 +0200 (CEST),
noreply-git at alsa-project.org wrote:
>
> commit 1328f04260822e45a2717b65a0e2bc0c9c1255be
> Author: Jaroslav Kysela <perex at perex.cz>
> AuthorDate: Fri Aug 29 11:29:39 2008 +0200
> Commit: Jaroslav Kysela <perex at perex.cz>
> CommitDate: Fri Aug 29 11:29:39 2008 +0200
>
> ALSA: intel8x0: implement ac97_clock whitelist
>
> The AC97 clock detection is not accurate in some cases. This patch adds
> an initial whitelist for audio devices gathered from RedHat's bugzilla:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=441087
>
> As a side effect, white-listing might speedup kernel booting (AC97 clock
> measuring code is not activated).
>
> Signed-off-by: Jaroslav Kysela <perex at perex.cz>
(snip)
> +struct intel8x0_clock_list {
> + unsigned short subvendor;
> + unsigned short subdevice;
> + unsigned int rate;
> +};
> +
> +static struct intel8x0_clock_list intel8x0_clock_list[] __devinitdata = {
> + { 0x1028, 0x00be, 44100 }, /* Analog Devices AD1885 */
> + { 0x1028, 0x0177, 48000 }, /* Analog Devices AD1980 */
> + { 0x1043, 0x80f3, 48000 }, /* Analog Devices AD1985 */
> + { 0x0000, 0x0000, 00000 } /* terminator */
> +};
> +
> +static int __devinit intel8x0_in_clock_list(struct intel8x0 *chip)
> +{
> + struct pci_dev *pci = chip->pci;
> + struct intel8x0_clock_list *wl;
> +
> + for (wl = intel8x0_clock_list; wl->subvendor; wl++) {
> + if (wl->subvendor == pci->subsystem_vendor &&
> + wl->subdevice == pci->subsystem_device) {
> + printk(KERN_INFO "intel8x0: white list rate for %04x:%04x is %i\n",
> + pci->subsystem_vendor,
> + pci->subsystem_device, wl->rate);
> + chip->ac97_bus->clock = wl->rate;
> + return 1;
> + }
> + }
> + return 0;
> +}
Use snd_pci_quirk_lookup() please.
But, a better fix would be to fix the clock measurement.
AFAIK, this seems to happen when the driver is built-in. Thus I guess
it's rather a problem of time-keeping core side.
Takashi
More information about the Alsa-devel
mailing list