From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Ali5451 on HP VT6200 notebook not working Date: Fri, 29 Nov 2002 12:03:35 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200211211230.00392.lardel@interia.pl> <200211291119.41218.lardel@interia.pl> <200211291147.25551.lardel@interia.pl> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Fri_Nov_29_12:03:35_2002-1" Return-path: In-Reply-To: <200211291147.25551.lardel@interia.pl> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Rafal Dejewski Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Nov_29_12:03:35_2002-1 Content-Type: text/plain; charset=US-ASCII At Fri, 29 Nov 2002 11:47:25 +0100, Rafal Dejewski wrote: > > On Friday 29 November 2002 11:29, you wrote: > > At Fri, 29 Nov 2002 11:19:40 +0100, > > > > looking at the code, ali5451 driver access the following three pci > > devices: > > > > 10b9:5451 ali5451 main chip > > 10b9:1533 pci southbridge, used for ac97 codec > > 10b9:7107 power management controller (which you don't have..) > ^^^^ > Shouldn't that be 10b9:7101? yep. > > > > please check the latter two devices and whether you have different > > ones with the same functions. > Here is mine 'lspci -n': > > 0:00.0 Class 0600: 10b9:1671 (rev 02) > 00:01.0 Class 0604: 10b9:5247 > 00:02.0 Class 0c03: 10b9:5237 (rev 03) > 00:04.0 Class 0401: 10b9:5451 (rev 02) > 00:06.0 Class 0680: 10b9:7101 > 00:07.0 Class 0601: 10b9:1533 > 00:08.0 Class 0200: 10ec:8139 (rev 10) > 00:09.0 Class 0280: 1260:3873 (rev 01) > 00:0a.0 Class 0607: 104c:ac50 (rev 02) > 00:0b.0 Class 0780: 125d:2838 (rev 01) > 00:0f.0 Class 0101: 10b9:5229 (rev c4) > 01:00.0 Class 0300: 1002:4c59 ok, the devices are there. i think it's a bug of the driver, which assumes the order of devices from 1533 -> 7101. please try the patch attached (to cvs). ciao, Takashi --Multipart_Fri_Nov_29_12:03:35_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="ali-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-kernel/pci/ali5451/ali5451.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ali5451/ali5451.c,v retrieving revision 1.19 diff -u -r1.19 ali5451.c --- alsa-kernel/pci/ali5451/ali5451.c 30 Oct 2002 17:24:48 -0000 1.19 +++ alsa-kernel/pci/ali5451/ali5451.c 29 Nov 2002 11:00:30 -0000 @@ -529,7 +529,7 @@ udelay(5000); } - return -1; + return 0; } #ifdef CODEC_RESET @@ -1999,14 +1999,10 @@ if (codec->revision == ALI_5451_V02) { pci_dev = codec->pci_m1533; - if (pci_dev == NULL) - return -1; pci_read_config_byte(pci_dev, 0x59, &temp); - pci_dev = pci_find_device(0x10b9,0x7101, pci_dev); - if (pci_dev == NULL) - return -1; - pci_read_config_byte(pci_dev,0xb8,&temp); + pci_dev = codec->pci_m7101; + pci_read_config_byte(pci_dev, 0xb8, &temp); temp |= 1 << 6; pci_write_config_byte(pci_dev, 0xB8, temp); } @@ -2139,10 +2135,22 @@ codec->chregs.data.aint = 0x00; codec->chregs.data.ainten = 0x00; - pci_dev = pci_find_device(0x10b9,0x1533, pci_dev); + /* M1533: southbridge */ + pci_dev = pci_find_device(0x10b9, 0x1533, NULL); codec->pci_m1533 = pci_dev; - pci_dev = pci_find_device(0x10b9,0x7101, pci_dev); + if (! codec->pci_m1533) { + snd_printk(KERN_ERR "ali5451: cannot find ALi 1533 chip.\n"); + snd_ali_free(codec); + return -ENODEV; + } + /* M7101: power management */ + pci_dev = pci_find_device(0x10b9, 0x7101, NULL); codec->pci_m7101 = pci_dev; + if (! codec->pci_m7101) { + snd_printk(KERN_ERR "ali5451: cannot find ALi 7101 chip.\n"); + snd_ali_free(codec); + return -ENODEV; + } snd_ali_printk("snd_device_new is called.\n"); if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, codec, &ops)) < 0) { --Multipart_Fri_Nov_29_12:03:35_2002-1-- ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en