From owner-freebsd-current@FreeBSD.ORG Fri Aug 29 07:37:50 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5C5616A4BF; Fri, 29 Aug 2003 07:37:50 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24D1143FE5; Fri, 29 Aug 2003 07:37:49 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) Received: from localhost (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7TEbkUp030400; Fri, 29 Aug 2003 07:37:47 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) From: David Xu To: Orion Hodson Date: Fri, 29 Aug 2003 22:40:47 +0800 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308292240.47452.davidxu@FreeBSD.org> cc: freebsd-current@FreeBSD.org Subject: Re: Recent sound change still broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 14:37:51 -0000 > >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: