summaryrefslogtreecommitdiffstats
path: root/sys/dev/midi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Don't use an uninitialised softc pointer in midiread/midiwrite.jsg2015-05-221-3/+5
| | | | ok ratchov@
* Use device_lookup() instead of digging into midi_cd.cd_devs[] andratchov2015-05-161-92/+133
| | | | | | | | maintaining a "dying" flag which is already present in the device structure. As a side-effect, this adds the missing refcounting that mididetach() was missing. With from mpi@ and dlg@ ok mpi
* remove the sc->isopen flag, as sc->flags already hold theratchov2015-05-121-9/+9
| | | | same information.
* store byte count in a size_t and switch from uiomovei() to uiomove()ratchov2015-05-121-5/+5
|
* Remove unused code & definitions: midi_attach(), midi_unit_count(),ratchov2015-05-121-36/+8
| | | | | midi_getinfo(), midi_writebytes(). They were "used" by the sequencer interface which we removed years ago.
* Don't hold the audio mutex when calling uiomove(), as uiomove()ratchov2015-05-121-11/+12
| | | | may sleep in case of a page fault
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-3/+3
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* no need for lkmtedu2014-10-091-2/+1
|
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* Introduce a global interrupt-aware mutex protecting dataratchov2013-05-151-71/+53
| | | | | | | | | | | | | structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping). ok and help from kettenis, a lot of work from armani
* Delete the sequencer(4) driver, since its not used any longer. Diffratchov2013-03-151-100/+1
| | | | | mostly from armani. ok miod, mpi, jsg and help from sthen
* Output interrupts are raised when the uart is ready for output, whichratchov2012-04-171-9/+9
| | | | | | obviously can occur after the transfer complete. In this case, don't print a warning (if MIDI_DEBUG defined) and don't attempt to stop the transfer twice.
* If the MIDI UART is not ready for output, don't spin at IPL_CLOCK;ratchov2012-03-301-54/+12
| | | | | | | just return and make the midi(4) driver retry later. UART buffers are large enough for this, except eap(4) which uses interrupts for output. help from and ok jsg@
* kqueue attach functions should return an errno or 0, not a plain 1. Fixnicm2011-07-021-2/+2
| | | | | | the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
* while closing the device, don't sleep with the PCATCH flag, otherwiseratchov2011-01-271-3/+3
| | | | | a signal (like SIGALRM) may cause the output buffer to not be drained and causing for instance stale notes.
* fix spacingratchov2011-01-011-73/+73
|
* Don'tmiod2010-11-181-4/+1
| | | | | | | | | #include "foo.h" #if NFOO > 0 (whole file) #endif since config(8) file inclusion rules already do it for you. ok deraadt@
* remove unneeded variable. ratchov@ okfgsch2010-04-081-4/+4
|
* Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tnicm2009-11-091-3/+1
| | | | | | | | | | supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
* kqueue support for midi(4).nicm2009-11-011-4/+102
| | | | ok ratchov
* KNOTE() after selwakeup()deraadt2009-10-301-1/+3
| | | | ok ratchov
* remove prototype of non-existent midi_get_hwif()ratchov2009-08-171-2/+1
| | | | suggested by jsg@
* While detatching the device, workaround the case when a midiratchov2009-07-181-9/+8
| | | | | | entry is missing in cdevsw[], in which case vdevgone() is called with out of bounds argument. requested by dlg@
* 'tranfer' -> 'transfer' in comments.krw2006-12-211-2/+2
|
* poll errors should be POLLERR, not some random E valuetedu2006-11-011-2/+2
| | | | from alexandre ratchov. ok claudio
* Handle input interrupts in a better manner.jsg2006-04-161-13/+10
| | | | | | | It is only necessary to notify reading processes when the buffer is empty rather than on every input byte. From Alexandre Ratchov.
* Add optional flush method to MIDI hardware interface.jsg2006-04-071-12/+32
| | | | | | | Allow umidi(4) to send multiple events in a single USB transfer. This greatly improves the number of interrupts umidi is able to generate. From Alexandre Ratchov.
* the following patch fixes a bug preventing midi uarts that doderaadt2004-09-221-5/+4
| | | | | | not support interrupts on output, from writing blocks larger than MIDI_MAXWRITE bytes. tested on both kinds of devices from alex-contact@caoua.org
* re-add RCS id after last commitbrad2004-09-211-0/+2
|
* better midi stuff from alex@caoua.orgderaadt2004-06-271-635/+505
|
* Replace select backends with poll backends. selscan() and pollscan()millert2003-09-231-22/+19
| | | | | | | now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
* First round of __P removal in sysmillert2002-03-141-14/+14
|
* return ENOTTY not EINVAL in default: in *ioctl()mickey2002-01-101-2/+2
|
* fix compiling in audio-less configsmickey2001-03-231-2/+3
|
* Convert to new timeouts.art2000-06-261-2/+3
|
* Permit detach of audio devices, such as uaudio. Selected codeho2000-05-241-4/+4
| | | | from NetBSD/Lennart Augustsson. (niklas@ ok)
* Remove dependencies between midi & audio. midi now will compile onfgsch2000-01-031-3/+13
| | | | speaker only systems.
* Remove unnecessary externniklas1999-01-021-3/+1
|
* Midi & sequencer support from NetBSD, mostly by Lennart Augustssonniklas1999-01-021-0/+771