#include <linux/init.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <sound/core.h>
#include <sound/ump.h>
#include <sound/ump_msg.h>
#include "seq_ump_convert.h"
static u8 downscale_32_to_7bit(u32 src)
{ … }
static u16 downscale_32_to_14bit(u32 src)
{ … }
static u8 downscale_16_to_7bit(u16 src)
{ … }
static u16 upscale_7_to_16bit(u8 src)
{ … }
static u32 upscale_7_to_32bit(u8 src)
{ … }
static u32 upscale_14_to_32bit(u16 src)
{ … }
static unsigned char get_ump_group(struct snd_seq_client_port *port)
{ … }
#define make_raw_ump(port, type) …
static void ump_midi1_to_note_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static void ump_midi1_to_ctrl_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static void ump_midi1_to_pitchbend_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static void ump_midi1_to_cc_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
struct seq_ump_midi1_to_ev { … };
static struct seq_ump_midi1_to_ev midi1_msg_encoders[] = …;
static int cvt_ump_midi1_to_event(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static void ump_system_to_one_param_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static void ump_system_to_songpos_ev(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static struct seq_ump_midi1_to_ev system_msg_encoders[] = …;
static int cvt_ump_system_to_event(const union snd_ump_midi1_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_note_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_pitchbend_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_cc_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_pgm_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_ctrl_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int ump_midi2_to_rpn_ev(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
struct seq_ump_midi2_to_ev { … };
static struct seq_ump_midi2_to_ev midi2_msg_encoders[] = …;
static int cvt_ump_midi2_to_event(const union snd_ump_midi2_msg *val,
struct snd_seq_event *ev)
{ … }
static int cvt_ump_sysex7_to_event(const u32 *data, unsigned char *buf,
struct snd_seq_event *ev)
{ … }
static int cvt_ump_midi1_to_midi2(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *__event,
int atomic, int hop)
{ … }
static int cvt_ump_midi2_to_midi1(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *__event,
int atomic, int hop)
{ … }
static int cvt_ump_to_any(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
unsigned char type,
int atomic, int hop)
{ … }
static int deliver_with_group_convert(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_ump_event *ump_ev,
int atomic, int hop)
{ … }
static bool ump_event_filtered(struct snd_seq_client *dest,
const struct snd_seq_ump_event *ev)
{ … }
int snd_seq_deliver_from_ump(struct snd_seq_client *source,
struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
int atomic, int hop)
{ … }
static int note_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int cc_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int ctrl_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int pitchbend_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int ctrl14_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int rpn_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int system_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int system_1p_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int system_2p_ev_to_ump_midi1(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi1_msg *data,
unsigned char status)
{ … }
static int note_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int paf_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static void reset_rpn(struct ump_cvt_to_ump_bank *cc)
{ … }
static int fill_rpn(struct ump_cvt_to_ump_bank *cc,
union snd_ump_midi2_msg *data,
unsigned char channel,
bool flush)
{ … }
static int cc_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int ctrl_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int pgm_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int pitchbend_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int ctrl14_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int rpn_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int system_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int system_1p_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
static int system_2p_ev_to_ump_midi2(const struct snd_seq_event *event,
struct snd_seq_client_port *dest_port,
union snd_ump_midi2_msg *data,
unsigned char status)
{ … }
struct seq_ev_to_ump { … };
static const struct seq_ev_to_ump seq_ev_ump_encoders[] = …;
static const struct seq_ev_to_ump *find_ump_encoder(int type)
{ … }
static void setup_ump_event(struct snd_seq_ump_event *dest,
const struct snd_seq_event *src)
{ … }
static int cvt_to_ump_midi1(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
int atomic, int hop)
{ … }
static int cvt_to_ump_midi2(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
int atomic, int hop)
{ … }
static void fill_sysex7_ump(struct snd_seq_client_port *dest_port,
u32 *val, u8 status, u8 *buf, int len)
{ … }
static int cvt_sysex_to_ump(struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
int atomic, int hop)
{ … }
int snd_seq_deliver_to_ump(struct snd_seq_client *source,
struct snd_seq_client *dest,
struct snd_seq_client_port *dest_port,
struct snd_seq_event *event,
int atomic, int hop)
{ … }