mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 01:05:29 +00:00
1a59d1b8e0
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef __SOUND_SEQ_MIDI_EVENT_H
|
|
#define __SOUND_SEQ_MIDI_EVENT_H
|
|
|
|
/*
|
|
* MIDI byte <-> sequencer event coder
|
|
*
|
|
* Copyright (C) 1998,99 Takashi Iwai <tiwai@suse.de>,
|
|
* Jaroslav Kysela <perex@perex.cz>
|
|
*/
|
|
|
|
#include <sound/asequencer.h>
|
|
|
|
#define MAX_MIDI_EVENT_BUF 256
|
|
|
|
/* midi status */
|
|
struct snd_midi_event {
|
|
int qlen; /* queue length */
|
|
int read; /* chars read */
|
|
int type; /* current event type */
|
|
unsigned char lastcmd; /* last command (for MIDI state handling) */
|
|
unsigned char nostat; /* no state flag */
|
|
int bufsize; /* allocated buffer size */
|
|
unsigned char *buf; /* input buffer */
|
|
spinlock_t lock;
|
|
};
|
|
|
|
int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev);
|
|
void snd_midi_event_free(struct snd_midi_event *dev);
|
|
void snd_midi_event_reset_encode(struct snd_midi_event *dev);
|
|
void snd_midi_event_reset_decode(struct snd_midi_event *dev);
|
|
void snd_midi_event_no_status(struct snd_midi_event *dev, int on);
|
|
bool snd_midi_event_encode_byte(struct snd_midi_event *dev, unsigned char c,
|
|
struct snd_seq_event *ev);
|
|
/* decode from event to bytes - return number of written bytes if success */
|
|
long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
|
|
struct snd_seq_event *ev);
|
|
|
|
#endif /* __SOUND_SEQ_MIDI_EVENT_H */
|