1*76748ca4Srillig.\" $NetBSD: wsbell.4,v 1.2 2024/09/08 17:28:36 rillig 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.\" 27d862308aSnat.Dd June 13, 2017 28d862308aSnat.Dt WSBELL 4 29d862308aSnat.Os 30d862308aSnat.Sh NAME 31d862308aSnat.Nm wsbell 32d862308aSnat.Nd generic bell support in wscons 33d862308aSnat.Sh SYNOPSIS 34d862308aSnat.Cd "wsbell* at spkr? console?" 35d862308aSnat.Sh DESCRIPTION 36d862308aSnatThe 37d862308aSnat.Nm 38d862308aSnatdriver utilizes the 39d862308aSnat.Xr speaker 4 40d862308aSnatdriver to provide a system bell with or without a keyboard for the 41d862308aSnat.Xr wscons 4 42d862308aSnatframework. 43d862308aSnatWhen a bell character is received on a 44d862308aSnat.Xr wsdisplay 4 45d862308aSnatscreen, 46d862308aSnat.Nm 47d862308aSnatsounds the bell. 48d862308aSnat.Pp 49d862308aSnatThe 50d862308aSnat.Xr wsconsctl 8 51*76748ca4Srilligutility gives access to several configurable parameters that affect the sound 52d862308aSnatof the system bell. 53d862308aSnat.Ss Ioctls 54d862308aSnatThe following 55d862308aSnat.Xr ioctl 2 56d862308aSnatcalls are provided by the 57d862308aSnat.Nm 58d862308aSnatdriver. 59d862308aSnatTheir definitions are found in 60d862308aSnat.Pa dev/wscons/wsconsio.h . 61d862308aSnat.Bl -tag -width Dv 62d862308aSnat.It Dv WSKBDIO_BELL 63d862308aSnatWill sound the default bell. 64d862308aSnat.It Dv WSKBDIO_GETBELL 65d862308aSnatWill return a struct wskbd_bell_data with the current bell parameters. 66d862308aSnat.It Dv WSKBDIO_SETBELL 67d862308aSnatTakes a struct wskbd_bell_data and uses it to set the bell parameters. 68d862308aSnatThese are used by the WSKBDIO_BELL 69d862308aSnat.Xr ioctl 2 70d862308aSnatcall. 71d862308aSnat.It Dv WSKBDIO_COMPLEXBELL 72d862308aSnatWill sound a bell using a supplied struct wskbd_bell_data for its parameters. 73d862308aSnat.It Dv WSKBDIO_GETDEFAULTBELL 74d862308aSnatWill return a struct wskbd_bell_data with the 75d862308aSnat.Em default 76d862308aSnatbell parameters. 77d862308aSnat.It Dv WSKBDIO_SETDEFAULTBELL 78d862308aSnatTakes a struct wskbd_bell_data and uses it to set the 79d862308aSnat.Em default 80d862308aSnatbell parameters. 81d862308aSnat.El 82d862308aSnat.Pp 83d862308aSnatIoctls use the following structure: 84d862308aSnat.Bd -literal 85d862308aSnatstruct wskbd_bell_data { 86d862308aSnat u_int which; /* values to get/set */ 87d862308aSnat#define WSKBD_BELL_DOPITCH 0x1 /* get/set pitch */ 88d862308aSnat#define WSKBD_BELL_DOPERIOD 0x2 /* get/set period */ 89d862308aSnat#define WSKBD_BELL_DOVOLUME 0x4 /* get/set volume */ 90d862308aSnat#define WSKBD_BELL_DOALL 0x7 /* all of the above */ 91d862308aSnat u_int pitch; /* pitch, in Hz */ 92d862308aSnat u_int period; /* period, in milliseconds */ 93d862308aSnat u_int volume; /* percentage of max volume */ 94d862308aSnat}; 95d862308aSnat.Ed 96d862308aSnat.Sh FILES 97d862308aSnat.Bl -item 98d862308aSnat.It 99d862308aSnat.Pa /usr/include/dev/wscons/wsconsio.h . 100d862308aSnat.El 101d862308aSnat.Sh SEE ALSO 102d862308aSnat.Xr speaker 4 , 103d862308aSnat.Xr wscons 4 , 104d862308aSnat.Xr wskbd 4 , 105d862308aSnat.Xr wsmux 4 , 106d862308aSnat.Xr wsconsctl 8 , 107d862308aSnat.Xr wsbell 9 108