Bug 86236 - [patch] audio/emu10kx fix for 7.0 kernel
[patch] audio/emu10kx fix for 7.0 kernel
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Vsevolod Stakhov
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-17 00:20 UTC by michaels
Modified: 2005-09-18 11:07 UTC (History)
0 users

See Also:


Attachments
file.diff (2.86 KB, patch)
2005-09-17 00:20 UTC, michaels
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description michaels 2005-09-17 00:20:10 UTC
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.
Comment 1 Vsevolod Stakhov freebsd_committer 2005-09-17 17:55:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vsevolod

Take this.
Comment 2 Vsevolod Stakhov freebsd_committer 2005-09-17 17:57:58 UTC
State Changed
From-To: open->feedback

Asked for port change.
Comment 3 michaels 2005-09-18 01:06:37 UTC
ok please take a look at this one:

diff -ruN /usr/ports/audio/emu10kx/Makefile ./emu10kx/Makefile
--- /usr/ports/audio/emu10kx/Makefile	Fri Sep 16 05:41:55 2005
+++ ./emu10kx/Makefile	Sat Sep 17 17:26:05 2005
@@ -18,6 +18,9 @@
 
 NO_PACKAGE=	should be recompiled for a particular FreeBSD kernel
 
+MAN8=	emuctrl.8
+PLIST_FILES=	sbin/emuctrl
+
 post-install:
 .if !defined(BATCH) && !defined(PACKAGE_BUILDING)
 	@${PKGINSTALL} ${PKGNAME} POST-INSTALL
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/files/patch-emuctrl-Makefile ./emu10kx/files/patch-emuctrl-Makefile
--- /usr/ports/audio/emu10kx/files/patch-emuctrl-Makefile	Wed Dec 31 17:00:00 1969
+++ ./emu10kx/files/patch-emuctrl-Makefile	Sat Sep 17 17:53:24 2005
@@ -0,0 +1,15 @@
+--- emuctrl/Makefile.orig	Sat Sep 17 16:17:51 2005
++++ emuctrl/Makefile	Sat Sep 17 16:20:59 2005
+@@ -3,8 +3,10 @@
+ # $FreeBSD$
+ 
+ PROG=	emuctrl
+-MAN=	emuctrl.8
+-BINDIR ?= /usr/sbin
++NO_MANCOMPRESS=YES
++MANDIR=	${PREFIX}/man/man
++MAN8=	emuctrl.8
++BINDIR= ${PREFIX}/sbin
+ 
+ CSRCS=	emuctrl.c 
+ WARNS?= 6
Comment 4 Vsevolod Stakhov freebsd_committer 2005-09-18 11:07:33 UTC
State Changed
From-To: feedback->closed

Committed, thanks!