public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
@ 2006-03-05 19:27 bjd
  2006-03-05 19:34 ` Dave Jones
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: bjd @ 2006-03-05 19:27 UTC (permalink / raw)
  To: linux-kernel

From: Bauke Jan Douma <bjdouma@xs4all.nl>

On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
and MC97 modem controller are deactivated when a second PCI soundcard
is present.  This patch enables them.

Signed-off-by: Bauke Jan Douma <bjdouma@xs4all.nl>

---

When a PCI soundcard is present in an Asus A8V or A8V Deluxe system, the
BIOS will disable the onboard AC97 and MC97 devices.  This patch enables
them.  The soundcard now works on my A8V Deluxe, shows up in lspci output,
in /proc/asound/cards, has mixer controls, plays audio, on both 32 bits
and 64 bits systems.
Patch is against 2.6.16-rc3.


--- ./linux-2.6.16-rc3/drivers/pci/quirks.c.orig	2006-02-28 00:54:47.000000000
+0100
+++ ./linux-2.6.16-rc3/drivers/pci/quirks.c	2006-02-28 21:34:46.000000000 +0100
@@ -1074,6 +1074,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,
 quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,
 quirk_sis_96x_smbus );

+/*
+ * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
+ * and MC97 modem controller are disabled when a second PCI soundcard is
+ * present. This patch, tweaking the VT8237 ISA bridge, enables them.
+ * -- bjd
+ */
+static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
+{
+	u8 val;
+	int asus_hides_ac97 = 0;
+
+	if (likely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
+		if (dev->device == PCI_DEVICE_ID_VIA_8237)
+			asus_hides_ac97 = 1;
+	}
+
+	if (!asus_hides_ac97)
+		return;
+
+	pci_read_config_byte(dev, 0x50, &val);
+	if (val & 0xc0) {
+		pci_write_config_byte(dev, 0x50, val & (~0xc0));
+		pci_read_config_byte(dev, 0x50, &val);
+		if (val & 0xc0)
+			printk(KERN_INFO "PCI: onboard AC97/MC97 devices continue to
play 'hide and seek'! 0x%x\n", val);
+		else
+			printk(KERN_INFO "PCI: enabled onboard AC97/MC97 devices\n");
+	}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,
asus_hides_ac97_lpc );
+
 #ifdef CONFIG_X86_IO_APIC
 static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 {

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
@ 2006-03-05 12:37 Bauke jan Douma
  0 siblings, 0 replies; 28+ messages in thread
From: Bauke jan Douma @ 2006-03-05 12:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel

From: Bauke Jan Douma <bjdouma@xs4all.nl>

On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
and MC97 modem controller are deactivated when a second PCI soundcard
is present.  This patch enables them.

Signed-off-by: Bauke Jan Douma <bjdouma@xs4all.nl>

---

When a PCI soundcard is present in an Asus A8V or A8V Deluxe system, the
BIOS will disable the onboard AC97 and MC97 devices.  This patch enables
them.  The soundcard now works on my A8V Deluxe, shows up in lspci output,
in /proc/asound/cards, has mixer controls, plays audio, on both 32 bits
and 64 bits systems.
Patch is against 2.6.16-rc3.


--- ./linux-2.6.16-rc3/drivers/pci/quirks.c.orig	2006-02-28 00:54:47.000000000 +0100
+++ ./linux-2.6.16-rc3/drivers/pci/quirks.c	2006-02-28 21:34:46.000000000 +0100
@@ -1074,6 +1074,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,		quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,		quirk_sis_96x_smbus );
 
+/*
+ * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
+ * and MC97 modem controller are disabled when a second PCI soundcard is
+ * present. This patch, tweaking the VT8237 ISA bridge, enables them.
+ * -- bjd
+ */
+static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
+{
+	u8 val;
+	int asus_hides_ac97 = 0;
+
+	if (likely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
+		if (dev->device == PCI_DEVICE_ID_VIA_8237)
+			asus_hides_ac97 = 1;
+	}
+
+	if (!asus_hides_ac97)
+		return;	
+
+	pci_read_config_byte(dev, 0x50, &val);
+	if (val & 0xc0) {
+		pci_write_config_byte(dev, 0x50, val & (~0xc0));
+		pci_read_config_byte(dev, 0x50, &val);
+		if (val & 0xc0)
+			printk(KERN_INFO "PCI: onboard AC97/MC97 devices continue to play 'hide and seek'! 0x%x\n", val);
+		else
+			printk(KERN_INFO "PCI: enabled onboard AC97/MC97 devices\n");
+	}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc );
+
 #ifdef CONFIG_X86_IO_APIC
 static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 {

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
@ 2006-02-12  2:22 bjd
  0 siblings, 0 replies; 28+ messages in thread
From: bjd @ 2006-02-12  2:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel

From: Bauke Jan Douma <bjdouma@xs4all.nl>

On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
and MC97 modem controller are deactivated when a second PCI soundcard
is present.  This patch enables them.

Signed-off-by: Bauke Jan Douma <bjdouma@xs4all.nl>

---

When a PCI soundcard is present in an Asus A8V or A8V Deluxe system, the
BIOS will disable the onboard AC97 and MC97 devices.  This patch enables
them.  The soundcard now works on my A8V Deluxe, shows up in lspci output,
in /proc/asound/cards, has mixer controls, plays audio.
Patch is against 2.6.15 proper.

--- linux/drivers/pci/quirks.c.orig	2006-01-04 03:05:39.000000000 +0100
+++ linux/drivers/pci/quirks.c	2006-02-12 03:12:56.000000000 +0100
@@ -1074,6 +1074,42 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,		quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,		quirk_sis_96x_smbus );
 
+/*
+ * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
+ * and MC97 modem controller are disabled when a second PCI soundcard is
+ * present. This patch, tweaking the VT8237 ISA bridge, enables them.
+ * -- bjd
+ */
+static int __initdata asus_hides_ac97 = 0;
+
+static void __init asus_hides_ac97_device(struct pci_dev *dev)
+{
+	if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
+		if (dev->device == PCI_DEVICE_ID_VIA_8237)
+				asus_hides_ac97 = 1;
+			}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_device );
+
+static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
+{
+	u8 val;
+	
+	if (likely(!asus_hides_ac97))
+		return;
+
+	pci_read_config_byte(dev, 0x50, &val);
+	if (val & 0xc0) {
+		pci_write_config_byte(dev, 0x50, val & (~0xc0));
+		pci_read_config_byte(dev, 0x50, &val);
+		if (val & 0xc0)
+			printk(KERN_INFO "PCI: onboard AC97/MC97 devices continue to play 'hide and seek'! 0x%x\n", val);
+		else
+			printk(KERN_INFO "PCI: enabled onboard AC97/MC97 devices\n");
+	}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,	asus_hides_ac97_lpc );
+
 #ifdef CONFIG_X86_IO_APIC
 static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 {

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2006-03-19 18:45 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-05 19:27 [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards bjd
2006-03-05 19:34 ` Dave Jones
2006-03-05 20:32 ` Lee Revell
2006-03-06  9:34   ` Jan-Benedict Glaw
2006-03-05 21:24 ` Måns Rullgård
2006-03-11 19:49   ` Måns Rullgård
2006-03-17 10:38 ` Andras Mantia
2006-03-17 14:33   ` Jan-Benedict Glaw
2006-03-17 14:43     ` Andras Mantia
2006-03-17 14:49       ` Jan-Benedict Glaw
2006-03-17 18:18         ` Andras Mantia
2006-03-17 19:29           ` Måns Rullgård
2006-03-18 14:01             ` Andras Mantia
2006-03-18 14:23               ` Måns Rullgård
2006-03-18 15:00                 ` Andras Mantia
2006-03-18 15:58                   ` Måns Rullgård
2006-03-19 10:38                     ` Andras Mantia
2006-03-19 12:58                       ` Måns Rullgård
2006-03-19 15:11                         ` Andras Mantia
2006-03-19 16:35                           ` Måns Rullgård
2006-03-19 17:38                             ` Andras Mantia
2006-03-19 18:03                               ` Måns Rullgård
2006-03-19 18:18                                 ` Andras Mantia
2006-03-19 18:36                                   ` Måns Rullgård
2006-03-19 18:44                                     ` Andras Mantia
2006-03-17 19:15       ` Måns Rullgård
  -- strict thread matches above, loose matches on Subject: below --
2006-03-05 12:37 Bauke jan Douma
2006-02-12  2:22 bjd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox