From: Takashi Iwai <tiwai@suse.de>
To: Fedor Karpelevitch <fedor@apache.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
lkml <linux-kernel@vger.kernel.org>,
Vicente Aguilar <bisente@bisente.com>,
alsa-devel@lists.sourceforge.net,
Debian-Laptops <debian-laptop@lists.debian.org>
Subject: Re: Re: [2.4]ALi M5451 sound hangs on init; workaround
Date: Wed, 11 Dec 2002 19:34:00 +0100 [thread overview]
Message-ID: <s5hel8o76cn.wl@alsa2.suse.de> (raw)
In-Reply-To: <200212110852.42778.fedor@apache.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
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Fedor Karpelevitch <fedor@apache.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
lkml <linux-kernel@vger.kernel.org>,
Vicente Aguilar <bisente@bisente.com>,
alsa-devel@lists.sourceforge.net,
Debian-Laptops <debian-laptop@lists.debian.org>
Subject: Re: [Alsa-devel] Re: [2.4]ALi M5451 sound hangs on init; workaround
Date: Wed, 11 Dec 2002 19:34:00 +0100 [thread overview]
Message-ID: <s5hel8o76cn.wl@alsa2.suse.de> (raw)
In-Reply-To: <200212110852.42778.fedor@apache.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
next prev parent reply other threads:[~2002-12-11 18:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-11 15:15 [2.4]ALi M5451 sound hangs on init; workaround Fedor Karpelevitch
2002-12-11 16:35 ` Alan Cox
2002-12-11 16:48 ` Alan Cox
2002-12-11 16:52 ` Fedor Karpelevitch
2002-12-11 16:52 ` Fedor Karpelevitch
2002-12-11 18:34 ` Takashi Iwai [this message]
2002-12-11 18:34 ` [Alsa-devel] " Takashi Iwai
2002-12-11 18:36 ` Fedor Karpelevitch
2002-12-11 18:36 ` Fedor Karpelevitch
2002-12-11 19:39 ` Alan Cox
2002-12-11 19:42 ` Fedor Karpelevitch
2002-12-11 19:42 ` Fedor Karpelevitch
2002-12-11 21:12 ` Alan Cox
2002-12-13 15:10 ` [PATCH]Re: " Fedor Karpelevitch
2002-12-13 16:13 ` Fedor Karpelevitch
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=s5hel8o76cn.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=bisente@bisente.com \
--cc=debian-laptop@lists.debian.org \
--cc=fedor@apache.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.