From: Takashi Iwai Subject: Re: [alsa-cvslog] alsa-kernel: Official ALSA project GIT repository for Linux 2.6 branch, master now at v2.6.27-rc5-122-g1328f04 Date: Fri, 29 Aug 2008 12:18:55 +0200 Message-ID: References: <20080829093525.90674245C1@alsa0.perex.cz> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 08DF224480 for ; Fri, 29 Aug 2008 12:18:56 +0200 (CEST) In-Reply-To: <20080829093525.90674245C1@alsa0.perex.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: perex@perex.cz Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 29 Aug 2008 11:35:25 +0200 (CEST), noreply-git@alsa-project.org wrote: > > commit 1328f04260822e45a2717b65a0e2bc0c9c1255be > Author: Jaroslav Kysela > AuthorDate: Fri Aug 29 11:29:39 2008 +0200 > Commit: Jaroslav Kysela > 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 (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