1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef __SND_SEQ_CLIENTMGR_H
22#define __SND_SEQ_CLIENTMGR_H
23
24#include <sound/seq_kernel.h>
25#include <linux/bitops.h>
26#include "seq_fifo.h"
27#include "seq_ports.h"
28#include "seq_lock.h"
29
30
31
32
33struct snd_seq_user_client {
34 struct file *file;
35
36
37
38 struct snd_seq_fifo *fifo;
39 int fifo_pool_size;
40};
41
42struct snd_seq_kernel_client {
43
44};
45
46
47struct snd_seq_client {
48 snd_seq_client_type_t type;
49 unsigned int accept_input: 1,
50 accept_output: 1;
51 char name[64];
52 int number;
53 unsigned int filter;
54 DECLARE_BITMAP(event_filter, 256);
55 snd_use_lock_t use_lock;
56 int event_lost;
57
58 int num_ports;
59 struct list_head ports_list_head;
60 rwlock_t ports_lock;
61 struct mutex ports_mutex;
62 int convert32;
63
64
65 struct snd_seq_pool *pool;
66
67 union {
68 struct snd_seq_user_client user;
69 struct snd_seq_kernel_client kernel;
70 } data;
71};
72
73
74struct snd_seq_usage {
75 int cur;
76 int peak;
77};
78
79
80int client_init_data(void);
81int snd_sequencer_device_init(void);
82void snd_sequencer_device_done(void);
83
84
85struct snd_seq_client *snd_seq_client_use_ptr(int clientid);
86
87
88#define snd_seq_client_unlock(client) snd_use_lock_free(&(client)->use_lock)
89
90
91int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);
92
93
94int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
95int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
96 struct file *file, int atomic, int hop);
97int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
98int snd_seq_client_notify_subscription(int client, int port,
99 struct snd_seq_port_subscribe *info, int evtype);
100
101extern int seq_client_load[15];
102
103#endif
104