Here is the complete fix. Put this code at the bottom of
src/southbridge/via/vt8235/setup_misc.inc
// reset AC97 link
movl $CONFIG_ADDR(0, 0x88 + 5, 0x41), %eax
movb $0x80, %dl
PCI_WRITE_CONFIG_BYTE
DELAY($0x5000)
movl $CONFIG_ADDR(0, 0x88 + 5, 0x41), %eax
movb $0xcc, %dl
PCI_WRITE_CONFIG_BYTE
The DELAY($0x5000) is arbitrary, I just grabbed that from the raminit code.
I was shooting for 1/100th of a second, I don't really know what I got. All
this does is force the reset line on the ACLink interface, then remove it.
This fixes the problem. The problem was for 20% of our epia-m boxes running
linuxbios the ac97 link would be reporting busy all the time (never ready),
and the ALSA driver would throw up its hands and audio out wouldn't work.
This is the same file to modify for the previous fix recently posted. The
previous fix is to enable the real time clock of the VT8235, near the top
of this file make it so the entry looks like this:
movl $CONFIG_ADDR(0, 0x88, 0x4e), %eax
movb $0x1a, %dl
PCI_WRITE_CONFIG_BYTE
The $0x1a value used to be $0x1b, which for some reason freezes the real time
clock. This can easily be tested with "hwclock --show". Before this
modification that command will just freeze, but you can control-C out of it.
After the mod it works as expected.
-Dave