Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2003 22:40:47 +0800
From:      David Xu <davidxu@FreeBSD.org>
To:        Orion Hodson <orion@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: Recent sound change still broken?
Message-ID:  <200308292240.47452.davidxu@FreeBSD.org>

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

>
>David Xu wrote:
>|
>| I tried to backout ac97.c revision 1.43, now my sound card works again,
>| If someone wants more information, please tell me.
>
>David
>
>Could you revert to head and check that the mixer "ogain" is non-zero
>(say 100 :-)?  On some codecs "ogain" provides the traditional
>functionality of "vol".  I appreciate this is not ideal.
>
>Thanks
>- Orion

I found that reading AC97_MIX_AUXOUT register in ac97_fix_auxout()
has side effect on my sound card, although it has 0x8000 bit set,
it might be a driver bug or hw bug. The following patch avoids the
problem, but is a bit ugly. :-(

David Xu


Index: ac97.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97.c,v
retrieving revision 1.46
diff -u -r1.46 ac97.c
--- ac97.c	29 Aug 2003 03:24:08 -0000	1.46
+++ ac97.c	29 Aug 2003 14:28:03 -0000
@@ -454,7 +454,12 @@
 	 * We first check whether aux_out is a valid register.  If not
 	 * we may not want to keep ogain.
 	 */
-	keep_ogain = ac97_rdcd(codec, AC97_MIX_AUXOUT) & 0x8000;
+
+ 	/* Creative EV1938 codec read has side effect ? */
+	if (codec->id == 0x1408384)
+		keep_ogain = 1;
+	else
+		keep_ogain = ac97_rdcd(codec, AC97_MIX_AUXOUT) & 0x8000;
 
 	/*
 	 * Determine what AUX_OUT really means, it can be:



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