Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci * azalia_mixer_init()
details: https://anonhg.NetBSD.org/src/rev/74833890501d
branches: trunk
changeset: 583368:74833890501d
user: kent <kent%NetBSD.org@localhost>
date: Tue Aug 02 13:20:50 2005 +0000
description:
* azalia_mixer_init()
set AUDIO_MAX_GAIN/2 to all of volume items.
diffstat:
sys/dev/pci/azalia.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 7cbbf5cdf0ad -r 74833890501d sys/dev/pci/azalia.c
--- a/sys/dev/pci/azalia.c Tue Aug 02 12:11:14 2005 +0000
+++ b/sys/dev/pci/azalia.c Tue Aug 02 13:20:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: azalia.c,v 1.10 2005/08/02 11:17:56 kent Exp $ */
+/* $NetBSD: azalia.c,v 1.11 2005/08/02 13:20:50 kent Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.10 2005/08/02 11:17:56 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.11 2005/08/02 13:20:50 kent Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -2302,6 +2302,28 @@
azalia_mixer_set(this, &mc);
}
+ /* set unextreme volume */
+ for (i = 0; i < this->nmixers; i++) {
+ mixer_ctrl_t mc;
+
+ if (!IS_MI_TARGET_INAMP(this->mixers[i].target) &&
+ this->mixers[i].target != MI_TARGET_OUTAMP &&
+ this->mixers[i].target != MI_TARGET_VOLUME)
+ continue;
+ if (this->mixers[i].devinfo.type != AUDIO_MIXER_VALUE)
+ continue;
+ mc.dev = i;
+ mc.type = AUDIO_MIXER_VALUE;
+ mc.un.value.num_channels = 1;
+ mc.un.value.level[0] = AUDIO_MAX_GAIN / 2;
+ if (this->mixers[i].target != MI_TARGET_VOLUME &&
+ this->w[this->mixers[i].nid].widgetcap & COP_AWCAP_STEREO) {
+ mc.un.value.num_channels = 2;
+ mc.un.value.level[1] = AUDIO_MAX_GAIN / 2;
+ }
+ azalia_mixer_set(this, &mc);
+ }
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index