summaryrefslogtreecommitdiffstats
path: root/audio/emu10kx
diff options
context:
space:
mode:
authorvsevolod <vsevolod@FreeBSD.org>2005-09-16 11:41:55 +0000
committervsevolod <vsevolod@FreeBSD.org>2005-09-16 11:41:55 +0000
commitc511f79e86455e848333b0db3646c976f21ad821 (patch)
tree35e930e91c0bed3fcefa0ec601065f2bc837fa90 /audio/emu10kx
parent431a4e39f9a09fad8f6d966173f492e0ee628f68 (diff)
downloadFreeBSD-ports-c511f79e86455e848333b0db3646c976f21ad821.zip
FreeBSD-ports-c511f79e86455e848333b0db3646c976f21ad821.tar.gz
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
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 0000000..82d7da4
--- /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 0000000..7248f73
--- /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 0000000..19071fe
--- /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 0000000..7bc92fe16
--- /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 0000000..7b30e26
--- /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 0000000..1eb82b4
--- /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 0000000..233c00c
--- /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).
OpenPOWER on IntegriCloud