Lines Matching +full:0 +full:x7f
23 /* from 0 to 6 are normal commands (note off, on, etc.) for 0x9?-0xe? */
27 /* from 8 to 15 are events for 0xf0-0xf7 */
54 /* 0x80 - 0xef */
64 /* 0xf0 - 0xff */
65 {SNDRV_SEQ_EVENT_SYSEX, 1, NULL, NULL}, /* sysex: 0xf0 */
66 {SNDRV_SEQ_EVENT_QFRAME, 1, one_param_event, one_param_decode}, /* 0xf1 */
67 {SNDRV_SEQ_EVENT_SONGPOS, 2, songpos_event, songpos_decode}, /* 0xf2 */
68 {SNDRV_SEQ_EVENT_SONGSEL, 1, one_param_event, one_param_decode}, /* 0xf3 */
69 {SNDRV_SEQ_EVENT_NONE, -1, NULL, NULL}, /* 0xf4 */
70 {SNDRV_SEQ_EVENT_NONE, -1, NULL, NULL}, /* 0xf5 */
71 {SNDRV_SEQ_EVENT_TUNE_REQUEST, 0, NULL, NULL}, /* 0xf6 */
72 {SNDRV_SEQ_EVENT_NONE, -1, NULL, NULL}, /* 0xf7 */
73 {SNDRV_SEQ_EVENT_CLOCK, 0, NULL, NULL}, /* 0xf8 */
74 {SNDRV_SEQ_EVENT_NONE, -1, NULL, NULL}, /* 0xf9 */
75 {SNDRV_SEQ_EVENT_START, 0, NULL, NULL}, /* 0xfa */
76 {SNDRV_SEQ_EVENT_CONTINUE, 0, NULL, NULL}, /* 0xfb */
77 {SNDRV_SEQ_EVENT_STOP, 0, NULL, NULL}, /* 0xfc */
78 {SNDRV_SEQ_EVENT_NONE, -1, NULL, NULL}, /* 0xfd */
79 {SNDRV_SEQ_EVENT_SENSING, 0, NULL, NULL}, /* 0xfe */
80 {SNDRV_SEQ_EVENT_RESET, 0, NULL, NULL}, /* 0xff */
110 if (bufsize > 0) { in snd_midi_event_new()
118 dev->lastcmd = 0xff; in snd_midi_event_new()
122 return 0; in snd_midi_event_new()
140 dev->read = 0; in reset_encode()
141 dev->qlen = 0; in reset_encode()
155 dev->lastcmd = 0xff; in snd_midi_event_reset_decode()
161 dev->nostat = on ? 1 : 0; in snd_midi_event_no_status()
177 ev->type = status_event[ST_SPECIAL + c - 0xf0].event; in snd_midi_event_encode_byte()
184 if ((c & 0x80) && in snd_midi_event_encode_byte()
187 dev->buf[0] = c; in snd_midi_event_encode_byte()
188 if ((c & 0xf0) == 0xf0) /* system messages */ in snd_midi_event_encode_byte()
189 dev->type = (c & 0x0f) + ST_SPECIAL; in snd_midi_event_encode_byte()
191 dev->type = (c >> 4) & 0x07; in snd_midi_event_encode_byte()
195 if (dev->qlen > 0) { in snd_midi_event_encode_byte()
207 if (dev->qlen == 0) { in snd_midi_event_encode_byte()
225 dev->read = 0; /* continue to parse */ in snd_midi_event_encode_byte()
239 ev->data.note.channel = dev->buf[0] & 0x0f; in note_event()
247 ev->data.control.channel = dev->buf[0] & 0x0f; in one_param_ctrl_event()
254 ev->data.control.channel = dev->buf[0] & 0x0f; in pitchbend_ctrl_event()
261 ev->data.control.channel = dev->buf[0] & 0x0f; in two_param_ctrl_event()
290 for (type = 0; type < ARRAY_SIZE(status_event); type++) { in snd_midi_event_decode()
294 for (type = 0; type < ARRAY_SIZE(extra_event); type++) { in snd_midi_event_decode()
302 cmd = 0xf0 + (type - ST_SPECIAL); in snd_midi_event_decode()
305 cmd = 0x80 | (type << 4) | (ev->data.note.channel & 0x0f); in snd_midi_event_decode()
310 return snd_seq_expand_var_event(ev, count, buf, 1, 0); in snd_midi_event_decode()
317 if ((cmd & 0xf0) == 0xf0 || dev->lastcmd != cmd || dev->nostat) { in snd_midi_event_decode()
320 xbuf[0] = cmd; in snd_midi_event_decode()
327 status_event[type].decode(ev, xbuf + 0); in snd_midi_event_decode()
342 buf[0] = ev->data.note.note & 0x7f; in note_decode()
343 buf[1] = ev->data.note.velocity & 0x7f; in note_decode()
349 buf[0] = ev->data.control.value & 0x7f; in one_param_decode()
356 buf[0] = value & 0x7f; in pitchbend_decode()
357 buf[1] = (value >> 7) & 0x7f; in pitchbend_decode()
363 buf[0] = ev->data.control.param & 0x7f; in two_param_decode()
364 buf[1] = ev->data.control.value & 0x7f; in two_param_decode()
370 buf[0] = ev->data.control.value & 0x7f; in songpos_decode()
371 buf[1] = (ev->data.control.value >> 7) & 0x7f; in songpos_decode()
379 int idx = 0; in extra_decode_ctrl14()
381 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); in extra_decode_ctrl14()
382 if (ev->data.control.param < 0x20) { in extra_decode_ctrl14()
393 buf[idx++] = (ev->data.control.value >> 7) & 0x7f; in extra_decode_ctrl14()
396 buf[idx++] = ev->data.control.param + 0x20; in extra_decode_ctrl14()
397 buf[idx++] = ev->data.control.value & 0x7f; in extra_decode_ctrl14()
406 buf[idx++] = ev->data.control.param & 0x7f; in extra_decode_ctrl14()
407 buf[idx++] = ev->data.control.value & 0x7f; in extra_decode_ctrl14()
427 int idx = 0, i; in extra_decode_xrpn()
433 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); in extra_decode_xrpn()
434 bytes[0] = (ev->data.control.param & 0x3f80) >> 7; in extra_decode_xrpn()
435 bytes[1] = ev->data.control.param & 0x007f; in extra_decode_xrpn()
436 bytes[2] = (ev->data.control.value & 0x3f80) >> 7; in extra_decode_xrpn()
437 bytes[3] = ev->data.control.value & 0x007f; in extra_decode_xrpn()
444 for (i = 0; i < 4; i++) { in extra_decode_xrpn()