Lines Matching refs:event
58 static int get_var_len(const struct snd_seq_event *event) in get_var_len() argument
60 if ((event->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) in get_var_len()
63 return event->data.ext.len & ~SNDRV_SEQ_EXT_MASK; in get_var_len()
66 int snd_seq_dump_var_event(const struct snd_seq_event *event, in snd_seq_dump_var_event() argument
72 len = get_var_len(event); in snd_seq_dump_var_event()
76 if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) { in snd_seq_dump_var_event()
78 char __user *curptr = (char __force __user *)event->data.ext.ptr; in snd_seq_dump_var_event()
93 if (!(event->data.ext.len & SNDRV_SEQ_EXT_CHAINED)) in snd_seq_dump_var_event()
94 return func(private_data, event->data.ext.ptr, len); in snd_seq_dump_var_event()
96 cell = (struct snd_seq_event_cell *)event->data.ext.ptr; in snd_seq_dump_var_event()
101 err = func(private_data, &cell->event, size); in snd_seq_dump_var_event()
135 int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf, in snd_seq_expand_var_event() argument
141 len = get_var_len(event); in snd_seq_expand_var_event()
150 if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) { in snd_seq_expand_var_event()
153 if (copy_from_user(buf, (void __force __user *)event->data.ext.ptr, len)) in snd_seq_expand_var_event()
157 err = snd_seq_dump_var_event(event, in snd_seq_expand_var_event()
189 if (snd_seq_ev_is_variable(&cell->event)) { in snd_seq_cell_free()
190 if (cell->event.data.ext.len & SNDRV_SEQ_EXT_CHAINED) { in snd_seq_cell_free()
192 curp = cell->event.data.ext.ptr; in snd_seq_cell_free()
284 int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event, in snd_seq_event_dup() argument
296 if (snd_seq_ev_is_variable(event)) { in snd_seq_event_dup()
297 extlen = event->data.ext.len & ~SNDRV_SEQ_EXT_MASK; in snd_seq_event_dup()
308 cell->event = *event; in snd_seq_event_dup()
311 if (snd_seq_ev_is_variable(event)) { in snd_seq_event_dup()
313 int is_chained = event->data.ext.len & SNDRV_SEQ_EXT_CHAINED; in snd_seq_event_dup()
314 int is_usrptr = event->data.ext.len & SNDRV_SEQ_EXT_USRPTR; in snd_seq_event_dup()
318 cell->event.data.ext.len = extlen | SNDRV_SEQ_EXT_CHAINED; in snd_seq_event_dup()
319 cell->event.data.ext.ptr = NULL; in snd_seq_event_dup()
321 src = (struct snd_seq_event_cell *)event->data.ext.ptr; in snd_seq_event_dup()
322 buf = (char *)event->data.ext.ptr; in snd_seq_event_dup()
333 if (cell->event.data.ext.ptr == NULL) in snd_seq_event_dup()
334 cell->event.data.ext.ptr = tmp; in snd_seq_event_dup()
340 tmp->event = src->event; in snd_seq_event_dup()
343 if (copy_from_user(&tmp->event, (char __force __user *)buf, size)) { in snd_seq_event_dup()
348 memcpy(&tmp->event, buf, size); in snd_seq_event_dup()