1 /* $NetBSD: spkrvar.h,v 1.9 2017/06/11 21:54:22 pgoyette 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 void (*sc_rest)(device_t, int); 22 u_int sc_vol; /* volume - only for audio skpr */ 23 }; 24 25 void spkr_attach(device_t, 26 void (*)(device_t, u_int, u_int), void (*)(device_t, int)); 27 28 int spkr_detach(device_t, int); 29 30 int spkr_rescan(device_t, const char *, const int *); 31 32 int spkr_childdet(device_t, device_t); 33 34 #endif /* _SYS_DEV_SPKRVAR_H */ 35