diff options
author | 2007-09-10 05:34:32 +0000 | |
---|---|---|
committer | 2007-09-10 05:34:32 +0000 | |
commit | a9b90787f7c9076965a4e23cd06d60384bda80ed (patch) | |
tree | 47476049c23f45b7443828a4affadd31e841a8a0 | |
parent | Add command verbs, a mixer target and mixer controls for EAPD control. (diff) | |
download | wireguard-openbsd-a9b90787f7c9076965a4e23cd06d60384bda80ed.tar.xz wireguard-openbsd-a9b90787f7c9076965a4e23cd06d60384bda80ed.zip |
initialize sc_outports->master and sc_inports->master. Fixes "set failed"
errors when running audioctl(1) on devices without master controls
ok jakemsr@
-rw-r--r-- | sys/dev/audio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 30f5b17a3ae..7af6b0257b4 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.73 2007/09/09 02:55:18 jakemsr Exp $ */ +/* $OpenBSD: audio.c,v 1.74 2007/09/10 05:34:32 ratchov Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -297,10 +297,12 @@ audioattach(struct device *parent, struct device *self, void *aux) sc->sc_inports.nports = 0; sc->sc_inports.isenum = 0; sc->sc_inports.allports = 0; + sc->sc_inports.master = -1; sc->sc_outports.index = -1; sc->sc_outports.nports = 0; sc->sc_outports.isenum = 0; sc->sc_outports.allports = 0; + sc->sc_outports.master = -1; sc->sc_monitor_port = -1; for(mi.index = 0; ; mi.index++) { if (hwp->query_devinfo(hdlp, &mi) != 0) |