Post by Tom CosgroveI use various of the original EPIA (5000s) and EPIA Ms in different
computers for myself and clients, and the vr driver supports the
VIA Rhine II VT6103 in those. I did have some stability problems
under heavy LAN load with one of them, but grounding the motherboard
seems to have sorted it out (touch wood).
I didn't realise anyone else out there was using one of these. I'll
also add that the onboard NIC also stopped working for me when I
threw a 3com 3c905C-TX-M in the PCI slot. Dunno why. My Win2K box
also finds that NIC flaky though (even though Linux works with it
fine; I suspect an ACPI issue).
The only other issues I have are that the AC97 driver doesn't enable
the SPDIF transmitter and one of the on-board devices isn't recognized
in the stock kernel (a cosmetic issue). To fix, patch
/usr/src/sys/dev/pcidevs:
diff -u -r1.609.2.3 pcidevs
--- pcidevs 13 Jun 2003 18:52:10 -0000 1.609.2.3
+++ pcidevs 15 Sep 2003 10:16:55 -0000
@@ -2459,6 +2459,7 @@
product VIATECH VT8377 0x3189 VT8377 Host-PCI
product VIATECH RHINEII 0x6100 RhineII
product VIATECH VT8231_ISA 0x8231 VT8231 PCI-ISA
+product VIATECH VT8235 0x8235 VT8235 Power Mgmt
product VIATECH VT8363_AGP 0x8305 VT8363 PCI-AGP
product VIATECH VT8371_PPB 0x8391 VT8371 PCI-PCI
product VIATECH VT8501_AGP 0x8501 VT8501 PCI-AGP
Then run make to update pcidevs.h and pci_devs.data.h (Anyone know
why these generated files are in CVS?)
To enable the SPDIF transmitter, I use the following patch:
Index: sys/dev/ic/ac97.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ac97.c,v
retrieving revision 1.33
diff -u -r1.33 ac97.c
--- sys/dev/ic/ac97.c 17 Sep 2002 19:12:17 -0000 1.33
+++ sys/dev/ic/ac97.c 15 Sep 2003 11:24:39 -0000
@@ -719,7 +719,19 @@
id1 |= AC97_EXT_AUDIO_VRA;
if (as->ext_id & AC97_EXT_AUDIO_VRM)
id1 |= AC97_EXT_AUDIO_VRM;
+ if (as->ext_id & AC97_EXT_AUDIO_SPDIF)
+ id1 |= AC97_EXT_AUDIO_SPDIF;
ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, id1);
+ if (as->ext_id & AC97_EXT_AUDIO_SPDIF) {
+ /*
+ * This is probably unnecessary -- it's unlikely
+ * the config will be valid on startup. Hence it
+ * may always blat a message.
+ */
+ ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &id1);
+ if (!(id1 & AC97_EXT_AUDIO_SPCV))
+ DPRINTF("ac97: SPDIF configuration invalid\n");
+ }
}
ac97_setup_source_info(as);
@@ -971,6 +983,7 @@
{
struct ac97_softc *as = (struct ac97_softc *)codec_if;
u_int16_t reg, val, regval, id = 0;
+ int oldspdifok;
DPRINTFN(5, ("set_rate(%lu) ", p->sample_rate));
@@ -992,6 +1005,13 @@
p->sample_rate /= 2;
}
+ /* If SPDIF is supported, save whether previous config is ok */
+ if (as->ext_id & AC97_EXT_AUDIO_SPDIF) {
+ if (ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &val))
+ return (EIO);
+ oldspdifok = (val & AC97_EXT_AUDIO_SPCV);
+ }
+
/* i guess it's better w/o clicks and squeecks when changing the rate */
if (ac97_read(as, AC97_REG_POWER, &val) ||
ac97_write(as, AC97_REG_POWER, val |
@@ -1012,6 +1032,17 @@
if (ac97_write(as, AC97_REG_POWER, val))
return (EIO);
+
+ /* Check whether the SPDIF config status has changed and notify */
+ if (as->ext_id & AC97_EXT_AUDIO_SPDIF) {
+ int newspdifok;
+ if (ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &val))
+ return (EIO);
+ newspdifok = (val & AC97_EXT_AUDIO_SPCV);
+ if (oldspdifok != newspdifok)
+ printf("ac97: SPDIF configuration %svalid\n",
+ (newspdifok)?"":"in");
+ }
return (0);
}
Index: sys/dev/ic/ac97.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/ac97.h,v
retrieving revision 1.14
diff -u -r1.14 ac97.h
--- sys/dev/ic/ac97.h 28 Jul 2002 06:27:07 -0000 1.14
+++ sys/dev/ic/ac97.h 15 Sep 2003 11:24:39 -0000
@@ -132,6 +132,7 @@
#define AC97_EXT_AUDIO_SDAC 0x0080
#define AC97_EXT_AUDIO_LDAC 0x0100
#define AC97_EXT_AUDIO_AMAP 0x0200
+#define AC97_EXT_AUDIO_SPCV 0x0400
#define AC97_EXT_AUDIO_REV_11 0x0000
#define AC97_EXT_AUDIO_REV_22 0x0400
#define AC97_EXT_AUDIO_REV_23 0x0800
Index: share/man/man4/ac97.4
===================================================================
RCS file: /cvs/src/share/man/man4/ac97.4,v
retrieving revision 1.12
diff -u -r1.12 ac97.4
--- share/man/man4/ac97.4 18 Feb 2003 07:54:53 -0000 1.12
+++ share/man/man4/ac97.4 15 Sep 2003 11:24:39 -0000
@@ -72,3 +72,9 @@
.Nm
driver could do more to detect mixer channels that don't work and cull
them from the list.
+.Pp
+The
+.Nm
+driver currently enables SPDIF output if the AC97 codec claims to
+support it, but during channel changes no effort is made to ensure
+the SPDIF transmitter is happy. (If it's not, it switches off.)
It's pretty dumb in that it simply turns on the transmitter, and tries
to track whether the transmitter status is ok after each DAC rate-change.
There's also a problem in this area since the results aren't always
right; sometimes it says the configuration is invalid, yet it works
anyway.
Naturally this only works for two-channel material.
- Andrew