2017-06-12 00:54:22 +03:00
|
|
|
/* $NetBSD: spkrvar.h,v 1.9 2017/06/11 21:54:22 pgoyette Exp $ */
|
2016-12-08 14:31:08 +03:00
|
|
|
|
|
|
|
#ifndef _SYS_DEV_SPKRVAR_H
|
|
|
|
#define _SYS_DEV_SPKRVAR_H
|
|
|
|
|
2016-12-09 08:45:20 +03:00
|
|
|
#include <sys/module.h>
|
|
|
|
|
2016-12-13 23:20:34 +03:00
|
|
|
struct spkr_softc {
|
|
|
|
device_t sc_dev;
|
2017-06-11 06:55:56 +03:00
|
|
|
device_t sc_wsbelldev;
|
2016-12-13 23:20:34 +03:00
|
|
|
int sc_octave; /* currently selected octave */
|
|
|
|
int sc_whole; /* whole-note time at current tempo, in ticks */
|
|
|
|
int sc_value; /* whole divisor for note time, quarter note = 1 */
|
|
|
|
int sc_fill; /* controls spacing of notes */
|
|
|
|
bool sc_octtrack; /* octave-tracking on? */
|
|
|
|
bool sc_octprefix; /* override current octave-tracking state? */
|
|
|
|
char *sc_inbuf;
|
|
|
|
|
|
|
|
/* attachment-specific hooks */
|
|
|
|
void (*sc_tone)(device_t, u_int, u_int);
|
|
|
|
void (*sc_rest)(device_t, int);
|
2017-06-11 06:33:48 +03:00
|
|
|
u_int sc_vol; /* volume - only for audio skpr */
|
2016-12-13 23:20:34 +03:00
|
|
|
};
|
2016-12-08 14:31:08 +03:00
|
|
|
|
2016-12-13 23:20:34 +03:00
|
|
|
void spkr_attach(device_t,
|
|
|
|
void (*)(device_t, u_int, u_int), void (*)(device_t, int));
|
2016-12-09 07:46:39 +03:00
|
|
|
|
2017-01-06 12:32:08 +03:00
|
|
|
int spkr_detach(device_t, int);
|
|
|
|
|
2017-06-12 00:54:22 +03:00
|
|
|
int spkr_rescan(device_t, const char *, const int *);
|
|
|
|
|
|
|
|
int spkr_childdet(device_t, device_t);
|
|
|
|
|
2016-12-08 14:31:08 +03:00
|
|
|
#endif /* _SYS_DEV_SPKRVAR_H */
|