Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev restore audiobell api
details: https://anonhg.NetBSD.org/src/rev/4b97de28d023
branches: trunk
changeset: 349391:4b97de28d023
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 09 13:26:11 2016 +0000
description:
restore audiobell api
diffstat:
sys/dev/audiobell.c | 8 ++++----
sys/dev/audiobellvar.h | 4 ++--
sys/dev/spkr_synth.c | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diffs (95 lines):
diff -r 639e0be9b81f -r 4b97de28d023 sys/dev/audiobell.c
--- a/sys/dev/audiobell.c Fri Dec 09 13:16:22 2016 +0000
+++ b/sys/dev/audiobell.c Fri Dec 09 13:26:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiobell.c,v 1.10 2016/12/09 13:16:22 christos Exp $ */
+/* $NetBSD: audiobell.c,v 1.11 2016/12/09 13:26:11 christos Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.10 2016/12/09 13:16:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.11 2016/12/09 13:26:11 christos Exp $");
#include <sys/audioio.h>
#include <sys/conf.h>
@@ -137,14 +137,14 @@
}
void
-audiobell(int unit, u_int pitch, u_int period, u_int volume, int poll)
+audiobell(void *unit, u_int pitch, u_int period, u_int volume, int poll)
{
uint8_t *buf;
struct audio_info ai;
struct uio auio;
struct iovec aiov;
int size, len, offset;
- dev_t audio = (dev_t)(AUDIO_DEVICE | unit);
+ dev_t audio = (dev_t)(AUDIO_DEVICE | *(int *)unit);
/* The audio system isn't built for polling. */
if (poll) return;
diff -r 639e0be9b81f -r 4b97de28d023 sys/dev/audiobellvar.h
--- a/sys/dev/audiobellvar.h Fri Dec 09 13:16:22 2016 +0000
+++ b/sys/dev/audiobellvar.h Fri Dec 09 13:26:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiobellvar.h,v 1.8 2016/12/09 13:16:22 christos Exp $ */
+/* $NetBSD: audiobellvar.h,v 1.9 2016/12/09 13:26:11 christos Exp $ */
/*-
* Copyright (c) 2004 Ben Harris
@@ -38,4 +38,4 @@
* This function is designed to be passed to pckbd_hookup_bell() and
* equivalents.
*/
-void audiobell(int, u_int, u_int, u_int, int);
+void audiobell(void *, u_int, u_int, u_int, int);
diff -r 639e0be9b81f -r 4b97de28d023 sys/dev/spkr_synth.c
--- a/sys/dev/spkr_synth.c Fri Dec 09 13:16:22 2016 +0000
+++ b/sys/dev/spkr_synth.c Fri Dec 09 13:26:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr_synth.c,v 1.4 2016/12/09 13:16:22 christos Exp $ */
+/* $NetBSD: spkr_synth.c,v 1.5 2016/12/09 13:26:11 christos Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr_synth.c,v 1.4 2016/12/09 13:16:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr_synth.c,v 1.5 2016/12/09 13:26:11 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,7 +97,7 @@
void
spkr_tone(u_int xhz, u_int ticks)
{
- audiobell(beep_unit, xhz, ticks * (1000 / hz), 80, 0);
+ audiobell(&beep_unit, xhz, ticks * (1000 / hz), 80, 0);
}
void
@@ -107,7 +107,7 @@
printf("%s: %d\n", __func__, ticks);
#endif /* SPKRDEBUG */
if (ticks > 0)
- audiobell(beep_unit, 0, ticks * (1000 / hz), 80, 0);
+ audiobell(&beep_unit, 0, ticks * (1000 / hz), 80, 0);
}
device_t
@@ -202,7 +202,7 @@
bperiod = vb->period;
bvolume = vb->volume;
mutex_exit(&sc_bellock);
- audiobell(beep_unit, bpitch, bperiod, bvolume, 0);
+ audiobell(&beep_unit, bpitch, bperiod, bvolume, 0);
}
}
Home |
Main Index |
Thread Index |
Old Index