aboutsummaryrefslogtreecommitdiff
path: root/audio/emu10kx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@FreeBSD.org>2005-09-16 11:41:55 +0000
committerVsevolod Stakhov <vsevolod@FreeBSD.org>2005-09-16 11:41:55 +0000
commit8b0303d49003f9c078455b125eb2c22afa0f61b7 (patch)
treeb6c127fbfb72337c76b28a49f429c451a2b5eff5 /audio/emu10kx
parentf98f52441be0f4812793a575472bcf9fec242bb7 (diff)
downloadports-8b0303d49003f9c078455b125eb2c22afa0f61b7.tar.gz
ports-8b0303d49003f9c078455b125eb2c22afa0f61b7.zip
Add emu10kx driver for SBlive, Audigy and Audigy2 based cards.
This driver is alternative to snd_emu10k1 and support complex mixer settings, analog/digital switch, S/PDIF passthrough PR: 84653 Submitted by: michaels@sdf.lonestar.org
Notes
Notes: svn path=/head/; revision=142919
Diffstat (limited to 'audio/emu10kx')
-rw-r--r--audio/emu10kx/Makefile27
-rw-r--r--audio/emu10kx/distinfo2
-rw-r--r--audio/emu10kx/files/patch-Makefile11
-rw-r--r--audio/emu10kx/pkg-deinstall29
-rw-r--r--audio/emu10kx/pkg-descr7
-rw-r--r--audio/emu10kx/pkg-install46
-rw-r--r--audio/emu10kx/pkg-message15
7 files changed, 137 insertions, 0 deletions
diff --git a/audio/emu10kx/Makefile b/audio/emu10kx/Makefile
new file mode 100644
index 000000000000..82d7da4445c6
--- /dev/null
+++ b/audio/emu10kx/Makefile
@@ -0,0 +1,27 @@
+# Ports collection makefile for: emu10kx
+# Date created: 7 Aug 2005
+# Whom: michaels@sdf.lonestar.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= emu10kx
+PORTVERSION= 20050423
+CATEGORIES= audio
+MASTER_SITES= http://chibis.persons.gfk.ru/audigy/emu10kx/
+DISTNAME= ${PORTNAME}-2005-04-23
+
+MAINTAINER= michaels@sdf.lonestar.org
+COMMENT= SBLive!, Audigy, and Audigy2 driver for FreeBSD
+
+USE_BZIP2= yes
+
+NO_PACKAGE= should be recompiled for a particular FreeBSD kernel
+
+post-install:
+.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
+ @${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+ ${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/audio/emu10kx/distinfo b/audio/emu10kx/distinfo
new file mode 100644
index 000000000000..7248f73756e3
--- /dev/null
+++ b/audio/emu10kx/distinfo
@@ -0,0 +1,2 @@
+MD5 (emu10kx-2005-04-23.tar.bz2) = 452081b711ff4f10fb987308be6dd886
+SIZE (emu10kx-2005-04-23.tar.bz2) = 63332
diff --git a/audio/emu10kx/files/patch-Makefile b/audio/emu10kx/files/patch-Makefile
new file mode 100644
index 000000000000..19071fecade0
--- /dev/null
+++ b/audio/emu10kx/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig Sun Aug 7 10:23:02 2005
++++ Makefile Sun Aug 7 10:23:08 2005
+@@ -14,7 +14,7 @@
+ WARNS?=6
+ NO_WERROR?=1
+ WERROR=
+-SUBDIR=emuctrl
++#SUBDIR=emuctrl
+
+ # [4.x Only]If you have another device with same major device number, change
+ # definition of E10KX_MAJOR below (valid numbers are 200-252 except
diff --git a/audio/emu10kx/pkg-deinstall b/audio/emu10kx/pkg-deinstall
new file mode 100644
index 000000000000..7bc92fe166a6
--- /dev/null
+++ b/audio/emu10kx/pkg-deinstall
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+[ "$2" != "DEINSTALL" ] && exit 0
+
+#============================================================
+# DEINSTALL
+#============================================================
+DRIVERNAME=snd_emu10kx
+
+# Unload the driver
+kldstat -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
+if [ ${RESULT} -eq 0 ]; then
+ kldunload -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
+ if [ ${RESULT} -ne 0 ]; then
+ echo "ERROR: Failed to unload the $DRIVERNAME module!"
+ echo "ERROR: Is $DRIVERNAME.ko in use?"
+ exit 1;
+ fi
+fi
+
+# Remove the driver
+rm /boot/kernel/$DRIVERNAME.ko
+
+# Remove the driver from loader.conf
+grep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
+if [ ${RESULT} -eq 0 ]; then
+ sed -e /${DRIVERNAME}_load.*/d -i.orig /boot/loader.conf
+fi
+#============================================================
diff --git a/audio/emu10kx/pkg-descr b/audio/emu10kx/pkg-descr
new file mode 100644
index 000000000000..7b30e2630963
--- /dev/null
+++ b/audio/emu10kx/pkg-descr
@@ -0,0 +1,7 @@
+This is a port of the snd_emu10kx sound driver. This driver works for
+SBLive!, Audigy, and Audigy2 based cards.
+
+This is an alternate driver that you may use instead of the snd_emu10k1
+driver in the FreeBSD kernel.
+
+WWW: http://chibis.persons.gfk.ru/audigy/
diff --git a/audio/emu10kx/pkg-install b/audio/emu10kx/pkg-install
new file mode 100644
index 000000000000..1eb82b4a0108
--- /dev/null
+++ b/audio/emu10kx/pkg-install
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+[ "$2" != "POST-INSTALL" ] && exit 0
+
+#============================================================
+# POST-INSTALL
+#============================================================
+DRIVERNAME=snd_emu10kx
+
+# Ask user about installing driver
+echo -n "Do you want to install $DRIVERNAME driver and load it on boot time? [y/n]: "
+read RES
+echo
+
+if [ x"$RES" = x"y" ] ; then
+
+# Unload the driver
+kldstat -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
+if [ ${RESULT} -eq 0 ]; then
+ kldunload -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
+ if [ ${RESULT} -ne 0 ]; then
+ echo "ERROR: Failed to unload the $DRIVERNAME module!"
+ echo "ERROR: Is $DRIVERNAME.ko in use?"
+ exit 1;
+ fi
+fi
+
+# Load the driver
+kldload $DRIVERNAME > /dev/null 2>&1 ; RESULT=$?
+if [ ${RESULT} -ne 0 ]; then
+ echo "ERROR: Failed to load the $DRIVERNAME module!"
+ exit 1;
+fi
+
+# Have the driver load at boot
+grep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
+if [ ${RESULT} -eq 0 ]; then
+ # Present.
+ sed -e "s/${DRIVERNAME}_load.*/${DRIVERNAME}_load=\"YES\"/g" -i.orig /boot/loader.conf
+else
+ # Not present.
+ echo "${DRIVERNAME}_load=\"YES\"" >> /boot/loader.conf
+fi
+
+fi
+#============================================================
diff --git a/audio/emu10kx/pkg-message b/audio/emu10kx/pkg-message
new file mode 100644
index 000000000000..233c00ca1dda
--- /dev/null
+++ b/audio/emu10kx/pkg-message
@@ -0,0 +1,15 @@
+
+To use these drivers, make sure that you have loaded the emu10kx kernel
+module, by doing
+
+ # kldload snd_emu10kx
+
+or adding
+
+ snd_emu10kx_load="YES"
+
+to your /boot/loader.conf (normally done automatically when installing
+the port).
+
+Note you should disable loading of the emu10k1 driver (this driver is for
+the same hardware).