linux/sound/synth/emux/emux_seq.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Midi Sequencer interface routines.
 *
 *  Copyright (C) 1999 Steve Ratcliffe
 *  Copyright (c) 1999-2000 Takashi Iwai <[email protected]>
 */

#include "emux_voice.h"
#include <linux/slab.h>
#include <linux/module.h>

/* Prototypes for static functions */
static void free_port(void *private);
static void snd_emux_init_port(struct snd_emux_port *p);
static int snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info);
static int snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info);

/*
 * MIDI emulation operators
 */
static const struct snd_midi_op emux_ops =;


/*
 * number of MIDI channels
 */
#define MIDI_CHANNELS

/*
 * type flags for MIDI sequencer port
 */
#define DEFAULT_MIDI_TYPE

/*
 * Initialise the EMUX Synth by creating a client and registering
 * a series of ports.
 * Each of the ports will contain the 16 midi channels.  Applications
 * can connect to these ports to play midi data.
 */
int
snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
{}


/*
 * Detach from the ports that were set up for this synthesizer and
 * destroy the kernel client.
 */
void
snd_emux_detach_seq(struct snd_emux *emu)
{}


/*
 * create a sequencer port and channel_set
 */

struct snd_emux_port *
snd_emux_create_port(struct snd_emux *emu, char *name,
		     int max_channels, int oss_port,
		     struct snd_seq_port_callback *callback)
{}


/*
 * release memory block for port
 */
static void
free_port(void *private_data)
{}


#define DEFAULT_DRUM_FLAGS

/*
 * initialize the port specific parameters
 */
static void
snd_emux_init_port(struct snd_emux_port *p)
{}


/*
 * reset port
 */
void
snd_emux_reset_port(struct snd_emux_port *port)
{}


/*
 * input sequencer event
 */
int
snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,
		     int atomic, int hop)
{}


/*
 * increment usage count
 */
static int
__snd_emux_inc_count(struct snd_emux *emu)
{}

int snd_emux_inc_count(struct snd_emux *emu)
{}

/*
 * decrease usage count
 */
static void
__snd_emux_dec_count(struct snd_emux *emu)
{}

void snd_emux_dec_count(struct snd_emux *emu)
{}

/*
 * Routine that is called upon a first use of a particular port
 */
static int
snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
{}

/*
 * Routine that is called upon the last unuse() of a particular port.
 */
static int
snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
{}


/*
 * attach virtual rawmidi devices
 */
int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
{}

int snd_emux_delete_virmidi(struct snd_emux *emu)
{}