Commit c00ddc36 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

ALSA sequencer
remove (now obsolete) support for _KERNEL_QUOTE events
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent 6e23459c
......@@ -177,7 +177,7 @@
/* 150-151: kernel events with quote - DO NOT use in user clients */
#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150
#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151
#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */
/* 152-191: reserved */
......
......@@ -547,36 +547,6 @@ static int update_timestamp_of_queue(snd_seq_event_t *event, int queue, int real
}
/*
* expand a quoted event.
*/
static int expand_quoted_event(snd_seq_event_t *event)
{
snd_seq_event_t *quoted;
quoted = event->data.quote.event;
if (quoted == NULL) {
snd_printd("seq: quoted event is NULL\n");
return -EINVAL;
}
event->type = quoted->type;
event->tag = quoted->tag;
event->source = quoted->source;
/* don't use quoted destination */
event->data = quoted->data;
/* use quoted timestamp only if subscription/port didn't update it */
if (event->queue == SNDRV_SEQ_QUEUE_DIRECT) {
event->flags = quoted->flags;
event->queue = quoted->queue;
event->time = quoted->time;
} else {
event->flags = (event->flags & SNDRV_SEQ_TIME_STAMP_MASK)
| (quoted->flags & ~SNDRV_SEQ_TIME_STAMP_MASK);
}
return 0;
}
/*
* deliver an event to the specified destination.
* if filter is non-zero, client filter bitmap is tested.
......@@ -591,7 +561,7 @@ static int snd_seq_deliver_single_event(client_t *client,
client_t *dest = NULL;
client_port_t *dest_port = NULL;
int result = -ENOENT;
int direct, quoted = 0;
int direct;
direct = snd_seq_ev_is_direct(event);
......@@ -612,14 +582,6 @@ static int snd_seq_deliver_single_event(client_t *client,
update_timestamp_of_queue(event, dest_port->time_queue,
dest_port->time_real);
if (event->type == SNDRV_SEQ_EVENT_KERNEL_QUOTE) {
quoted = 1;
if (expand_quoted_event(event) < 0) {
result = 0; /* do not send bounce error */
goto __skip;
}
}
switch (dest->type) {
case USER_CLIENT:
if (dest->data.user.fifo)
......@@ -642,14 +604,7 @@ static int snd_seq_deliver_single_event(client_t *client,
snd_seq_client_unlock(dest);
if (result < 0 && !direct) {
if (quoted) {
/* return directly to the original source */
dest = snd_seq_client_use_ptr(event->source.client);
result = bounce_error_event(dest, event, result, atomic, hop);
snd_seq_client_unlock(dest);
} else {
result = bounce_error_event(client, event, result, atomic, hop);
}
result = bounce_error_event(client, event, result, atomic, hop);
}
return result;
}
......@@ -2267,8 +2222,7 @@ static int kernel_client_enqueue(int client, snd_seq_event_t *ev,
if (ev->type == SNDRV_SEQ_EVENT_NONE)
return 0; /* ignore this */
if (ev->type == SNDRV_SEQ_EVENT_KERNEL_ERROR ||
ev->type == SNDRV_SEQ_EVENT_KERNEL_QUOTE)
if (ev->type == SNDRV_SEQ_EVENT_KERNEL_ERROR)
return -EINVAL; /* quoted events can't be enqueued */
/* fill in client number */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment