Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/isa Pull up 1.14-1.15. Start tone controls in ...
details: https://anonhg.NetBSD.org/src/rev/b0c189497023
branches: netbsd-1-5
changeset: 488927:b0c189497023
user: augustss <augustss%NetBSD.org@localhost>
date: Mon Aug 07 00:22:56 2000 +0000
description:
Pull up 1.14-1.15. Start tone controls in middle position.
Approved by thorpej.
diffstat:
sys/dev/isa/ym.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r 8705e186203c -r b0c189497023 sys/dev/isa/ym.c
--- a/sys/dev/isa/ym.c Mon Aug 07 00:14:50 2000 +0000
+++ b/sys/dev/isa/ym.c Mon Aug 07 00:22:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ym.c,v 1.14 2000/03/23 07:01:36 thorpej Exp $ */
+/* $NetBSD: ym.c,v 1.14.4.1 2000/08/07 00:22:56 augustss Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -124,6 +124,10 @@
#define YM_VOL_OPL3 184
#endif
+#ifndef YM_VOL_EQUAL
+#define YM_VOL_EQUAL 128
+#endif
+
#ifdef __i386__ /* XXX */
# include "joy.h"
#else
@@ -202,6 +206,7 @@
static struct ad1848_volume vol_master = {YM_VOL_MASTER, YM_VOL_MASTER};
static struct ad1848_volume vol_dac = {YM_VOL_DAC, YM_VOL_DAC};
static struct ad1848_volume vol_opl3 = {YM_VOL_OPL3, YM_VOL_OPL3};
+ mixer_ctrl_t mctl;
struct audio_attach_args arg;
callout_init(&sc->sc_powerdown_ch);
@@ -234,6 +239,14 @@
ad1848_set_channel_gain(ac, AD1848_DAC_CHANNEL, &vol_dac);
ad1848_set_channel_gain(ac, AD1848_AUX2_CHANNEL, &vol_opl3);
+ /* Set tone control to middle position. */
+ mctl.un.value.num_channels = 1;
+ mctl.un.value.level[AUDIO_MIXER_LEVEL_MONO] = YM_VOL_EQUAL;
+ mctl.dev = YM_MASTER_BASS;
+ ym_mixer_set_port(sc, &mctl);
+ mctl.dev = YM_MASTER_TREBLE;
+ ym_mixer_set_port(sc, &mctl);
+
/*
* Mute all external sources. If you change this, you must
* also change the initial value of sc->sc_external_sources
Home |
Main Index |
Thread Index |
Old Index