xref: /netbsd-src/share/man/man9/wsbell.9 (revision efc48405e04a55f2d6cb622c31973f9135ffa54c)
1*efc48405Swiz.\" $NetBSD: wsbell.9,v 1.4 2018/02/11 14:17:17 wiz Exp $
2d862308aSnat.\"
3d862308aSnat.\" Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au>
4d862308aSnat.\" All rights reserved.
5d862308aSnat.\"
6d862308aSnat.\" Redistribution and use in source and binary forms, with or without
7d862308aSnat.\" modification, are permitted provided that the following conditions
8d862308aSnat.\" are met:
9d862308aSnat.\" 1. Redistributions of source code must retain the above copyright
10d862308aSnat.\"    notice, this list of conditions and the following disclaimer.
11d862308aSnat.\" 2. Redistributions in binary form must reproduce the above copyright
12d862308aSnat.\"    notice, this list of conditions and the following disclaimer in the
13d862308aSnat.\"    documentation and/or other materials provided with the distribution.
14d862308aSnat.\"
15d862308aSnat.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16d862308aSnat.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17d862308aSnat.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18d862308aSnat.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19d862308aSnat.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20d862308aSnat.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21d862308aSnat.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22d862308aSnat.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23d862308aSnat.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24d862308aSnat.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25d862308aSnat.\" POSSIBILITY OF SUCH DAMAGE.
26d862308aSnat.\"
273f552b26Spgoyette.Dd June 30, 2017
28d862308aSnat.Dt WSBELL 9
29d862308aSnat.Os
30d862308aSnat.Sh NAME
31d862308aSnat.Nm wsbell ,
32d862308aSnat.Nm wsbelldevprint
33d862308aSnat.Nd wscons system bell support
34d862308aSnat.Sh SYNOPSIS
35d862308aSnat.In dev/wscons/wsconsio.h
36d862308aSnat.In dev/wscons/wsbellvar.h
37d862308aSnat.Ft int
38d862308aSnat.Fn wsbelldevprint "void *aux" "const char *pnp"
39d862308aSnat.Sh DESCRIPTION
40d862308aSnatThe
41d862308aSnat.Nm
42d862308aSnatmodule is a component of the
43d862308aSnat.Xr wscons 9
443f552b26Spgoyetteframework, providing keyboard-independent bell support.
45d862308aSnatAll of the support is provided by the
46d862308aSnat.Xr wsbell 4
47d862308aSnatdevice driver, which must be a child of the hardware device driver.
48d862308aSnatThe only hardware device drivers that can provide a
49d862308aSnat.Nm
50d862308aSnatfacility are
51d862308aSnat.Xr speaker 4
52d862308aSnatdevices.
53d862308aSnat.Sh DATA TYPES
54d862308aSnatSpeaker drivers providing support for wscons bell devices will make use
55d862308aSnatof the following data types:
56d862308aSnat.Bl -tag -width compact
57d862308aSnat.It Fa struct wsbelldev_attach_args
58d862308aSnatA structure used to attach the
59d862308aSnat.Xr wsbell 4
60d862308aSnatchild device.
61d862308aSnatIt has the following members:
62d862308aSnat.Bd -literal
63d862308aSnat	void *accesscookie;
64d862308aSnat.Ed
65d862308aSnat.El
66d862308aSnat.Sh FUNCTIONS
67d862308aSnat.Bl -tag -width compact
68d862308aSnat.It Fn wsbelldevprint "aux" "pnp"
69d862308aSnatThe default wsbell printing routine used by
70d862308aSnat.Fn config_found .
71d862308aSnat(see
72d862308aSnat.Xr autoconf 9 ) .
73d862308aSnat.El
74d862308aSnat.Sh AUTOCONFIGURATION
75d862308aSnatSpeaker drivers which want to use the wsbell module must be a
76d862308aSnatparent to the
77d862308aSnat.Xr wsbell 4
78d862308aSnatdevice and provide an attachment interface.
79d862308aSnatTo attach the
80d862308aSnat.Xr wsbell 4
81d862308aSnatdevice, the speaker driver must allocate and populate a
82d862308aSnat.Fa wsbelldev_attach_args
833f552b26Spgoyettestructure with a pointer to the parent's device structure as an access cookie
84d862308aSnatand call
85d862308aSnat.Fn config_found
86d862308aSnatto perform the attach (see
87d862308aSnat.Xr autoconf 9 ) .
88d862308aSnat.Sh OPERATION
89533063d8SdhollandWhen a bell event is received on a
90d862308aSnat.Xr wsdisplay 4
91d862308aSnatdevice the system bell is sounded.
92d862308aSnat.Sh CODE REFERENCES
93d862308aSnatThe wscons subsystem is implemented within the directory
94d862308aSnat.Pa sys/dev/wscons .
95d862308aSnatThe
96d862308aSnat.Nm
97d862308aSnatmodule itself is implement within the file
98d862308aSnat.Pa sys/dev/wscons/wsbell.c .
99d862308aSnat.Xr ioctl 2
100d862308aSnatoperations are listed in
101d862308aSnat.Pa sys/dev/wscons/wsconsio.h .
102d862308aSnat.Sh SEE ALSO
103d862308aSnat.Xr ioctl 2 ,
104d862308aSnat.Xr wsbell 4 ,
105*efc48405Swiz.Xr wscons 4 ,
106d862308aSnat.Xr wskbd 4 ,
107d862308aSnat.Xr autoconf 9 ,
108d862308aSnat.Xr driver 9 ,
109d862308aSnat.Xr intro 9 ,
110d862308aSnat.Xr wscons 9 ,
111d862308aSnat.Xr wsdisplay 9 ,
112d862308aSnat.Xr wskbd 9
113