From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 14 20:10:23 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88C2E16A41F for ; Sun, 14 Aug 2005 20:10:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5536A43D45 for ; Sun, 14 Aug 2005 20:10:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7EKANtm094033 for ; Sun, 14 Aug 2005 20:10:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7EKANY8094032; Sun, 14 Aug 2005 20:10:23 GMT (envelope-from gnats) Date: Sun, 14 Aug 2005 20:10:23 GMT Message-Id: <200508142010.j7EKANY8094032@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Michael Seyfert Cc: Subject: Re: kern/84728: [sound] [patch] ac97 broken mixing capabilities checking X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Michael Seyfert List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2005 20:10:23 -0000 The following reply was made to PR kern/84728; it has been noted by GNATS. From: Michael Seyfert To: bug-followup@FreeBSD.org Cc: skywizard@MyBSD.org.my Subject: Re: kern/84728: [sound] [patch] ac97 broken mixing capabilities checking Date: Sun, 14 Aug 2005 20:00:56 +0000 Sorry I had the wrong encoding in my editor for that patch.. --- sys/dev/sound/pcm/ac97.c Sun Jul 31 08:28:31 2005 +++ ../ac97.c Thu Aug 11 20:12:47 2005 @@ -622,19 +622,15 @@ j |= 0x8000; ac97_wrcd(codec, codec->mix[i].reg, j); j = ac97_rdcd(codec, codec->mix[i].reg) & j; - j >>= codec->mix[i].ofs; - if (codec->mix[i].reg == AC97_MIX_TONE && - ((j & 0x0001) == 0x0000)) - j >>= 1; - for (k = 0; j != 0; k++) - j >>= 1; - for (j = 0; k != 0; j++) - k >>= 1; if (j != 0) { codec->mix[i].enable = 1; -#if 0 - codec->mix[i].bits = j; -#endif + /* Get the width of the control field. */ + j = ((1 << 6) - 1) << codec->mix[i].ofs; + ac97_wrcd(codec, codec->mix[i].reg, j); + j = ac97_rdcd(codec, codec->mix[i].reg) & j; + j >>= codec->mix[i].ofs; + for (k = 1; j & (1 << k); k++); + codec->mix[i].bits = k; } else codec->mix[i].enable = 0; } else If this doesn't work then I'm giving up.. I tried all of your patches in that directory. My sound didn't work at all. Can't we just keep it simple? Anyways, if I'm the only one affected by this then it's not a big deal.