Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Document a new method, dev_ioctl, for passing...



details:   https://anonhg.NetBSD.org/src/rev/765b69648877
branches:  trunk
changeset: 515706:765b69648877
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Oct 02 23:58:03 2001 +0000

description:
Document a new method, dev_ioctl, for passing ioctl() down to the hardware
driver.

diffstat:

 share/man/man9/audio.9 |  78 ++++++++++++++++++++++++++++---------------------
 1 files changed, 44 insertions(+), 34 deletions(-)

diffs (117 lines):

diff -r ee4b25dc0996 -r 765b69648877 share/man/man9/audio.9
--- a/share/man/man9/audio.9    Tue Oct 02 23:31:54 2001 +0000
+++ b/share/man/man9/audio.9    Tue Oct 02 23:58:03 2001 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: audio.9,v 1.17 2001/06/21 11:59:00 wiz Exp $
+.\"    $NetBSD: audio.9,v 1.18 2001/10/02 23:58:03 augustss Exp $
 .\"
 .\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -49,49 +49,51 @@
 structure.
 .Bd -literal
 struct audio_hw_if {
-       int     (*open)__P((void *, int));
-       void    (*close)__P((void *));
-       int     (*drain)__P((void *));
+       int     (*open)(void *, int);
+       void    (*close)(void *);
+       int     (*drain)(void *);
 
-       int     (*query_encoding)__P((void *, struct audio_encoding *));
-       int     (*set_params)__P((void *, int, int,
-                       struct audio_params *, struct audio_params *));
-       int     (*round_blocksize)__P((void *, int));
+       int     (*query_encoding)(void *, struct audio_encoding *);
+       int     (*set_params)(void *, int, int,
+                   struct audio_params *, struct audio_params *);
+       int     (*round_blocksize)(void *, int);
 
-       int     (*commit_settings)__P((void *));
+       int     (*commit_settings)(void *);
 
-       int     (*init_output)__P((void *, void *, int));
-       int     (*init_input)__P((void *, void *, int));
-       int     (*start_output)__P((void *, void *, int,
-                                   void (*)(void *), void *));
-       int     (*start_input)__P((void *, void *, int,
-                                  void (*)(void *), void *));
-       int     (*halt_output)__P((void *));
-       int     (*halt_input)__P((void *));
+       int     (*init_output)(void *, void *, int);
+       int     (*init_input)(void *, void *, int);
+       int     (*start_output)(void *, void *, int, void (*)(void *),
+                   void *);
+       int     (*start_input)(void *, void *, int, void (*)(void *),
+                   void *);
+       int     (*halt_output)(void *);
+       int     (*halt_input)(void *);
 
-       int     (*speaker_ctl)__P((void *, int));
+       int     (*speaker_ctl)(void *, int);
 #define SPKR_ON  1
 #define SPKR_OFF 0
 
-       int     (*getdev)__P((void *, struct audio_device *));
-       int     (*setfd)__P((void *, int));
+       int     (*getdev)(void *, struct audio_device *);
+       int     (*setfd)(void *, int);
 
-       int     (*set_port)__P((void *, mixer_ctrl_t *));
-       int     (*get_port)__P((void *, mixer_ctrl_t *));
+       int     (*set_port)(void *, mixer_ctrl_t *);
+       int     (*get_port)(void *, mixer_ctrl_t *);
 
-       int     (*query_devinfo)__P((void *, mixer_devinfo_t *));
+       int     (*query_devinfo)(void *, mixer_devinfo_t *);
 
-       void    *(*allocm)__P((void *, int, size_t, int, int));
-       void    (*freem)__P((void *, void *, int));
-       size_t  (*round_buffersize)__P((void *, int, size_t));
-       int     (*mappage)__P((void *, void *, int, int));
+       void    *(*allocm)(void *, int, size_t, int, int);
+       void    (*freem)(void *, void *, int);
+       size_t  (*round_buffersize)(void *, int, size_t);
+       int     (*mappage)(void *, void *, int, int);
+
+       int     (*get_props)(void *);
 
-       int     (*get_props)__P((void *));
-
-       int     (*trigger_output)__P((void *, void *, void *, int,
-                       void (*)(void *), void *, struct audio_params *));
-       int     (*trigger_input)__P((void *, void *, void *, int,
-                       void (*)(void *), void *, struct audio_params *));
+       int     (*trigger_output)(void *, void *, void *, int,
+                   void (*)(void *), void *, struct audio_params *);
+       int     (*trigger_input)(void *, void *, void *, int,
+                   void (*)(void *), void *, struct audio_params *);
+       int     (*dev_ioctl)(struct audio_softc *sc, u_long cmd,
+                   caddr_t addr, int flag, struct proc *p);
 };
 
 struct audio_params {
@@ -100,7 +102,7 @@
        u_int   precision;              /* bits/sample */
        u_int   channels;               /* mono(1), stereo(2) */
        /* Software en/decode functions, set if SW coding required by HW */
-       void    (*sw_code)__P((void *, u_char *, int));
+       void    (*sw_code)(void *, u_char *, int);
        int     factor;                 /* coding space change */
 };
 .Ed
@@ -409,6 +411,14 @@
 Once started the transfer may be stopped using
 .Va halt_input .
 Return 0 on success, otherwise an error code.
+.It Dv int dev_ioctl(struct audio_softc *sc, u_long cmd, caddr_t addr,
+.br
+.Dv "int flag, struct proc *p)"
+.br
+optional, is called when an
+.Xr ioctl 2
+is not recognized by the generic audio driver.
+Return 0 on success, otherwise an error code.
 .El
 .Pp
 The



Home | Main Index | Thread Index | Old Index