Re: Recent sound change still broken?

From: David Xu <davidxu_at_FreeBSD.org>
Date: Fri, 29 Aug 2003 22:40:47 +0800
>
>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
_at__at_ -454,7 +454,12 _at__at_
 	 * 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:
Received on Fri Aug 29 2003 - 05:37:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC