aboutsummaryrefslogtreecommitdiff
path: root/audio/aureal-kmod/files
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-05-15 18:16:23 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-05-15 18:16:23 +0000
commitc08cfc3dc9e58585d1b6601e95e9633a7614e5cc (patch)
treecf42a01bfae5ad7a56cc61e09457eaaa7187d25a /audio/aureal-kmod/files
parentae6af583691e07daa6e90557713f793051411d15 (diff)
Notes
Diffstat (limited to 'audio/aureal-kmod/files')
-rw-r--r--audio/aureal-kmod/files/aureal.sh30
1 files changed, 29 insertions, 1 deletions
diff --git a/audio/aureal-kmod/files/aureal.sh b/audio/aureal-kmod/files/aureal.sh
index 457d513edbbb..fd31863ed662 100644
--- a/audio/aureal-kmod/files/aureal.sh
+++ b/audio/aureal-kmod/files/aureal.sh
@@ -1,5 +1,8 @@
#!/bin/sh
-
+#---------------------------------------------------------------------
+#
+# I. Auto-detection of your Aureal Vortex sound card
+#
# If for some reason this script fails to guess the type of your
# Aureal card correctly, you can manually override it here.
# Set this to 8810 (Vortex Advantage), 8820 (Vortex 1) or 8830
@@ -7,6 +10,15 @@
#
#CARD=8830
#
+# II. VIA Apollo KX133 lock-up issue workaround
+#
+# If your AMD Athlon system is based on a VIA Apollo KX133 motherboard
+# chipset, your system will most certainly lock up shortly after
+# you start a playback. To work around this issue please uncomment
+# this line:
+#
+#VIAKX133FIX=yes
+#---------------------------------------------------------------------
PCICONF="/usr/sbin/pciconf"
@@ -39,7 +51,22 @@ case "$1" in
exit 64
fi
/sbin/kldload ${LIBDIR}/${DRIVERFILE}
+
echo -n " aureal-kmod"
+
+ # Increase PCI timeout for broken VIA Apollo KX133 chipsets
+ # NOTE: This assumes your Aureal card is the pcm0 device
+ if [ "$VIAKX133FIX" ]; then
+ pcisel=`${PCICONF} -l 2>&- | grep ^pcm0 | awk -F: '{ gsub("^[^@]*@", ""); print $1":"$2":"$3 }'`
+ if [ -z "$pcisel" ]; then
+ echo " (WARNING: Soundcard PCI selector undetermined. Unable to install VIA KX133 workaround. Starting a playback will likely to lock-up your system!)"
+ exit 64
+ fi
+ oldvalue=`${PCICONF} -r -b $pcisel 0x40 2>&- | sed 's/ *$//'`
+ echo -n " (with VIA KX133 workaround: ${pcisel},0x40: ${oldvalue} -> "
+ ${PCICONF} -w -b $pcisel 0x40 0xff
+ echo -n "`${PCICONF} -r -b $pcisel 0x40 2>&- | sed 's/ *$//'`)"
+ fi
;;
stop)
/sbin/kldunload ${DRIVERFILE}
@@ -52,3 +79,4 @@ case "$1" in
exit 64
;;
esac
+