NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-mac68k/60691: WSKBDIO_COMPLEXBELL discards the requested volume and always passes 100
>Number: 60691
>Category: port-mac68k
>Synopsis: WSKBDIO_COMPLEXBELL discards the requested volume and always passes 100
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-mac68k-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 08 10:00:00 +0000 2026
>Originator: Ray Tran
>Release: 11.0
>Organization:
Diamond Creek Digital
>Environment:
NetBSD 11.0 (Q650WSMUX) #22: Mon Sep 7 10:03:36 UTC 2026
>Description:
kbd_ioctl()'s WSKBDIO_COMPLEXBELL case passes a hard-coded 100 as the
volume argument to mac68k_ring_bell(), discarding the volume the caller
asked for. The existing comment says as much ("volume ignored"). The
consequence is that wsconsctl(8) bell.volume has no effect on mac68k,
whatever sound hardware is fitted.
Pitch and period are passed through correctly; only volume is dropped.
>How-To-Repeat:
wsconsctl -w bell.volume=10, then ring the bell. It is as loud as before.
>Fix:
One line: pass d->volume instead of the literal. Tested on a Centris 650.
Applies with "patch -p1" from the top of usr/src; verified with -F0
(no fuzz) against NetBSD-current 11.99.8 (20260830003849Z) and 11.0.
--- a/sys/arch/mac68k/dev/akbd.c
+++ b/sys/arch/mac68k/dev/akbd.c
@@ -493,8 +493,9 @@
return 0;
case WSKBDIO_COMPLEXBELL:
#define d ((struct wskbd_bell_data *)data)
- mac68k_ring_bell(d->pitch, d->period * hz / 1000, 100);
- /* comes in as msec, goes out as ticks; volume ignored */
+ /* period: msec in, ticks out; volume is 0-100 */
+ mac68k_ring_bell(d->pitch, d->period * hz / 1000,
+ d->volume > 100 ? 100 : d->volume);
#undef d
return (0);
#ifdef WSDISPLAY_COMPAT_RAWKBD
Home |
Main Index |
Thread Index |
Old Index