summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/midi
Commit message (Collapse)AuthorAgeFilesLines
* Back out M_* changes, per decision of the TRB.imp2003-02-194-9/+9
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-214-9/+9
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-043-13/+13
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Include <machine/limits.h> for definition of ULONG_MAX. Remove amike2002-03-251-1/+1
| | | | duplicate include.
* Fixes to make select/poll mpsafe.alfred2002-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: selwakeup required calling pfind which would cause lock order reversals with the allproc_lock and the per-process filedesc lock. Solution: Instead of recording the pid of the select()'ing process into the selinfo structure, actually record a pointer to the thread. To avoid dereferencing a bad address all the selinfo structures that are in use by a thread are kept in a list hung off the thread (protected by sellock). When a selwakeup occurs the selinfo is removed from that threads list, it is also removed on the way out of select or poll where the thread will traverse its list removing all the selinfos from its own list. Problem: Previously the PROC_LOCK was used to provide the mutual exclusion needed to ensure proper locking, this couldn't work because there was a single condvar used for select and poll and condvars can only be used with a single mutex. Solution: Introduce a global mutex 'sellock' which is used to provide mutual exclusion when recording events to wait on as well as performing notification when an event occurs. Interesting note: schedlock is required to manipulate the per-thread TDF_SELECT flag, however if given its own field it would not need schedlock, also because TDF_SELECT is only manipulated under sellock one doesn't actually use schedlock for syncronization, only to protect against corruption. Proc locks are no longer used in select/poll. Portions contributed by: davidc
* Do not call a synthesizer with a sequencer lock held.tanimura2002-03-101-2/+12
|
* Add the system default timer engine.tanimura2002-01-042-0/+644
|
* - Provide toggles to show debug messages. Set new sysctl variablestanimura2002-01-046-309/+806
| | | | | | | | | | | | | | hw.midi.debug and hw.midi.seq.debug to 1 to enable debug log. - Make debug messages human-frendly. - Implement /dev/music. - Add a timer engine required by /dev/music. - Fix nonblocking I/O. - Fix the numbering of midi and synth devices.
* - Do not uiomove with a mutex locked.tanimura2002-01-019-388/+296
| | | | | | | | | - Move from msleep/wakeup to condvar. - Return either zero or a positive errno value from a function. Return additional result via references. - Unify the typedef of callback functions.
* Avoid crash of minor numbers between /dev/midistat and /dev/dspr*.tanimura2001-11-031-1/+1
|
* KSE Milestone 2julian2001-09-122-54/+54
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-0/+1
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-262-2/+0
| | | | the bit-bucket.
* - Do not touch the Giant.tanimura2001-03-143-173/+2
| | | | | | | | Requested by: jhb - Initialize a mutex prior to locking it. Spotted by: dcs
* - Mutexify midi(4). The driver runs under the giant lock by default.tanimura2001-02-268-756/+1385
| | | | | | | | | | | | | | If you ever want to run midi(4) out of the giant lock, uncomment MIDI_OUTOFGIANT in midi.h. Confirmed to work for csamidi with WITNESS and INVARIANTS. - midi_info, midi_open and seq_info are now tailqs, allowing arbitrary numbers of devices to be configured. - Do not send an active sensing message to reset midi modules. - Clone /dev/sequencer*. /dev/sequencer0 and /dev/sequencer are generated upon initialization.
* Encapselate midi_info, nmidi and nsynth into midi.c.tanimura2001-02-184-75/+104
|
* Tag unused functions with __unused.jhb2001-01-231-2/+2
|
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* Since the unit number of a midi/sequencer device is expressed in 4tanimura2000-09-182-2/+2
| | | | bits, we can configure only up to 16 units.
* Avoid the modules madness I inadvertently introduced by making thephk2000-09-024-8/+0
| | | | | | | | | | | | | | | | | | cloning infrastructure standard in kern_conf. Modules are now the same with or without devfs support. If you need to detect if devfs is present, in modules or elsewhere, check the integer variable "devfs_present". This happily removes an ugly hack from kern/vfs_conf.c. This forces a rename of the eventhandler and the standard clone helper function. Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include like <sys/queue.h> Remove all #includes of opt_devfs.h they no longer matter.
* Finally merge newmidi.tanimura2000-07-119-0/+4521
(I had been busy for my own research activity until the last weekend) Supported devices: SB Midi Port (sbc + midi) SB OPL3 (sbc + midi) 16550 UART (midi, needs a trick in your hint) CS461x Midi Port (csa + midi) OSS-compatible sequencer (seq) Supported playing software: playmidi (We definitely need more) Notes: /dev/midistat now reports installed midi drivers. /dev/sndstat reports only pcm drivers. We need the new name(pcmstat?). EMU8000(SB AWE) does not sound yet but does get probed so that the OPL3 synth on an AWE card works. TODO: MSS/PCI bridge drivers Midi-tty interface to support general serial devices Modules
OpenPOWER on IntegriCloud