summaryrefslogtreecommitdiff
path: root/share/man/man9
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-11-02 10:41:35 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-11-02 10:41:35 +0000
commitc440089b7c93a68e7af608f8ab86c4a518cc454a (patch)
tree2577bc02684daf1905bc160dfba711b3f764e84f /share/man/man9
parent9ebf01525d764141a5d3ebd642a0278c26e4de4a (diff)
Remove audio(9) speaker_ctl(), let open() handle speakers where needed
Only five legacy half-duplex hardware drivers require this function to change between playing and recording: i386: ess(4), gus(4), pas(4), sb(4) luna88k: nec86(4) If defined, it is always called early in audio_open(), so just move the call from audio(4) to each hardware driver's open() handler. SPKR_ON/OFF remain defined to leave driver-specific code unchanged. Further cleanup (unchecked speaker_ctl() return values, FWRITE -> AUMODE_PLAY -> SPKR_ON dances, etc.) can happen later. Builds fine on i386. OK ratchov
Diffstat (limited to 'share/man/man9')
-rw-r--r--share/man/man9/audio.914
1 files changed, 2 insertions, 12 deletions
diff --git a/share/man/man9/audio.9 b/share/man/man9/audio.9
index f03bd74c8b8..95a4495ae8c 100644
--- a/share/man/man9/audio.9
+++ b/share/man/man9/audio.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: audio.9,v 1.33 2022/10/28 15:13:59 kn Exp $
+.\" $OpenBSD: audio.9,v 1.34 2022/11/02 10:41:34 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 28 2022 $
+.Dd $Mdocdate: November 2 2022 $
.Dt AUDIO 9
.Os
.Sh NAME
@@ -60,10 +60,6 @@ struct audio_hw_if {
int (*halt_output)(void *);
int (*halt_input)(void *);
- int (*speaker_ctl)(void *, int);
-#define SPKR_ON 1
-#define SPKR_OFF 0
-
int (*set_port)(void *, struct mixer_ctrl *);
int (*get_port)(void *, struct mixer_ctrl *);
@@ -275,12 +271,6 @@ This function is called to abort the input transfer (started by
.Fn start_input )
in progress.
This function returns 0 on success, otherwise an error code.
-.It Ft int Fn (*speaker_ctl) "void *hdl" "int on"
-This function is optional.
-If supplied, it is called when a half duplex device changes between
-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 (*set_port) "void *hdl" "struct mixer_ctrl *mc"
This function is called when the
.Dv AUDIO_MIXER_WRITE