diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-04-20 20:29:23 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-04-20 20:29:23 +0000 |
commit | 604773d10a25faf9b29cf229a2b2a1e5a40a7266 (patch) | |
tree | 5888ae868e0dac099d9e94c6fe1fc1ac8c8582b3 | |
parent | 50a6490a7bb139bdc0de87d68a1396ca4fe011d0 (diff) |
Remove references to the mixer device, rework control device section
Add the missing paragraph to explain that the control device may be
read. Add the missing .Xr to sndioctl and sioctl_open.
ok and tweaks jmc@
-rw-r--r-- | share/man/man4/audio.4 | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/share/man/man4/audio.4 b/share/man/man4/audio.4 index f6ad95f8bbd..c11b24642db 100644 --- a/share/man/man4/audio.4 +++ b/share/man/man4/audio.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: audio.4,v 1.82 2018/08/05 11:46:31 ratchov Exp $ +.\" $OpenBSD: audio.4,v 1.83 2020/04/20 20:29:22 ratchov Exp $ .\" $NetBSD: audio.4,v 1.20 1998/05/28 17:27:15 augustss Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,13 +28,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: August 5 2018 $ +.Dd $Mdocdate: April 20 2020 $ .Dt AUDIO 4 .Os .Sh NAME .Nm audio , -.Nm audioctl , -.Nm mixer +.Nm audioctl .Nd device-independent audio driver layer .Sh SYNOPSIS .Cd "audio* at ..." @@ -75,17 +74,16 @@ variable. This is the default. .El .Pp -There are three types of device files available for audio operation: +There are two types of device files available for audio operation: .Bl -dash -offset indent .It Audio devices are used for recording or playback of digital samples. .It -Control devices can be used to read the +Control devices are used to manipulate audio device +parameters like volume or recording source. +They can also read certain .Nm driver variables while it is in use. -.It -Mixer devices are used to manipulate volume, recording source, -or other audio mixer functions. .El .Sh AUDIO DEVICES When audio devices are opened, @@ -284,27 +282,20 @@ If set, indicates that the device is playing and/or recording. .El .El .Sh CONTROL DEVICES -Audio control devices accept the same -.Xr ioctl 2 -except -.Dv AUDIO_START -and -.Dv AUDIO_STOP . -In contrast to audio devices, -which have the exclusive open property, -control devices can be opened at any time. -.Pp -While the audio device is open, audio parameters -.Dv AUDIO_SETPAR -may not be used. -.Sh MIXER DEVICES -Mixer devices support the following +Control devices support the following .Xr ioctl 2 commands: .Pp .Bl -tag -width Ds -compact .It Dv AUDIO_GETDEV Fa "audio_device_t *" -This command is the same as described above for the audio devices. +.It Dv AUDIO_GETPOS Fa "struct audio_pos *" +.It Dv AUDIO_GETSTATUS Fa "struct audio_status *" +.It Dv AUDIO_GETPAR Fa "struct audio_swpar *" +.It Dv AUDIO_SETPAR Fa "struct audio_swpar *" +These commands are the same as described above for the audio devices. +While the audio device is open, +.Dv AUDIO_SETPAR +may not be used. .Pp .It Dv AUDIO_MIXER_READ Fa "mixer_ctrl_t *" .It Dv AUDIO_MIXER_WRITE Fa "mixer_ctrl_t *" @@ -490,26 +481,37 @@ and .\" For AUDIO_MIXER_SET mixer control types, what is what? .El .Pp -By convention, all the mixer devices can be distinguished from other -mixer controls because they use a name from one of the -.Dv AudioC* -string values. +A process may read the control device to get notifications about +mixer changes. +Whenever a control changes, the +.Xr read 2 +function fetches an integer identifying the control. +It may be used in the +.Va dev +field of the +.Va mixer_ctrl +structure to call +.Dv AUDIO_MIXER_READ . +.Pp +In contrast to audio devices, which have the exclusive open property, +control devices can be opened at any time in write-only mode. +Only one reader is allowed at a time. .Sh FILES .Bl -tag -width /dev/audioctlN -compact .It Pa /dev/audio Ns Ar N Audio device. .It Pa /dev/audioctl Ns Ar N Control device. -.It Pa /dev/mixer Ns Ar N -Mixer device. .El .Sh SEE ALSO .Xr aucat 1 , .Xr audioctl 1 , .Xr cdio 1 , .Xr mixerctl 1 , +.Xr sndioctl 1 , .Xr ioctl 2 , .Xr sio_open 3 , +.Xr sioctl_open 3 , .Xr ac97 4 , .Xr uaudio 4 , .Xr sndio 7 , |