Subject: kern/11910: ess1688 patch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <takashi.yamamoto@bigfoot.com>
List: netbsd-bugs
Date: 01/07/2001 13:18:13
>Number: 11910
>Category: kern
>Synopsis: ess1688 patch
>Confidential: yes
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jan 07 13:18:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 1.5Q
>Organization:
>Environment:
System: NetBSD neko 1.5Q NetBSD 1.5Q (560) #10: Mon Jan 8 05:48:06 JST 2001 takashi@neko:/usr/home/takashi/netbsd/current/src/sys/arch/i386/compile/560 i386
Architecture: i386
Machine: i386
>Description:
this patch just makes ess driver handle ess1688.
I'm not sure because I don't have data sheets,
but it seems to work on my Thinkpad 560E which has ess1688.
>How-To-Repeat:
>Fix:
--- /sys/dev/isa/bak/ess.c Fri Dec 29 14:56:35 2000
+++ /sys/dev/isa/ess.c Mon Jan 8 05:47:52 2001
@@ -193,6 +193,7 @@
"1879",
"1868",
"1878",
+ "1688",
};
struct audio_device ess_device = {
@@ -660,6 +661,14 @@
ess_write_mix_reg(sc, ESS_MREG_VOLUME_CTRL, reg2);
if (ess_read_mix_reg(sc, ESS_MREG_VOLUME_CTRL) != reg2) {
+ /*
+ * it has no h/w volume, so maybe ESS1688.
+ */
+ if (sc->sc_version == 0x688b) {
+ sc->sc_model = ESS_1688;
+ return 0;
+ }
+
printf("ess: Hardware error (unable to toggle bit 2 of mixer register 0x64)\n");
return 1;
}
--- /sys/dev/isa/bak/essreg.h Tue Jun 29 09:04:49 1999
+++ /sys/dev/isa/essreg.h Sun Jan 7 00:34:31 2001
@@ -175,7 +175,7 @@
#define ESS_DRQ2_VALID(chan) ((chan) == 0 || (chan) == 1 || (chan) == 3 || (chan) == 5)
-#define ESS_USE_AUDIO1(model) (((model) == ESS_1788) || ((model) == ESS_1868) || ((model) == ESS_1878) || ((model) == ESS_1869) || ((model) == ESS_1879))
+#define ESS_USE_AUDIO1(model) (((model) == ESS_1688) || ((model) == ESS_1788) || ((model) == ESS_1868) || ((model) == ESS_1878) || ((model) == ESS_1869) || ((model) == ESS_1879))
/*
* Macros to manipulate gain values
--- /sys/dev/isa/bak/essvar.h Thu Mar 23 21:33:33 2000
+++ /sys/dev/isa/essvar.h Sun Jan 7 00:29:08 2001
@@ -159,6 +159,7 @@
#define ESS_1879 6
#define ESS_1868 7
#define ESS_1878 8
+#define ESS_1688 9
u_int sc_version; /* Legacy ES688/ES1688 ID */
};
>Release-Note:
>Audit-Trail:
>Unformatted: