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, 30 Oct 2002 12:30:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 30 Oct 2002 12:30:52 -0500 Received: from ns.suse.de ([213.95.15.193]:57871 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id ; Wed, 30 Oct 2002 12:30:50 -0500 Date: Wed, 30 Oct 2002 18:37:15 +0100 Message-ID: From: Takashi Iwai To: Michal Rokos Cc: linux-kernel@vger.kernel.org, alsa-devel@lists.sourceforge.net Subject: Re: Alsa vs ALi5451 In-Reply-To: <20021029214043.GA28410@nightmare.sh.cvut.cz> References: <20021029214043.GA28410@nightmare.sh.cvut.cz> 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: multipart/mixed; boundary="Multipart_Wed_Oct_30_18:37:14_2002-1" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --Multipart_Wed_Oct_30_18:37:14_2002-1 Content-Type: text/plain; charset=US-ASCII Hi, At Tue, 29 Oct 2002 22:40:43 +0100, Michal Rokos wrote: > > Hi, > > I'm having problem with ALi5451 audio chipset. > > Insmod segfaults and lsmod says that initializing the snd-ali5451. The wierd is the OSS trident module is working just fine (with some limitation - I can't make it work throught the phones), but it's workin'. So I guess it's alsa problem. > > All that come to my mind that could be helpfull i attached. (syslog entry, alsa config, dmesg, lspci --v). > > Please, keep me in CC - I'm not on list. does the attached patch cure? Takashi --Multipart_Wed_Oct_30_18:37:14_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="ali5451-free-fix.dif" Content-Transfer-Encoding: 7bit --- linux/sound/pci/ali5451/ali5451.c 22 Oct 2002 09:37:30 -0000 1.18 +++ linux/sound/pci/ali5451/ali5451.c 30 Oct 2002 17:24:48 -0000 1.19 @@ -233,6 +233,7 @@ unsigned long port; unsigned char revision; + unsigned int hw_initialized: 1; struct resource *res_port; struct pci_dev *pci; @@ -1965,7 +1966,8 @@ static int snd_ali_free(ali_t * codec) { - snd_ali_disable_address_interrupt(codec); + if (codec->hw_initialized) + snd_ali_disable_address_interrupt(codec); if (codec->irq >= 0) { synchronize_irq(codec->irq); free_irq(codec->irq, (void *)codec); @@ -2036,13 +2038,11 @@ { snd_ali_printk("resouces allocation ...\n"); if ((codec->res_port = request_region(codec->port, 0x100, "ALI 5451")) == NULL) { - snd_ali_free(codec); snd_printk("Unalbe to request io ports.\n"); return -EBUSY; } if (request_irq(codec->pci->irq, snd_ali_card_interrupt, SA_INTERRUPT|SA_SHIRQ, "ALI 5451", (void *)codec)) { - snd_ali_free(codec); snd_printk("Unable to request irq.\n"); return -EBUSY; } @@ -2112,6 +2112,7 @@ pci_set_master(pci); if (snd_ali_resources(codec)) { + snd_ali_free(codec); return -EBUSY; } @@ -2156,7 +2157,6 @@ if ((err = snd_ali_chip_init(codec)) < 0) { snd_printk("ali create: chip init error.\n"); - snd_ali_free(codec); return err; } @@ -2167,6 +2167,7 @@ #endif snd_ali_enable_address_interrupt(codec); + codec->hw_initialized = 1; *r_ali = codec; snd_ali_printk("created.\n"); --Multipart_Wed_Oct_30_18:37:14_2002-1--