linux/sound/core/seq/seq_clientmgr.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *   ALSA sequencer Client Manager
 *   Copyright (c) 1998-1999 by Frank van de Pol <[email protected]>
 */
#ifndef __SND_SEQ_CLIENTMGR_H
#define __SND_SEQ_CLIENTMGR_H

#include <sound/seq_kernel.h>
#include <linux/bitops.h>
#include "seq_fifo.h"
#include "seq_ports.h"
#include "seq_lock.h"

/* client manager */

struct snd_seq_user_client {};

struct snd_seq_kernel_client {};


struct snd_seq_client {};

/* usage statistics */
struct snd_seq_usage {};


int client_init_data(void);
int snd_sequencer_device_init(void);
void snd_sequencer_device_done(void);

/* get locked pointer to client */
struct snd_seq_client *snd_seq_client_use_ptr(int clientid);

/* unlock pointer to client */
#define snd_seq_client_unlock(client)

/* dispatch event to client(s) */
int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);

int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
int snd_seq_client_notify_subscription(int client, int port,
				       struct snd_seq_port_subscribe *info, int evtype);

int __snd_seq_deliver_single_event(struct snd_seq_client *dest,
				   struct snd_seq_client_port *dest_port,
				   struct snd_seq_event *event,
				   int atomic, int hop);

/* only for OSS sequencer */
bool snd_seq_client_ioctl_lock(int clientid);
void snd_seq_client_ioctl_unlock(int clientid);

extern int seq_client_load[15];

/* for internal use between kernel sequencer clients */
struct snd_seq_client *snd_seq_kernel_client_get(int client);
void snd_seq_kernel_client_put(struct snd_seq_client *cptr);

static inline bool snd_seq_client_is_ump(struct snd_seq_client *c)
{}

static inline bool snd_seq_client_is_midi2(struct snd_seq_client *c)
{}

#endif