public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fedor Karpelevitch <fedor@apache.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: 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: [2.4]ALi M5451 sound hangs on init; workaround
Date: Wed, 11 Dec 2002 08:52:42 -0800	[thread overview]
Message-ID: <200212110852.42778.fedor@apache.org> (raw)
In-Reply-To: <1039625298.18087.61.camel@irongate.swansea.linux.org.uk>

> > 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;
}
---------------------
I'll try it and will tell you what the result is. Anyway, what are 
those commands doing, i.e. what am I loosing when I comment it out? 
Is there some specific functionality I should test to see the result 
of these changes?

> and similarly for the other port
>
> (Ditto with fixing setup_multi_cannnels)
>
> Does it work sanely with those fixd ?

  reply	other threads:[~2002-12-11 16:49 UTC|newest]

Thread overview: 9+ 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 [this message]
2002-12-11 18:34     ` [Alsa-devel] " Takashi Iwai
2002-12-11 18:36     ` Fedor Karpelevitch
2002-12-11 19:39       ` Alan Cox
2002-12-11 19:42         ` Fedor Karpelevitch
2002-12-11 21:12           ` Alan Cox

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=200212110852.42778.fedor@apache.org \
    --to=fedor@apache.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=bisente@bisente.com \
    --cc=debian-laptop@lists.debian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox