From: Fedor Karpelevitch <fedor@karpelevitch.net>
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: [PATCH]Re: [2.4]ALi M5451 sound hangs on init; workaround
Date: Fri, 13 Dec 2002 08:13:49 -0800 [thread overview]
Message-ID: <200212130813.49925.fedor@karpelevitch.net> (raw)
In-Reply-To: <1039641154.18412.28.camel@irongate.swansea.linux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
On Среда 11 Декабрь 2002 13:12, Alan Cox wrote:
> On Wed, 2002-12-11 at 19:42, Fedor Karpelevitch wrote:
> > So I wonder what toggling those bits is supposed to change. I
> > would test that somehow then
>
> 6 channel audio mode
so here is the patch against 2.4.21-pre1 (I beleive it should equally
apply to 20-ac2)
It works for me and fixes all four occurences of that error in the
driver.
Fedor
[-- Attachment #2: patch-tridfix.txt --]
[-- Type: text/plain, Size: 1480 bytes --]
--- linux-2.4.21-pre1-tridfix/drivers/sound/trident.c.orig 2002-12-12 15:28:00.000000000 -0800
+++ linux-2.4.21-pre1-tridfix/drivers/sound/trident.c 2002-12-12 15:30:48.000000000 -0800
@@ -3368,15 +3368,17 @@
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_write_config_byte(pci_dev, 0x59, ~temp);
+ pci_read_config_byte(pci_dev, 0x59, &temp);
+ temp &= ~0x80;
+ 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_write_config_byte(pci_dev, 0xB8, ~temp);
+ pci_read_config_byte(pci_dev, 0xB8, &temp);
+ temp &= ~0x20;
+ pci_write_config_byte(pci_dev, 0xB8, temp);
return 0;
}
@@ -3390,13 +3392,15 @@
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_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, (int)0xB8, &temp);
+ temp |= 0x20;
pci_write_config_byte(pci_dev, (int)0xB8,(u8) temp);
if (chan_nums == 6) {
dwValue = inl(TRID_REG(card, ALI_SCTRL)) | 0x000f0000;
prev parent reply other threads:[~2002-12-13 16:13 UTC|newest]
Thread overview: 11+ 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 18:34 ` 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
2002-12-13 15:10 ` [PATCH]Re: " Fedor Karpelevitch
2002-12-13 16:13 ` Fedor Karpelevitch [this message]
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=200212130813.49925.fedor@karpelevitch.net \
--to=fedor@karpelevitch.net \
--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