Subject: misc/21432: Corrections to audio.9 man page
To: None <>
From: None <>
List: netbsd-bugs
Date: 05/03/2003 01:46:02
>Number:         21432
>Category:       misc
>Synopsis:       Corrections to audio.9 man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 03 01:47:00 UTC 2003
>Originator:     Murray Armfield
>Release:        NetBSD-current
The audio.9 man page is out of sync with the function definitions as found in sys/dev/audio_if.h
Compiliation with the previous documented definitions will produce issues.
Write an audio driver using the documented audio interface and try compiling.
--- audio.9.orig        2003-04-07 15:27:26.000000000 +1000
+++ audio.9
@@ -81,10 +81,10 @@ struct audio_hw_if {

        int     (*query_devinfo)(void *, mixer_devinfo_t *);

-       void    *(*allocm)(void *, int, size_t, int, int);
-       void    (*freem)(void *, void *, int);
+       void    *(*allocm)(void *, int, size_t, struct malloc_type *, int);
+       void    (*freem)(void *, void *, struct malloc_type *);
        size_t  (*round_buffersize)(void *, int, size_t);
-       int     (*mappage)(void *, void *, int, int);
+       paddr_t (*mappage)(void *, void *, off_t, int);

        int     (*get_props)(void *);

@@ -406,7 +406,7 @@ It should fill the
 .Va mixer_devinfo_t
 Return 0 on success, otherwise an error code.
-.It Dv "void *allocm(void *hdl, int direction, size_t size, int type, int flags)"
+.It Dv "void *allocm(void *hdl, int direction, size_t size, struct malloc_type *type, int flags)"
 optional, is called to allocate the device buffers.
 If not present
@@ -416,7 +416,7 @@ The reason for using a device dependent
 .Xr malloc 9
 is that some buses need special allocation to do DMA.
 Returns the address of the buffer, or 0 on failure.
-.It Dv void freem(void *hdl, void *addr, int type)
+.It Dv void freem(void *hdl, void *addr, struct malloc_type *type)
 optional, is called to free memory allocated by
 .Va alloc .
 If not supplied
@@ -429,7 +429,7 @@ The upper layer supplies the suggested s
 .Va bufsize ,
 which the hardware driver can then change if needed.
 E.g., DMA on the ISA bus cannot exceed 65536 bytes.
-.It Dv "int mappage(void *hdl, void *addr, int offs, int prot)"
+.It Dv "paddr_t mappage(void *hdl, void *addr, off_t offs, int prot)"
 optional, is called for
 .Xr mmap 2 .