FreeBSD kernel sound device code
midi.h File Reference
#include <sys/types.h>
#include <sys/malloc.h>
Include dependency graph for midi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define M_RX   0x01
 
#define M_TX   0x02
 
#define M_RXEN   0x04
 
#define M_TXEN   0x08
 
#define MIDI_TYPE   unsigned char
 

Functions

 MALLOC_DECLARE (M_MIDI)
 
struct snd_midimidi_init (kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie)
 
int midi_uninit (struct snd_midi *_m)
 
int midi_out (struct snd_midi *_m, MIDI_TYPE *_buf, int _size)
 
int midi_in (struct snd_midi *_m, MIDI_TYPE *_buf, int _size)
 
kobj_t midimapper_addseq (void *arg1, int *unit, void **cookie)
 
int midimapper_open (void *arg1, void **cookie)
 
int midimapper_close (void *arg1, void *cookie)
 
kobj_t midimapper_fetch_synth (void *arg, void *cookie, int unit)
 

Macro Definition Documentation

◆ M_RX

#define M_RX   0x01

Definition at line 39 of file midi.h.

◆ M_RXEN

#define M_RXEN   0x04

Definition at line 41 of file midi.h.

◆ M_TX

#define M_TX   0x02

Definition at line 40 of file midi.h.

◆ M_TXEN

#define M_TXEN   0x08

Definition at line 42 of file midi.h.

◆ MIDI_TYPE

#define MIDI_TYPE   unsigned char

Definition at line 44 of file midi.h.

Function Documentation

◆ MALLOC_DECLARE()

MALLOC_DECLARE ( M_MIDI  )

◆ midi_in()

int midi_in ( struct snd_midi _m,
MIDI_TYPE _buf,
int  _size 
)

Definition at line 453 of file midi.c.

References buf, data, m, M_RX, MIDI_ACK, MIDI_DEBUG, MIDI_IN_DATA, MIDI_IN_START, MIDI_IN_SYSEX, MIDI_IS_COMMON, MIDI_IS_STATUS, MIDI_LENGTH, MIDI_SYSEX_END, MIDIQ_AVAIL, MIDIQ_ENQ, MIDIQ_FULL, MIDIQ_LEN, and size.

Referenced by mpu401_intr().

Here is the caller graph for this function:

◆ midi_init()

struct snd_midi * midi_init ( kobj_class_t  _mpu_cls,
int  _unit,
int  _channel,
void *  cookie 
)

Definition at line 281 of file midi.c.

References buf, channel, snd_midi::cookie, free, inqsize, m, midi_cdevsw, MIDI_DEBUG, MIDI_DEV_RAW, MIDI_TYPE, MIDIMKMINOR, MIDIQ_BUF, MIDIQ_INIT, outqsize, and snd_midi::unit.

Referenced by mpu401_init().

Here is the caller graph for this function:

◆ midi_out()

int midi_out ( struct snd_midi _m,
MIDI_TYPE _buf,
int  _size 
)

Definition at line 583 of file midi.c.

References buf, m, M_TXEN, MIDI_DEBUG, MIDIQ_AVAIL, MIDIQ_DEQ, MIDIQ_EMPTY, MIDIQ_LEN, and size.

Referenced by mpu401_intr().

Here is the caller graph for this function:

◆ midi_uninit()

int midi_uninit ( struct snd_midi _m)

Definition at line 401 of file midi.c.

References m, and midi_destroy().

Referenced by mpu401_uninit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ midimapper_addseq()

kobj_t midimapper_addseq ( void *  arg1,
int *  unit,
void **  cookie 
)

Definition at line 1468 of file midi.c.

References snd_midi::unit.

Referenced by seq_addunit().

Here is the caller graph for this function:

◆ midimapper_close()

int midimapper_close ( void *  arg1,
void *  cookie 
)

Definition at line 1490 of file midi.c.

Referenced by mseq_close().

Here is the caller graph for this function:

◆ midimapper_fetch_synth()

kobj_t midimapper_fetch_synth ( void *  arg,
void *  cookie,
int  unit 
)

Definition at line 1496 of file midi.c.

References m, and snd_midi::unit.

Referenced by mseq_open().

Here is the caller graph for this function:

◆ midimapper_open()

int midimapper_open ( void *  arg1,
void **  cookie 
)

Definition at line 1476 of file midi.c.

References m.

Referenced by mseq_open().

Here is the caller graph for this function: