After converting all drivers to play/record/duplex checks in their
open() handler, those bits are no longer used and can go.
OK once the other diffs are in?
---
share/man/man9/audio.9 | 5 -----
sys/dev/audio.c | 9 ---------
sys/dev/audio_if.h | 7 -------
3 files changed, 21 deletions(-)
diff --git a/share/man/man9/audio.9 b/share/man/man9/audio.9
index c5e419aaf80..eb266972966 100644
--- a/share/man/man9/audio.9
+++ b/share/man/man9/audio.9
@@ -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..849bb1bbb67 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -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..ac81e783348 100644
--- a/sys/dev/audio_if.h
+++ b/sys/dev/audio_if.h
@@ -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,
--
2.38.1