Commit Graph

40 Commits

Author SHA1 Message Date
christos
d4897af65e avoid undefined behavior
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
2013-06-28 14:48:17 +00:00
plunky
1687854c43 Tidy up a little, the way that midi attachment code works
- change midi_attach() to omit the 'parent' arg (there are
  only two callers of this and it is not used)

- change midisyn_attach() to midisyn_init(), so not needing a midi_softc,
  and fix the midi_pcppi driver to set hw_if and hw_hdl directly in
  its midi_softc before calling midi_attach()

- add a device_t to opl_softc structure, change opl drivers to store
  the device 'self' in opl_softc and fix opl_attach() to use this
  opl_softc->dev field directly rather than a field in an otherwise
  unused midi_softc

- remove unnecessary midi_softc from opl and cms drivers (child device
  provides that)

reviewed by mrg
2012-04-09 10:18:16 +00:00
jmcneill
8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
jmcneill
f6062bf27a aprint-ify 2009-09-01 21:46:52 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cube
14218c181b Split device_t/softc for midi(4), and other related cosmetic changes. 2008-03-04 21:56:11 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
4e0d743b9e add missing initializers 2006-09-03 20:59:18 +00:00
christos
35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
nakayama
8f342cb589 Avoid gcc4 warnings; voice is unsigned so no need to check "voice < 0". 2006-08-12 00:34:39 +00:00
chap
710af63468 Ankh-Morpork, we have a MIDI driver....
Merge from chap-midi branch, after
~month for review
Comments by thorpej@ drochner@ and Alexandre Ratchov

Incorporated: points by thorpej@ drochner@; preliminary support for
a stats-collecting ioctl suggested by martin@ from comments by A.R.

PR kern/32441 kern/32442 kern/32567 kern/32588 kern/32694 kern/33590
kern/33614 and one instance of kern/32651

ok martin@
2006-06-30 13:56:25 +00:00
christos
7b128daa3b stack police: Introduce an opl_match function that uses malloc instead of
allocating ~2K of softc on the stack.
2006-06-09 21:55:33 +00:00
thorpej
2be6494fc9 Use device_cfdata(). 2006-03-29 04:16:44 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry
18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
itojun
aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
keihan
b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
wiz
c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
itohy
d0e6f0f013 - init panpot at reset
- whitespace police
2003-02-09 09:28:21 +00:00
lukem
a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
itohy
ab43d67621 Introduce "flags 1", which causes left and right channels swapped. 2001-11-04 06:44:31 +00:00
augustss
d9f173b146 Make it compile with debug on. 2001-10-23 17:58:15 +00:00
itohy
361bb97359 Support panpot on OPL3. Now this device is a stereo instrument. 2001-10-23 13:09:43 +00:00
augustss
797a70e551 Add a detach function (from Jared D. McNeill). 2001-09-29 13:56:04 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
augustss
0390dd7f3e Fix spelling in comment. 2000-08-12 22:24:26 +00:00
itohy
a13ace8bac Add power control hooks. 1999-10-05 03:29:22 +00:00
augustss
d81ed72642 Implement program change. From Martin Cernohorsky <cerno@ics.muni.cz>. 1999-10-04 19:31:39 +00:00
augustss
eca0bbe20e Update doc URL. 1999-05-23 16:07:04 +00:00
augustss
1b499d8ce6 Make the OPL information string more informative. 1998-12-08 14:26:56 +00:00
augustss
9726cfd1fb Make the copyright header conform to the NetBSD template. 1998-11-25 22:17:06 +00:00
mycroft
32f42fe1e9 Make sure all voices are deallocated on close. 1998-09-13 04:41:34 +00:00
augustss
6633896a67 Do some renaming of registers and make sure we get sound in both
channels on OPL3.
1998-08-26 13:08:10 +00:00
augustss
bb3c56652c Make the OPL driver turn on the sound on sound cards that require it.
That makes it much more likely that we get any sound.  DUH!
1998-08-26 12:10:22 +00:00
augustss
f2ff59edc5 Change debug output. 1998-08-22 22:54:11 +00:00
augustss
cd09067eb4 * Redo the way the way the MIDI driver attaches to audio devices.
* Improve the midisyn layer a little.
* Add a driver for the Yamaha OPL[23] FM synths.
  The opl driver is not finished yet; it sounds pretty awful.

For some strange reason I cannot get any FM sound from my SB64 cards,
but a regular SB16 works fine.
1998-08-17 21:16:09 +00:00