summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-04-01 00:52:11 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-04-01 00:52:11 +0000
commitb2bbe181c68eaf1494d3a663031c2e0db78b070e (patch)
tree81fcf3f0d7a9b5d3db024edd8f23f3e8e3148870 /sys/dev
parent2b82be606326a1b55b6e7388430baa01e8e35eaf (diff)
Fix audio_volume_toggle. How did this ever work for me? Thinkpad T61
mutes audio automatically when the mute key is pressed.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/audio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 90214df0d2b..7edfcce942d 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.237 2008/03/12 18:02:21 dyoung Exp $ */
+/* $NetBSD: audio.c,v 1.238 2008/04/01 00:52:11 jmcneill Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.237 2008/03/12 18:02:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.238 2008/04/01 00:52:11 jmcneill Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -4105,9 +4105,9 @@ audio_volume_toggle(device_t dv)
au_get_gain(sc, &sc->sc_outports, &gain, &balance);
if (gain != 0) {
sc->sc_lastgain = gain;
- newgain = sc->sc_lastgain;
- } else
newgain = 0;
+ } else
+ newgain = sc->sc_lastgain;
au_set_gain(sc, &sc->sc_outports, newgain, balance);
splx(s);
}