summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-04-12 23:38:51 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-04-12 23:38:51 +0000
commit6adca8fe7247bb45ced11d9203a11c3072ddd88a (patch)
tree4a0441ddf266ddf67988d7fcc6d4c01f854399ba /sys/dev
parent59ba7e8186cfa7b27a2a2d380faedc0982197a71 (diff)
Disable DAC, Output, and Record mute by default
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/ac97.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index b773b6b3fd0..06363bcafcd 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ac97.c,v 1.3 1999/10/05 18:58:22 csapuntz Exp $ */
+/* $OpenBSD: ac97.c,v 1.4 2000/04/12 23:38:50 csapuntz Exp $ */
/*
* Copyright (c) 1999 Constantine Sapuntzakis
@@ -481,7 +481,8 @@ ac97_attach(hostIf)
int error, i, j;
u_int16_t id1, id2, caps;
u_int32_t id;
-
+ mixer_ctrl_t ctl;
+
as = malloc(sizeof(struct ac97_softc), M_DEVBUF, M_WAITOK);
if (!as) return (ENOMEM);
@@ -529,6 +530,29 @@ ac97_attach(hostIf)
ac97_setup_source_info(as);
+ /* Just enable the DAC and master volumes by default */
+ bzero(&ctl, sizeof(ctl));
+
+ ctl.type = AUDIO_MIXER_ENUM;
+ ctl.un.ord = 0; /* off */
+ ctl.dev = ac97_get_portnum_by_name(&as->codecIf, AudioCoutputs,
+ AudioNmaster, AudioNmute);
+ ac97_mixer_set_port(&as->codecIf, &ctl);
+ ctl.dev = ac97_get_portnum_by_name(&as->codecIf, AudioCinputs,
+ AudioNdac, AudioNmute);
+
+ ac97_mixer_set_port(&as->codecIf, &ctl);
+ ctl.dev = ac97_get_portnum_by_name(&as->codecIf, AudioCrecord,
+ AudioNvolume, AudioNmute);
+ ac97_mixer_set_port(&as->codecIf, &ctl);
+
+
+ ctl.dev = ac97_get_portnum_by_name(&as->codecIf, AudioCrecord,
+ AudioNsource, NULL);
+ ctl.type = AUDIO_MIXER_ENUM;
+ ctl.un.ord = 0;
+ ac97_mixer_set_port(&as->codecIf, &ctl);
+
return (0);
}