Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello *, 
	 
	  i have a small patch for a Problem that i had.

On the MSI-K8T-NEO2 FIR ( Athlon-64, Socket 939 with VIA-K8T800- Chipset 
and onboard Sound,... ) the BIOS lets you choose "DISABLED" or "AUTO" 
for the On-Board Sound Device.

If you add another PCI-Sound-Card the BIOS disables the on-board device.

So far I have a Quirk, that does set the correspondent BIT in the PCI-registers
to enable the soundcard. 

But i have another 2 problems:

- how to enshure that the code is executed ONLY on excactly this kind of boards
 (not any other with similar Chipset)?

- what to do to (hopefully) integrate that pice of code into
  one of the next Kernel Releases?


Johannes Goecke

diff -u -r linux-2.6.15.6/drivers/pci/quirks.c linux-2.6.15.6-jg/drivers/pci/quirks.c
--- linux-2.6.15.6/drivers/pci/quirks.c	2006-03-05 20:07:54.000000000 +0100
+++ linux-2.6.15.6-jg/drivers/pci/quirks.c	2006-03-09 13:05:06.000000000 +0100
@@ -861,6 +861,41 @@
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82375,	quirk_eisa_bridge );
 
+/* 
+ * On the MSI-K8T-Neo2Fir Board, the internal Soundcard is disabled
+ * when a PCI-Soundcard is added. The BIOS only gives Options 
+ * "Disabled" and "AUTO". This Quirk Sets the corresponding
+ * Register-Value to enable the Soundcard.
+ */
+static void __init k8t_sound_hostbridge(struct pci_dev *dev) 
+{
+	printk(KERN_INFO "PCI: Quirk-MSI-K8T Soundcard On\n");
+
+	unsigned char val;
+
+	pci_read_config_byte(dev, 0x50, &val);
+
+	if ((val == 0x88) || (val == 0xc8)) {
+		pci_write_config_byte(dev, 0x50, val & (~0x40));
+
+		/* Verify the Change for Status output */
+		pci_read_config_byte(dev, 0x50, &val);
+		if (val & 0x40)
+			printk(KERN_INFO "PCI: MSI-K8T soundcard still off\n");
+		else
+			printk(KERN_INFO "PCI: MSI-K8T soundcard on\n");
+	} else {
+		printk(KERN_INFO "PCI: Unexpected Value in PCI-Register : no Change!\n");
+	}
+
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,	k8t_sound_hostbridge );
+
+
 /*
  * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
  * is not activated. The myth is that Asus said that they do not want the

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux