-.\" $OpenBSD: audio.9,v 1.31 2022/03/31 17:27:23 naddy Exp $
+.\" $OpenBSD: audio.9,v 1.32 2022/10/19 19:59:06 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: March 31 2022 $
+.Dd $Mdocdate: October 19 2022 $
.Dt AUDIO 9
.Os
.Sh NAME
#define SPKR_ON 1
#define SPKR_OFF 0
- int (*setfd)(void *, int);
-
int (*set_port)(void *, struct mixer_ctrl *);
int (*get_port)(void *, struct mixer_ctrl *);
playing and recording.
It can, e.g., be used to turn the speaker on and off.
This function returns 0 on success, otherwise an error code.
-.It Ft int Fn (*setfd) "void *hdl" "int fd"
-This function is optional.
-If supplied, it is called when the device is opened in full-duplex mode,
-but only if the device has
-.Dv AUDIO_PROP_FULLDUPLEX
-set.
-This function returns 0 on success, otherwise an error code.
.It Ft int Fn (*set_port) "void *hdl" "struct mixer_ctrl *mc"
This function is called when the
.Dv AUDIO_MIXER_WRITE
-/* $OpenBSD: audio.c,v 1.200 2022/07/31 03:31:36 visa Exp $ */
+/* $OpenBSD: audio.c,v 1.201 2022/10/19 19:59:06 kn Exp $ */
/*
* Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org>
*
error = ENOTTY;
goto bad;
}
- if (sc->ops->setfd) {
- error = sc->ops->setfd(sc->arg, 1);
- if (error)
- goto bad;
- }
}
if (sc->ops->speaker_ctl) {
-/* $OpenBSD: audio_if.h,v 1.39 2022/10/18 08:22:18 kn Exp $ */
+/* $OpenBSD: audio_if.h,v 1.40 2022/10/19 19:59:07 kn Exp $ */
/* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */
/*
#define SPKR_ON 1
#define SPKR_OFF 0
- int (*setfd)(void *, int);
-
/* Mixer (in/out ports) */
int (*set_port)(void *, struct mixer_ctrl *);
int (*get_port)(void *, struct mixer_ctrl *);