#include <sound/core.h>
#include <linux/major.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <sound/rawmidi.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/minors.h>
#include <sound/initval.h>
Go to the source code of this file.
|
| MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>") |
|
| MODULE_DESCRIPTION ("Midlevel RawMidi code for ALSA.") |
|
| MODULE_LICENSE ("GPL") |
|
int | snd_rawmidi_drop_output (struct snd_rawmidi_substream *substream) |
|
int | snd_rawmidi_drain_output (struct snd_rawmidi_substream *substream) |
|
int | snd_rawmidi_drain_input (struct snd_rawmidi_substream *substream) |
|
int | snd_rawmidi_kernel_open (struct snd_card *card, int device, int subdevice, int mode, struct snd_rawmidi_file *rfile) |
|
int | snd_rawmidi_kernel_release (struct snd_rawmidi_file *rfile) |
|
int | snd_rawmidi_info_select (struct snd_card *card, struct snd_rawmidi_info *info) |
|
int | snd_rawmidi_output_params (struct snd_rawmidi_substream *substream, struct snd_rawmidi_params *params) |
|
int | snd_rawmidi_input_params (struct snd_rawmidi_substream *substream, struct snd_rawmidi_params *params) |
|
int | snd_rawmidi_receive (struct snd_rawmidi_substream *substream, const unsigned char *buffer, int count) |
|
long | snd_rawmidi_kernel_read (struct snd_rawmidi_substream *substream, unsigned char *buf, long count) |
|
int | snd_rawmidi_transmit_empty (struct snd_rawmidi_substream *substream) |
|
int | snd_rawmidi_transmit_peek (struct snd_rawmidi_substream *substream, unsigned char *buffer, int count) |
|
int | snd_rawmidi_transmit_ack (struct snd_rawmidi_substream *substream, int count) |
|
int | snd_rawmidi_transmit (struct snd_rawmidi_substream *substream, unsigned char *buffer, int count) |
|
long | snd_rawmidi_kernel_write (struct snd_rawmidi_substream *substream, const unsigned char *buf, long count) |
|
int | snd_rawmidi_new (struct snd_card *card, char *id, int device, int output_count, int input_count, struct snd_rawmidi **rrawmidi) |
|
void | snd_rawmidi_set_ops (struct snd_rawmidi *rmidi, int stream, struct snd_rawmidi_ops *ops) |
|
#define snd_rawmidi_ioctl_compat NULL |
MODULE_DESCRIPTION |
( |
"Midlevel RawMidi code for ALSA." |
| ) |
|
snd_rawmidi_new - create a rawmidi instance : the card instance : the id string : the device index : the number of output streams : the number of input streams : the pointer to store the new rawmidi instance
Creates a new rawmidi instance. Use snd_rawmidi_set_ops() to set the operators to the new instance.
Returns zero if successful, or a negative error code on failure.
Definition at line 1443 of file rawmidi.c.
snd_rawmidi_receive - receive the input data from the device : the rawmidi substream : the buffer pointer : the data size to read
Reads the data from the internal buffer.
Returns the size of read data, or a negative error code on failure.
Definition at line 868 of file rawmidi.c.
snd_rawmidi_set_ops - set the rawmidi operators : the rawmidi instance : the stream direction, SNDRV_RAWMIDI_STREAM_XXX : the operator table
Sets the rawmidi operators for the given stream direction.
Definition at line 1665 of file rawmidi.c.
snd_rawmidi_transmit - copy from the buffer to the device : the rawmidi substream : the buffer pointer : the data size to transfer
Copies data from the buffer to the device and advances the pointer.
Returns the copied size if successful, or a negative error code on failure.
Definition at line 1145 of file rawmidi.c.
snd_rawmidi_transmit_ack - acknowledge the transmission : the rawmidi substream : the tranferred count
Advances the hardware pointer for the internal output buffer with the given size and updates the condition. Call after the transmission is finished.
Returns the advanced size if successful, or a negative error code on failure.
Definition at line 1112 of file rawmidi.c.
snd_rawmidi_transmit_empty - check whether the output buffer is empty : the rawmidi substream
Returns 1 if the internal output buffer is empty, 0 if not.
Definition at line 1030 of file rawmidi.c.
snd_rawmidi_transmit_peek - copy data from the internal buffer : the rawmidi substream : the buffer pointer : data size to transfer
Copies data from the internal output buffer to the given buffer.
Call this in the interrupt handler when the midi output is ready, and call snd_rawmidi_transmit_ack() after the transmission is finished.
Returns the size of copied data, or a negative error code on failure.
Definition at line 1060 of file rawmidi.c.