Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Set the delta for the particular source so tellin...



details:   https://anonhg.NetBSD.org/src/rev/c3c519088d53
branches:  trunk
changeset: 509181:c3c519088d53
user:      erh <erh%NetBSD.org@localhost>
date:      Sun Apr 29 02:47:25 2001 +0000

description:
Set the delta for the particular source so telling mixerctl to decrease the
volume (using --) adjusts it far enough to stick.

diffstat:

 sys/dev/ic/ac97.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 03295486b496 -r c3c519088d53 sys/dev/ic/ac97.c
--- a/sys/dev/ic/ac97.c Sun Apr 29 00:34:11 2001 +0000
+++ b/sys/dev/ic/ac97.c Sun Apr 29 02:47:25 2001 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ac97.c,v 1.18 2001/01/18 20:28:16 jdolecek Exp $ */
+/*      $NetBSD: ac97.c,v 1.19 2001/04/29 02:47:25 erh Exp $ */
 /*     $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $       */
 
 /*
@@ -101,10 +101,14 @@
                                                 { { AudioNmixerout AudioNmono }, 6 },
                                                 { { "phone" }, 7 }}};
 
+/*
+ * Due to different values for each source that uses these structures, 
+ * the ac97_query_devinfo function sets delta in mixer_devinfo_t using
+ * ac97_source_info.bits.
+ */
 static const struct audio_mixer_value ac97_volume_stereo = { { AudioNvolume }, 
                                                       2 };
 
-
 static const struct audio_mixer_value ac97_volume_mono = { { AudioNvolume }, 
                                                     1 };
 
@@ -676,6 +680,11 @@
                        strcpy(dip->label.name, name);
 
                bcopy(si->info, &dip->un, si->info_size);
+
+               /* Set the delta for volume sources */
+               if (dip->type == AUDIO_MIXER_VALUE)
+                       dip->un.v.delta = 1 << (8 - si->bits);
+
                return (0);
        }
 



Home | Main Index | Thread Index | Old Index