spkrvar.h revision 1.9 1 1.9 pgoyette /* $NetBSD: spkrvar.h,v 1.9 2017/06/11 21:54:22 pgoyette Exp $ */
2 1.1 nat
3 1.1 nat #ifndef _SYS_DEV_SPKRVAR_H
4 1.1 nat #define _SYS_DEV_SPKRVAR_H
5 1.1 nat
6 1.3 christos #include <sys/module.h>
7 1.3 christos
8 1.4 christos struct spkr_softc {
9 1.4 christos device_t sc_dev;
10 1.8 nat device_t sc_wsbelldev;
11 1.4 christos int sc_octave; /* currently selected octave */
12 1.4 christos int sc_whole; /* whole-note time at current tempo, in ticks */
13 1.4 christos int sc_value; /* whole divisor for note time, quarter note = 1 */
14 1.4 christos int sc_fill; /* controls spacing of notes */
15 1.4 christos bool sc_octtrack; /* octave-tracking on? */
16 1.4 christos bool sc_octprefix; /* override current octave-tracking state? */
17 1.4 christos char *sc_inbuf;
18 1.4 christos
19 1.4 christos /* attachment-specific hooks */
20 1.4 christos void (*sc_tone)(device_t, u_int, u_int);
21 1.4 christos void (*sc_rest)(device_t, int);
22 1.7 nat u_int sc_vol; /* volume - only for audio skpr */
23 1.4 christos };
24 1.1 nat
25 1.4 christos void spkr_attach(device_t,
26 1.4 christos void (*)(device_t, u_int, u_int), void (*)(device_t, int));
27 1.2 christos
28 1.6 pgoyette int spkr_detach(device_t, int);
29 1.6 pgoyette
30 1.9 pgoyette int spkr_rescan(device_t, const char *, const int *);
31 1.9 pgoyette
32 1.9 pgoyette int spkr_childdet(device_t, device_t);
33 1.9 pgoyette
34 1.1 nat #endif /* _SYS_DEV_SPKRVAR_H */
35