From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 11 Dec 2002 13:26:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 11 Dec 2002 13:26:16 -0500 Received: from ns.suse.de ([213.95.15.193]:50956 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id ; Wed, 11 Dec 2002 13:26:15 -0500 Date: Wed, 11 Dec 2002 19:34:00 +0100 Message-ID: From: Takashi Iwai To: Fedor Karpelevitch Cc: Alan Cox , lkml , Vicente Aguilar , alsa-devel@lists.sourceforge.net, Debian-Laptops Subject: Re: [Alsa-devel] Re: [2.4]ALi M5451 sound hangs on init; workaround In-Reply-To: <200212110852.42778.fedor@apache.org> References: <200212110715.20617.fedor@apache.org> <1039625298.18087.61.camel@irongate.swansea.linux.org.uk> <200212110852.42778.fedor@apache.org> User-Agent: Wanderlust/2.6.1 (Upside Down) SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharajing=FE-mae?=) APEL/10.2 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 11 Dec 2002 08:52:42 -0800, Fedor Karpelevitch wrote: > > > > I have ALi M5451 souncard in my laptop (Compaq Presario 900z for > > > those searching) and it hangs the machine with any kernel I tried > > > (currently 2.4.20-ac1 + hirofumi patch). I traced it down to the > > > line where it hangs - that is drivers/sound/trident.c:3379 which > > > says: pci_write_config_byte(pci_dev, 0xB8, ~temp); > > > > Looking at the docs it looks like the code Matt Wu added may have > > been meant to do > > > > pci_read_config_byte(pci_dev, 0x59, temp) > > temp &= ~0x80 > > pci_write... > > > > just to make sure I got it right, is the following what you suggest? > (pseudo-patch): > > -------- > static int ali_close_multi_channels(void) > { > char temp = 0; > struct pci_dev *pci_dev = NULL; > > pci_dev =pci_find_device(PCI_VENDOR_ID_AL,PCI_DEVICE_ID_AL_M1533, > pci_dev); > if (pci_dev == NULL) > return -1; > - temp = 0x80; > + pci_read_config_byte(pci_dev, 0x59, temp); > + temp &= ~0x80; > - pci_write_config_byte(pci_dev, 0x59, ~temp); > + pci_write_config_byte(pci_dev, 0x59, temp); > > pci_dev = pci_find_device(PCI_VENDOR_ID_AL, > PCI_DEVICE_ID_AL_M7101, pci_dev); > if (pci_dev == NULL) > return -1; > > - temp = 0x20; > + pci_read_config_byte(pci_dev, 0xB8, temp); > + temp &= ~0x20 > - pci_write_config_byte(pci_dev, 0xB8, ~temp); // the line I > + pci_write_config_byte(pci_dev, 0xB8, temp); //commented out > > return 0; > } > --------------------- and don't forget to change similary for ali_setup_multi_channels(), too. > > > > (Ditto with fixing setup_multi_cannnels) > > Takashi