Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2005 23:14:41 GMT
From:      Michael Seyfert <michaels@sdf.lonestar.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/86236: [patch] audio/emu10kx fix for 7.0 kernel
Message-ID:  <200509162314.j8GNEf2l012764@sdf.lonestar.org>
Resent-Message-ID: <200509162320.j8GNKAsc092216@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         86236
>Category:       ports
>Synopsis:       [patch] audio/emu10kx fix for 7.0 kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 16 23:20:10 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Michael Seyfert
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD  7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Sep 10 14:03:47 MDT 2005

>Description:

Fix this driver to work with new ac97 mute checking code in the 7.0 kernel.
Also add emuctrl. A mixer which allows controlling this driver.

>How-To-Repeat:

>Fix:

diff -ruN /usr/ports/audio/emu10kx/files/patch-Makefile ./emu10kx/files/patch-Makefile
--- /usr/ports/audio/emu10kx/files/patch-Makefile	Fri Sep 16 05:41:55 2005
+++ ./emu10kx/files/patch-Makefile	Wed Dec 31 17:00:00 1969
@@ -1,11 +0,0 @@
---- 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 -ruN /usr/ports/audio/emu10kx/files/patch-emu10k1-pcm.c ./emu10kx/files/patch-emu10k1-pcm.c
--- /usr/ports/audio/emu10kx/files/patch-emu10k1-pcm.c	Wed Dec 31 17:00:00 1969
+++ ./emu10kx/files/patch-emu10k1-pcm.c	Fri Sep 16 16:37:57 2005
@@ -0,0 +1,26 @@
+--- emu10k1-pcm.c	Sat Apr 23 05:47:26 2005
++++ ../../emu10k1-pcm.c	Sun Aug 14 17:54:02 2005
+@@ -135,7 +135,6 @@
+                (sc->card->mixer->mix.volume[MIXER_P_VOLUME_RIGHT] == 0)) mute = 1;
+             left = V100_TOBIT6(sc->card->mixer->mix.volume[MIXER_P_VOLUME_LEFT]);
+             right = V100_TOBIT6(sc->card->mixer->mix.volume[MIXER_P_VOLUME_RIGHT]);
+-            if(mute == 1) left = right = 0;
+             emulated = AC97ENCODE(mute, left, right);
+ #ifdef EMU_AC97DEBUG
+             device_printf(sc->dev, "get MIX_MASTER: vol  %d:%d ac97 m=%d l=%x r=%x e=%08x\n",
+@@ -150,7 +149,6 @@
+                (sc->card->mixer->fxbuses[0].volume[MIXER_P_VOLUME_RIGHT] == 0)) mute = 1;
+             left = V100_TOBIT6(sc->card->mixer->fxbuses[0].volume[MIXER_P_VOLUME_LEFT]);
+             right = V100_TOBIT6(sc->card->mixer->fxbuses[0].volume[MIXER_P_VOLUME_RIGHT]);
+-            if(mute == 1) left = right = 0;
+             emulated = AC97ENCODE(mute, left, right);
+ #ifdef EMU_AC97DEBUG
+             device_printf(sc->dev, "get MIX_PCM: vol  %d:%d ac97 m=%d l=%x r=%x e=%08x\n",
+@@ -169,7 +167,6 @@
+                (sc->card->mixer->mix.volume[MIXER_R_VOLUME_RIGHT] == 0)) mute = 1;
+             left = 0x0f - V100_TOBIT4(sc->card->mixer->mix.volume[MIXER_R_VOLUME_LEFT]);
+             right = 0x0f - V100_TOBIT4(sc->card->mixer->mix.volume[MIXER_R_VOLUME_RIGHT]);
+-            if(mute == 1) left = right = 0;
+             emulated = AC97ENCODE(mute, left, right);
+ #ifdef EMU_AC97DEBUG
+             device_printf(sc->dev, "get MIX_RGAIN: vol  %d:%d ac97 m=%d l=%x r=%x\n e=%08x",
diff -ruN /usr/ports/audio/emu10kx/pkg-deinstall ./emu10kx/pkg-deinstall
--- /usr/ports/audio/emu10kx/pkg-deinstall	Fri Sep 16 05:41:55 2005
+++ ./emu10kx/pkg-deinstall	Fri Sep 16 16:41:20 2005
@@ -21,6 +21,10 @@
 # Remove the driver
 rm /boot/kernel/$DRIVERNAME.ko
 
+# Remove emuctrl
+rm /usr/sbin/emuctrl
+rm /usr/share/man/man8/emuctrl.8.gz
+
 # Remove the driver from loader.conf
 grep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
 if [ ${RESULT} -eq 0 ]; then

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509162314.j8GNEf2l012764>