diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-10-28 15:14:00 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-10-28 15:14:00 +0000 |
commit | f139e80aaa659ed1d34b708d4706ce9168ab53f1 (patch) | |
tree | 02d66947aee231a7b715befea7fa00caac4bbd38 | |
parent | 7748f5584bd34aad23da0c47e9b9c9222f757220 (diff) |
Remove unused audio(9) get_props()/AUDIO_PROP_FULLDUPLEX
All audio drivers have been cleaned up and, if needed, now check for duplex
mode in their open() handler.
OK ratchov miod
-rw-r--r-- | share/man/man9/audio.9 | 9 | ||||
-rw-r--r-- | sys/dev/audio.c | 11 | ||||
-rw-r--r-- | sys/dev/audio_if.h | 9 |
3 files changed, 4 insertions, 25 deletions
diff --git a/share/man/man9/audio.9 b/share/man/man9/audio.9 index c5e419aaf80..f03bd74c8b8 100644 --- a/share/man/man9/audio.9 +++ b/share/man/man9/audio.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: audio.9,v 1.32 2022/10/19 19:59:06 kn Exp $ +.\" $OpenBSD: audio.9,v 1.33 2022/10/28 15:13:59 kn Exp $ .\" $NetBSD: audio.9,v 1.14 2000/02/11 22:56:15 kleink Exp $ .\" .\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 19 2022 $ +.Dd $Mdocdate: October 28 2022 $ .Dt AUDIO 9 .Os .Sh NAME @@ -72,7 +72,6 @@ struct audio_hw_if { void *(*allocm)(void *, int, size_t, int, int); void (*freem)(void *, void *, int); size_t (*round_buffersize)(void *, int, size_t); - int (*get_props)(void *); int (*trigger_output)(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); @@ -344,10 +343,6 @@ Note that the buffer size is always a multiple of the block size, so and .Fn round_buffersize must be consistent. -.It Ft int Fn (*get_props) "void *hdl" -This function returns a combination of -.Dv AUDIO_PROP_xxx -properties. .It Ft int Fn (*trigger_output) "void *hdl" "void *start" "void *end" "int blksize" \ "void (*intr)(void *)" "void *intrarg" "struct audio_params *param" This function is optional. diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 700a148c042..d57a743460a 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.202 2022/10/26 20:19:07 kn Exp $ */ +/* $OpenBSD: audio.c,v 1.203 2022/10/28 15:13:59 kn Exp $ */ /* * Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org> * @@ -1491,15 +1491,6 @@ audio_open(struct audio_softc *sc, int flags) sc->mode |= AUMODE_PLAY; if (flags & FREAD) sc->mode |= AUMODE_RECORD; - if (sc->ops->get_props) { - int props = sc->ops->get_props(sc->arg); - if (sc->mode == (AUMODE_PLAY | AUMODE_RECORD)) { - if (!(props & AUDIO_PROP_FULLDUPLEX)) { - error = ENOTTY; - goto bad; - } - } - } if (sc->ops->speaker_ctl) { /* diff --git a/sys/dev/audio_if.h b/sys/dev/audio_if.h index 97efa74c75c..564139271bb 100644 --- a/sys/dev/audio_if.h +++ b/sys/dev/audio_if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: audio_if.h,v 1.40 2022/10/19 19:59:07 kn Exp $ */ +/* $OpenBSD: audio_if.h,v 1.41 2022/10/28 15:13:59 kn Exp $ */ /* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */ /* @@ -40,11 +40,6 @@ #include <sys/mutex.h> -/* - * get_props - */ -#define AUDIO_PROP_FULLDUPLEX 0x01 - #define AUDIO_BPS(bits) (bits) <= 8 ? 1 : ((bits) <= 16 ? 2 : 4) /* @@ -121,8 +116,6 @@ struct audio_hw_if { void (*freem)(void *, void *, int); size_t (*round_buffersize)(void *, int, size_t); - int (*get_props)(void *); /* device properties */ - int (*trigger_output)(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); int (*trigger_input)(void *, void *, void *, int, |