linux/sound/core/seq/seq_ump_client.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* ALSA sequencer binding for UMP device */

#include <linux/init.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/mutex.h>
#include <linux/string.h>
#include <linux/module.h>
#include <asm/byteorder.h>
#include <sound/core.h>
#include <sound/ump.h>
#include <sound/seq_kernel.h>
#include <sound/seq_device.h>
#include "seq_clientmgr.h"
#include "seq_system.h"

struct seq_ump_client;
struct seq_ump_group;

enum {};

/* context for UMP input parsing, per EP */
struct seq_ump_input_buffer {};

/* sequencer client, per UMP EP (rawmidi) */
struct seq_ump_client {};

/* number of 32bit words for each UMP message type */
static unsigned char ump_packet_words[0x10] =;

/* conversion between UMP group and seq port;
 * assume the port number is equal with UMP group number (1-based)
 */
static unsigned char ump_group_to_seq_port(unsigned char group)
{}

/* process the incoming rawmidi stream */
static void seq_ump_input_receive(struct snd_ump_endpoint *ump,
				  const u32 *val, int words)
{}

/* process an input sequencer event; only deal with UMP types */
static int seq_ump_process_event(struct snd_seq_event *ev, int direct,
				 void *private_data, int atomic, int hop)
{}

/* open the rawmidi */
static int seq_ump_client_open(struct seq_ump_client *client, int dir)
{}

/* close the rawmidi */
static int seq_ump_client_close(struct seq_ump_client *client, int dir)
{}

/* sequencer subscription ops for each client */
static int seq_ump_subscribe(void *pdata, struct snd_seq_port_subscribe *info)
{}

static int seq_ump_unsubscribe(void *pdata, struct snd_seq_port_subscribe *info)
{}

static int seq_ump_use(void *pdata, struct snd_seq_port_subscribe *info)
{}

static int seq_ump_unuse(void *pdata, struct snd_seq_port_subscribe *info)
{}

/* fill port_info from the given UMP EP and group info */
static void fill_port_info(struct snd_seq_port_info *port,
			   struct seq_ump_client *client,
			   struct snd_ump_group *group)
{}

/* skip non-existing group for static blocks */
static bool skip_group(struct seq_ump_client *client, struct snd_ump_group *group)
{}

/* create a new sequencer port per UMP group */
static int seq_ump_group_init(struct seq_ump_client *client, int group_index)
{}

/* update the sequencer ports; called from notify_fb_change callback */
static void update_port_infos(struct seq_ump_client *client)
{}

/* create a UMP Endpoint port */
static int create_ump_endpoint_port(struct seq_ump_client *client)
{}

/* release the client resources */
static void seq_ump_client_free(struct seq_ump_client *client)
{}

/* update the MIDI version for the given client */
static void setup_client_midi_version(struct seq_ump_client *client)
{}

/* set up client's group_filter bitmap */
static void setup_client_group_filter(struct seq_ump_client *client)
{}

/* UMP group change notification */
static void handle_group_notify(struct work_struct *work)
{}

/* UMP FB change notification */
static int seq_ump_notify_fb_change(struct snd_ump_endpoint *ump,
				    struct snd_ump_block *fb)
{}

/* UMP protocol change notification; just update the midi_version field */
static int seq_ump_switch_protocol(struct snd_ump_endpoint *ump)
{}

static const struct snd_seq_ump_ops seq_ump_ops =;

/* create a sequencer client and ports for the given UMP endpoint */
static int snd_seq_ump_probe(struct device *_dev)
{}

/* remove a sequencer client */
static int snd_seq_ump_remove(struct device *_dev)
{}

static struct snd_seq_driver seq_ump_driver =;

module_snd_seq_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();