Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/isa MAke sure bass&treble start in their mid position.
details: https://anonhg.NetBSD.org/src/rev/1f2a58234537
branches: trunk
changeset: 494239:1f2a58234537
user: augustss <augustss%NetBSD.org@localhost>
date: Tue Jul 04 10:02:45 2000 +0000
description:
MAke sure bass&treble start in their mid position.
diffstat:
sys/dev/isa/ym.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r 40e602fafea9 -r 1f2a58234537 sys/dev/isa/ym.c
--- a/sys/dev/isa/ym.c Tue Jul 04 09:56:14 2000 +0000
+++ b/sys/dev/isa/ym.c Tue Jul 04 10:02:45 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.15 2000/07/04 10:02:45 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