Deleted Added
full compact
wsbell.c (1.11) wsbell.c (1.12)
1/* $NetBSD: wsbell.c,v 1.11 2019/04/18 14:01:28 isaki Exp $ */
1/* $NetBSD: wsbell.c,v 1.12 2019/06/22 08:03:01 isaki Exp $ */
2
3/*-
4 * Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au>
5 * All rights reserved.
6 *
7 * Copyright (c) 2006 The NetBSD Foundation, Inc.
8 * All rights reserved.
9 *

--- 92 unchanged lines hidden (view full) ---

102 * @(#)ms.c 8.1 (Berkeley) 6/11/93
103 */
104
105/*
106 * Keyboard Bell driver.
107 */
108
109#include <sys/cdefs.h>
2
3/*-
4 * Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au>
5 * All rights reserved.
6 *
7 * Copyright (c) 2006 The NetBSD Foundation, Inc.
8 * All rights reserved.
9 *

--- 92 unchanged lines hidden (view full) ---

102 * @(#)ms.c 8.1 (Berkeley) 6/11/93
103 */
104
105/*
106 * Keyboard Bell driver.
107 */
108
109#include <sys/cdefs.h>
110__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.11 2019/04/18 14:01:28 isaki Exp $");
110__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.12 2019/06/22 08:03:01 isaki Exp $");
111
112#if defined(_KERNEL_OPT)
113#include "wsmux.h"
114#endif
115
116#include <sys/param.h>
117#include <sys/conf.h>
118#include <sys/ioctl.h>

--- 272 unchanged lines hidden (view full) ---

391
392 return 0;
393
394 case WSKBDIO_COMPLEXBELL:
395 if ((flag & FWRITE) == 0)
396 return (EACCES);
397 if (data == NULL)
398 return 0;
111
112#if defined(_KERNEL_OPT)
113#include "wsmux.h"
114#endif
115
116#include <sys/param.h>
117#include <sys/conf.h>
118#include <sys/ioctl.h>

--- 272 unchanged lines hidden (view full) ---

391
392 return 0;
393
394 case WSKBDIO_COMPLEXBELL:
395 if ((flag & FWRITE) == 0)
396 return (EACCES);
397 if (data == NULL)
398 return 0;
399#define d ((struct wskbd_bell_data *)data)
400 spkr_audio_play(sc, d->pitch, d->period, d->volume);
401#undef d
399 ubdp = (struct wskbd_bell_data *)data;
400 SETBELL(ubdp, ubdp, &sc->sc_bell_data);
401 spkr_audio_play(sc, ubdp->pitch, ubdp->period, ubdp->volume);
402 return 0;
403 }
404
405 return (EPASSTHROUGH);
406}
407#endif
408
409static void

--- 115 unchanged lines hidden ---
402 return 0;
403 }
404
405 return (EPASSTHROUGH);
406}
407#endif
408
409static void

--- 115 unchanged lines hidden ---