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