-.\" $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.
.\" 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
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 *);
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.
-/* $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>
*
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) {
/*
-/* $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 $ */
/*
#include <sys/mutex.h>
-/*
- * get_props
- */
-#define AUDIO_PROP_FULLDUPLEX 0x01
-
#define AUDIO_BPS(bits) (bits) <= 8 ? 1 : ((bits) <= 16 ? 2 : 4)
/*
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,