* Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard
@ 2006-03-11 19:28 Johannes Goecke
2006-03-12 3:41 ` Lee Revell
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Goecke @ 2006-03-11 19:28 UTC (permalink / raw)
To: Linux-Kernel
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
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
[-- Attachment #2: patch-msi-k8t-neo2fir-soundcard --]
[-- Type: text/plain, Size: 1470 bytes --]
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard
2006-03-11 19:28 Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard Johannes Goecke
@ 2006-03-12 3:41 ` Lee Revell
2006-03-13 7:57 ` Johannes Goecke
0 siblings, 1 reply; 6+ messages in thread
From: Lee Revell @ 2006-03-12 3:41 UTC (permalink / raw)
To: Johannes Goecke; +Cc: Linux-Kernel
On Sat, 2006-03-11 at 20:28 +0100, Johannes Goecke wrote:
> - 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?
>
This has been discussed on LKML recently, it's not 2.6.16 material
because it might break working setups when the previously disabled
device becomes the default sound card. Of course the same setup would
have broken if we added a driver for a previously unsupported soundcard,
so I'm not sure how this fits in with the "don't break userspace" rule.
IMHO it should be merged post 2.6.16.
Lee
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard
2006-03-12 3:41 ` Lee Revell
@ 2006-03-13 7:57 ` Johannes Goecke
2006-03-13 8:14 ` Jan-Benedict Glaw
2006-03-13 17:02 ` Lee Revell
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Goecke @ 2006-03-13 7:57 UTC (permalink / raw)
To: Linux-Kernel
On Sat, Mar 11, 2006 at 10:41:29PM -0500, Lee Revell wrote:
> On Sat, 2006-03-11 at 20:28 +0100, Johannes Goecke wrote:
> > - 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?
> >
>
> This has been discussed on LKML recently, it's not 2.6.16 material
> because it might break working setups when the previously disabled
> device becomes the default sound card. Of course the same setup would
> have broken if we added a driver for a previously unsupported soundcard,
> so I'm not sure how this fits in with the "don't break userspace" rule.
would it be useful to add a compile-time-option and additionally
a kernel-command-line option for some bogus-code like
if ( commandline-enable || compiletime-enable )
{
/* Enable all Soundcards- Found */
}
?
- no default behaviour is changed
- general purpose Kernels can have Quirks integrated if needed
>
> IMHO it should be merged post 2.6.16.
>
> Lee
>
Johannes Goecke
PS:
can someone give me a (kernel-programming-beginner-level) hint, for the first
question how to ensure to only execute if running on the right Mother-board?
Af far as I believe the quirk so-far only checks the cipset, so it might
behave wrong on other Mainborads!
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard
2006-03-13 7:57 ` Johannes Goecke
@ 2006-03-13 8:14 ` Jan-Benedict Glaw
2006-03-13 17:02 ` Lee Revell
1 sibling, 0 replies; 6+ messages in thread
From: Jan-Benedict Glaw @ 2006-03-13 8:14 UTC (permalink / raw)
To: Linux-Kernel; +Cc: Johannes Goecke
[-- Attachment #1: Type: text/plain, Size: 1984 bytes --]
On Mon, 2006-03-13 08:57:42 +0100, Johannes Goecke <goecke@upb.de> wrote:
> On Sat, Mar 11, 2006 at 10:41:29PM -0500, Lee Revell wrote:
> > On Sat, 2006-03-11 at 20:28 +0100, Johannes Goecke wrote:
> > This has been discussed on LKML recently, it's not 2.6.16 material
> > because it might break working setups when the previously disabled
> > device becomes the default sound card. Of course the same setup would
> > have broken if we added a driver for a previously unsupported soundcard,
> > so I'm not sure how this fits in with the "don't break userspace" rule.
>
> would it be useful to add a compile-time-option and additionally
> a kernel-command-line option for some bogus-code like
>
> if ( commandline-enable || compiletime-enable )
> {
> /* Enable all Soundcards- Found */
> }
Well, the whole collection of Quirks isn't based on a device-type
model, but purely on IDs. So either there's a workaround for some
oddity, or there isn't.
Though it may make sense to re-submit if right after 2.6.16 is out.
> can someone give me a (kernel-programming-beginner-level) hint, for the first
> question how to ensure to only execute if running on the right Mother-board?
> Af far as I believe the quirk so-far only checks the cipset, so it might
> behave wrong on other Mainborads!
That depends on wether the soundchip is inside the chipset. If it is,
you can just ignore that and run the quirk if the proper device was
found (as you do it right now.) If you really need to verify the
mainboard (as per name/vendor), have a look at
./arch/i386/kernel/{reboot,apm}.c . They both are DMI users.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
für einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard
2006-03-13 7:57 ` Johannes Goecke
2006-03-13 8:14 ` Jan-Benedict Glaw
@ 2006-03-13 17:02 ` Lee Revell
1 sibling, 0 replies; 6+ messages in thread
From: Lee Revell @ 2006-03-13 17:02 UTC (permalink / raw)
To: Johannes Goecke; +Cc: Linux-Kernel
On Mon, 2006-03-13 at 08:57 +0100, Johannes Goecke wrote:
> can someone give me a (kernel-programming-beginner-level) hint, for
> the first
> question how to ensure to only execute if running on the right
> Mother-board?
> Af far as I believe the quirk so-far only checks the cipset, so it
> might
> behave wrong on other Mainborads!
I believe a proper fix was already posted for this, the thread was
called:
[PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
Simply add your board to the IDs.
Lee
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <5Pi6J-1yd-1@gated-at.bofh.it>]
end of thread, other threads:[~2006-03-13 17:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-11 19:28 Patch: MSI-K8T-Neo2-Fir OnboardSound and additional Soundcard Johannes Goecke
2006-03-12 3:41 ` Lee Revell
2006-03-13 7:57 ` Johannes Goecke
2006-03-13 8:14 ` Jan-Benedict Glaw
2006-03-13 17:02 ` Lee Revell
[not found] <5Pi6J-1yd-1@gated-at.bofh.it>
[not found] ` <5PpKN-48S-7@gated-at.bofh.it>
[not found] ` <5PQ8u-qa-17@gated-at.bofh.it>
2006-03-13 9:23 ` Bodo Eggert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox