#ifndef __SOUND_UMP_H
#define __SOUND_UMP_H
#include <sound/rawmidi.h>
struct snd_ump_endpoint;
struct snd_ump_block;
struct snd_ump_ops;
struct ump_cvt_to_ump;
struct snd_seq_ump_ops;
struct snd_ump_group { … };
struct snd_ump_endpoint { … };
struct snd_ump_ops { … };
struct snd_seq_ump_ops { … };
struct snd_ump_block { … };
#define rawmidi_to_ump(rmidi) …
int snd_ump_endpoint_new(struct snd_card *card, char *id, int device,
int output, int input,
struct snd_ump_endpoint **ump_ret);
int snd_ump_parse_endpoint(struct snd_ump_endpoint *ump);
int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
unsigned int direction, unsigned int first_group,
unsigned int num_groups, struct snd_ump_block **blk_ret);
int snd_ump_receive(struct snd_ump_endpoint *ump, const u32 *buffer, int count);
int snd_ump_transmit(struct snd_ump_endpoint *ump, u32 *buffer, int count);
#if IS_ENABLED(CONFIG_SND_UMP_LEGACY_RAWMIDI)
int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
char *id, int device);
#else
static inline int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
char *id, int device)
{
return 0;
}
#endif
int snd_ump_receive_ump_val(struct snd_ump_endpoint *ump, u32 val);
int snd_ump_switch_protocol(struct snd_ump_endpoint *ump, unsigned int protocol);
void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump);
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
static inline unsigned char ump_message_type(u32 data)
{ … }
static inline unsigned char ump_message_group(u32 data)
{ … }
static inline unsigned char ump_message_status_code(u32 data)
{ … }
static inline unsigned char ump_message_channel(u32 data)
{ … }
static inline unsigned char ump_message_status_channel(u32 data)
{ … }
static inline u32 ump_compose(unsigned char type, unsigned char group,
unsigned char status, unsigned char channel)
{ … }
static inline unsigned char ump_sysex_message_status(u32 data)
{ … }
static inline unsigned char ump_sysex_message_length(u32 data)
{ … }
static inline unsigned char ump_stream_message_format(u32 data)
{ … }
static inline unsigned int ump_stream_message_status(u32 data)
{ … }
static inline u32 ump_stream_compose(unsigned char status, unsigned short form)
{ … }
#define ump_is_groupless_msg(type) …
#endif