Date: Sun, 14 Aug 2005 20:10:23 GMT From: Michael Seyfert <michaels@sdf.lonestar.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/84728: [sound] [patch] ac97 broken mixing capabilities checking Message-ID: <200508142010.j7EKANY8094032@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR kern/84728; it has been noted by GNATS.
From: Michael Seyfert <michaels@sdf.lonestar.org>
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.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508142010.j7EKANY8094032>
