Subject: patch to "auich.c" driver enables Intel i82801DCM (AC97) audio to work great!
To: None <rumble@ephemeral.org>
From: Alicia da Conceicao <alicia@engine.ca>
List: port-i386
Date: 12/24/2003 10:42:00
> The auich.c driver has a special register mapping circumstance
> for i82801DC and i82801EB chips. I googled a bit to see if
> anybody had success with these chips and apparently somebody did
> with 1.6.1 by just adding the new ID (not utilising the new
> registers):
> http://mail-index.netbsd.org/port-i386/2003/06/03/0015.html
> The OpenBSD guys appear to do this as well as FreeBSD 4.7,
> although FreeBSD explicitly enables a legacy mode and
> OpenBSD has a codec ready state workaround for msi boards.
> FreeBSD-current appears to do the same thing as netbsd-current.
> Supplied is a patch against -current's auich.c that should map the
> old ich3 registers. I don't know much about this device, but
> it may be worth a shot.

Dear Steve:

Thank you, thank you, thank you!  The patch you provided below now
enables the "auich0" driver to work with my Intel i82801DCM chipset!
Now I am able to listen to my MP3's on my laptop.  ;^)  Below are
an excerpt of the kernel boot messages for the auich driver:

===================================================================
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at ioapic0 pin 17 (irq 0)
auich0: The 2nd codec is ready.
auich0: ac97: Analog Devices AD1885 codec; headphone, Analog Devices Phat Stereo
auich0: ac97: ext id 1<VRA>
===================================================================

Basically that patch to the "auich0" driver in "sys/dev/pci/auich.c"
was to prevent my PCI_PRODUCT_INTEL_82801DB_AC chipset from using
the native mode for ICH4/ICH5.

Are there any other NetBSD users who have i82801DCM audio chipset
and are able to get the auich audio driver to work without the patch?
If not, then the change implimented by the patch should be applied
to current ASAP!

Thanks again, and thanks in advance.
Alicia.

PS. Now the remaining critical NetBSD functionality I still urgently
	need for my laptop is some type of ACPI suspend (like APM's
	zzz), and a driver for the built-in Intel PRO/Wireless LAN
	2100 3B Mini PCI Adapter.

===================================================================
Index: auich.c
RCS file: /cvsroot/src/sys/dev/pci/auich.c,v
retrieving revision 1.55
diff -u -r1.55 auich.c
--- auich.c	2003/11/22 08:49:41	1.55
+++ auich.c	2003/12/20 18:02:08
@@ -409,9 +409,9 @@
 
 	aprint_normal(": %s\n", d->name);
 
-	if ((d->vendor == PCI_VENDOR_INTEL
+	if (/*(d->vendor == PCI_VENDOR_INTEL
 	     && d->product == PCI_PRODUCT_INTEL_82801DB_AC)
-	    || (d->vendor == PCI_VENDOR_INTEL
+	    ||*/ (d->vendor == PCI_VENDOR_INTEL
 		&& d->product == PCI_PRODUCT_INTEL_82801EB_AC)) {
 		/*
 		 * Use native mode for ICH4/ICH5
===================================================================