From: Takashi Iwai <tiwai@suse.de>
To: Michal Rokos <m.rokos@sh.cvut.cz>
Cc: linux-kernel@vger.kernel.org, alsa-devel@lists.sourceforge.net
Subject: Re: Alsa vs ALi5451
Date: Wed, 30 Oct 2002 18:37:15 +0100 [thread overview]
Message-ID: <s5hk7jzbzg4.wl@alsa2.suse.de> (raw)
In-Reply-To: <20021029214043.GA28410@nightmare.sh.cvut.cz>
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
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
[-- Attachment #2: ali5451-free-fix.dif --]
[-- Type: application/octet-stream, Size: 1485 bytes --]
--- 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");
next prev parent reply other threads:[~2002-10-30 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-29 21:40 Alsa vs ALi5451 Michal Rokos
2002-10-30 17:37 ` Takashi Iwai [this message]
2002-11-01 12:31 ` Michal Rokos
2002-11-01 12:54 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hk7jzbzg4.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=m.rokos@sh.cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox