Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/ic Pull up revision 1.37 (via patch, requested ...



details:   https://anonhg.NetBSD.org/src/rev/16a4fe193f0e
branches:  netbsd-1-6
changeset: 529743:16a4fe193f0e
user:      he <he%NetBSD.org@localhost>
date:      Wed Dec 11 18:10:06 2002 +0000

description:
Pull up revision 1.37 (via patch, requested by kent in ticket #980):
  Fix LR reversal problem of mixer and record gain
  polarity problem.  Based on PR#12878 and PR#18901.

diffstat:

 sys/dev/ic/ac97.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r 69609a9bc7ba -r 16a4fe193f0e sys/dev/ic/ac97.c
--- a/sys/dev/ic/ac97.c Wed Dec 11 18:06:48 2002 +0000
+++ b/sys/dev/ic/ac97.c Wed Dec 11 18:10:06 2002 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ac97.c,v 1.24 2002/01/23 14:50:45 ichiro Exp $ */
+/*      $NetBSD: ac97.c,v 1.24.10.1 2002/12/11 18:10:06 he Exp $ */
 /*     $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $       */
 
 /*
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.24 2002/01/23 14:50:45 ichiro Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.24.10.1 2002/12/11 18:10:06 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -223,7 +223,7 @@
        /* Record Gain */
        { AudioCrecord,      AudioNvolume,        NULL,    AUDIO_MIXER_VALUE,
          WRAP(ac97_volume_stereo),
-         AC97_REG_RECORD_GAIN, 0x8000, 4, 0, 1,
+         AC97_REG_RECORD_GAIN, 0x8000, 4, 0, 1, 1,
        },
        /* Record Gain mic */
        { AudioCrecord,  AudioNmicrophone,        NULL,    AUDIO_MIXER_VALUE,
@@ -761,7 +761,7 @@
 
                newval = ((l & mask) << si->ofs);
                if (value->num_channels == 2) {
-                       newval |= ((r & mask) << (si->ofs + 8));
+                       newval = (newval << 8) | ((r & mask) << si->ofs);
                        mask |= (mask << 8);
                }
 
@@ -838,11 +838,11 @@
                        l = r = (val >> si->ofs) & mask;
                } else {
                        if (!(as->host_flags & AC97_HOST_SWAPPED_CHANNELS)) {
-                               l = (val >> si->ofs) & mask;
-                               r = (val >> (si->ofs + 8)) & mask;
+                               l = (val >> (si->ofs + 8)) & mask;
+                               r = (val >> si->ofs) & mask;
                        } else {        /* host has reversed channels */
-                               r = (val >> si->ofs) & mask;
-                               l = (val >> (si->ofs + 8)) & mask;
+                               r = (val >> (si->ofs + 8)) & mask;
+                               l = (val >> si->ofs) & mask;
                        }
                }
 



Home | Main Index | Thread Index | Old Index