git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
sound
/
core
/
seq
/
seq_dummy.c
diff --git
a/sound/core/seq/seq_dummy.c
b/sound/core/seq/seq_dummy.c
index
6380acf
..
2a283a5
100644
(file)
--- a/
sound/core/seq/seq_dummy.c
+++ b/
sound/core/seq/seq_dummy.c
@@
-63,6
+63,7
@@
MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
MODULE_DESCRIPTION("ALSA sequencer MIDI-through client");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
MODULE_DESCRIPTION("ALSA sequencer MIDI-through client");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("snd-seq-client-" __stringify(SNDRV_SEQ_CLIENT_DUMMY));
static int ports = 1;
static int duplex = 0;
static int ports = 1;
static int duplex = 0;
@@
-72,12
+73,12
@@
MODULE_PARM_DESC(ports, "number of ports to be created");
module_param(duplex, bool, 0444);
MODULE_PARM_DESC(duplex, "create DUPLEX ports");
module_param(duplex, bool, 0444);
MODULE_PARM_DESC(duplex, "create DUPLEX ports");
-
typedef
struct snd_seq_dummy_port {
+struct snd_seq_dummy_port {
int client;
int port;
int duplex;
int connect;
int client;
int port;
int duplex;
int connect;
-}
snd_seq_dummy_port_t
;
+};
static int my_client = -1;
static int my_client = -1;
@@
-87,11
+88,11
@@
static int my_client = -1;
* Note: this callback is called only after all subscribers are removed.
*/
static int
* Note: this callback is called only after all subscribers are removed.
*/
static int
-dummy_unuse(void *private_data, s
nd_seq_port_subscribe_t
*info)
+dummy_unuse(void *private_data, s
truct snd_seq_port_subscribe
*info)
{
{
- s
nd_seq_dummy_port_
t *p;
+ s
truct snd_seq_dummy_por
t *p;
int i;
int i;
- s
nd_seq_event_
t ev;
+ s
truct snd_seq_even
t ev;
p = private_data;
memset(&ev, 0, sizeof(ev));
p = private_data;
memset(&ev, 0, sizeof(ev));
@@
-115,10
+116,11
@@
dummy_unuse(void *private_data, snd_seq_port_subscribe_t *info)
* event input callback - just redirect events to subscribers
*/
static int
* event input callback - just redirect events to subscribers
*/
static int
-dummy_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop)
+dummy_input(struct snd_seq_event *ev, int direct, void *private_data,
+ int atomic, int hop)
{
{
- s
nd_seq_dummy_port_
t *p;
- s
nd_seq_event_
t tmpev;
+ s
truct snd_seq_dummy_por
t *p;
+ s
truct snd_seq_even
t tmpev;
p = private_data;
if (ev->source.client == SNDRV_SEQ_CLIENT_SYSTEM ||
p = private_data;
if (ev->source.client == SNDRV_SEQ_CLIENT_SYSTEM ||
@@
-139,23
+141,20
@@
dummy_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int
static void
dummy_free(void *private_data)
{
static void
dummy_free(void *private_data)
{
- snd_seq_dummy_port_t *p;
-
- p = private_data;
- kfree(p);
+ kfree(private_data);
}
/*
* create a port
*/
}
/*
* create a port
*/
-static s
nd_seq_dummy_port_
t __init *
+static s
truct snd_seq_dummy_por
t __init *
create_port(int idx, int type)
{
create_port(int idx, int type)
{
- s
nd_seq_port_info_t
pinfo;
- s
nd_seq_port_callback_t
pcb;
- s
nd_seq_dummy_port_
t *rec;
+ s
truct snd_seq_port_info
pinfo;
+ s
truct snd_seq_port_callback
pcb;
+ s
truct snd_seq_dummy_por
t *rec;
- if ((rec = k
calloc(1,
sizeof(*rec), GFP_KERNEL)) == NULL)
+ if ((rec = k
zalloc(
sizeof(*rec), GFP_KERNEL)) == NULL)
return NULL;
rec->client = my_client;
return NULL;
rec->client = my_client;
@@
-194,9
+193,7
@@
create_port(int idx, int type)
static int __init
register_client(void)
{
static int __init
register_client(void)
{
- snd_seq_client_callback_t cb;
- snd_seq_client_info_t cinfo;
- snd_seq_dummy_port_t *rec1, *rec2;
+ struct snd_seq_dummy_port *rec1, *rec2;
int i;
if (ports < 1) {
int i;
if (ports < 1) {
@@
-205,20
+202,11
@@
register_client(void)
}
/* create client */
}
/* create client */
- memset(&cb, 0, sizeof(cb));
- cb.allow_input = 1;
- cb.allow_output = 1;
- my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY, &cb);
+ my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY,
+ "Midi Through");
if (my_client < 0)
return my_client;
if (my_client < 0)
return my_client;
- /* set client name */
- memset(&cinfo, 0, sizeof(cinfo));
- cinfo.client = my_client;
- cinfo.type = KERNEL_CLIENT;
- strcpy(cinfo.name, "Midi Through");
- snd_seq_kernel_client_ctl(my_client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
/* create ports */
for (i = 0; i < ports; i++) {
rec1 = create_port(i, 0);
/* create ports */
for (i = 0; i < ports; i++) {
rec1 = create_port(i, 0);