Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv16339/pci/ac97
Modified Files: ac97_codec.c Log Message: Added ac97->pci to allow quirks inside ac97_codec module Index: ac97_codec.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- ac97_codec.c 27 Mar 2003 12:39:46 -0000 1.80 +++ ac97_codec.c 1 Apr 2003 13:50:29 -0000 1.81 @@ -2149,6 +2149,12 @@ ac97->card = card; spin_lock_init(&ac97->reg_lock); + ac97->pci = _ac97->pci; + if (ac97->pci) { + pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor); + pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device); + } + if (ac97->reset) { ac97->reset(ac97); goto __access_ok; @@ -2792,7 +2798,6 @@ /** * snd_ac97_tune_hardware - tune up the hardware * @ac97: the ac97 instance - * @pci: pci device * @quirk: quirk list * * Do some workaround for each pci device, such as renaming of the @@ -2802,17 +2807,12 @@ * Returns zero if successful, or a negative error code on failure. */ -int snd_ac97_tune_hardware(ac97_t *ac97, struct pci_dev *pci, struct ac97_quirk *quirk) +int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk) { - unsigned short vendor, device; - snd_assert(quirk, return -EINVAL); - pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &vendor); - pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &device); - for (; quirk->vendor; quirk++) { - if (quirk->vendor == vendor && quirk->device == device) { + if (quirk->vendor == ac97->subsystem_vendor && quirk->device == ac97->subsystem_device) { snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, vendor, device); switch (quirk->type) { case AC97_TUNE_HP_ONLY: ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog