summaryrefslogtreecommitdiffstats
path: root/sys/dev/audio.c
diff options
context:
space:
mode:
authorjakemsr <jakemsr@openbsd.org>2007-09-17 13:46:11 +0000
committerjakemsr <jakemsr@openbsd.org>2007-09-17 13:46:11 +0000
commitf6956120813ff19cbfd6ac70ac0cea9b117fcc1f (patch)
tree5af68e6dc782fc48c3a2cab0c2e8a8e927b76b8e /sys/dev/audio.c
parentuse au_get_gain()/au_set_gain() and the new au_get_mute()/au_set_mute() (diff)
downloadwireguard-openbsd-f6956120813ff19cbfd6ac70ac0cea9b117fcc1f.tar.xz
wireguard-openbsd-f6956120813ff19cbfd6ac70ac0cea9b117fcc1f.zip
implement the output_muted member of audio_info_t as found in original
Sun audio. input from and ok ratchov
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r--sys/dev/audio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 40dc9e9ea02..7ab08aba6d5 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.77 2007/09/17 13:35:46 jakemsr Exp $ */
+/* $OpenBSD: audio.c,v 1.78 2007/09/17 13:46:11 jakemsr Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
@@ -2723,6 +2723,12 @@ audiosetinfo(struct audio_softc *sc, struct audio_info *ai)
return(error);
}
+ if (ai->output_muted != (u_char)~0) {
+ error = au_set_mute(sc, &sc->sc_outports, ai->output_muted);
+ if (error)
+ return(error);
+ }
+
if (ai->monitor_gain != ~0 &&
sc->sc_monitor_port != -1) {
mixer_ctrl_t ct;
@@ -2877,6 +2883,8 @@ audiogetinfo(struct audio_softc *sc, struct audio_info *ai)
} else
ai->monitor_gain = 0;
+ au_get_mute(sc, &sc->sc_outports, &ai->output_muted);
+
p->seek = sc->sc_pr.used / sc->sc_pparams.factor;
r->seek = sc->sc_rr.used / sc->sc_rparams.factor;