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()
160 dev->lastcmd = 0xff; in snd_midi_event_reset_decode()
167 dev->nostat = on ? 1 : 0; in snd_midi_event_no_status()
184 ev->type = status_event[ST_SPECIAL + c - 0xf0].event; in snd_midi_event_encode_byte()
191 if ((c & 0x80) && in snd_midi_event_encode_byte()
194 dev->buf[0] = c; in snd_midi_event_encode_byte()
195 if ((c & 0xf0) == 0xf0) /* system messages */ in snd_midi_event_encode_byte()
196 dev->type = (c & 0x0f) + ST_SPECIAL; in snd_midi_event_encode_byte()
198 dev->type = (c >> 4) & 0x07; in snd_midi_event_encode_byte()
202 if (dev->qlen > 0) { in snd_midi_event_encode_byte()
214 if (dev->qlen == 0) { in snd_midi_event_encode_byte()
232 dev->read = 0; /* continue to parse */ in snd_midi_event_encode_byte()
247 ev->data.note.channel = dev->buf[0] & 0x0f; in note_event()
255 ev->data.control.channel = dev->buf[0] & 0x0f; in one_param_ctrl_event()
262 ev->data.control.channel = dev->buf[0] & 0x0f; in pitchbend_ctrl_event()
269 ev->data.control.channel = dev->buf[0] & 0x0f; in two_param_ctrl_event()
298 for (type = 0; type < ARRAY_SIZE(status_event); type++) { in snd_midi_event_decode()
302 for (type = 0; type < ARRAY_SIZE(extra_event); type++) { in snd_midi_event_decode()
310 cmd = 0xf0 + (type - ST_SPECIAL); in snd_midi_event_decode()
313 cmd = 0x80 | (type << 4) | (ev->data.note.channel & 0x0f); in snd_midi_event_decode()
318 return snd_seq_expand_var_event(ev, count, buf, 1, 0); in snd_midi_event_decode()
325 if ((cmd & 0xf0) == 0xf0 || dev->lastcmd != cmd || dev->nostat) { in snd_midi_event_decode()
328 xbuf[0] = cmd; in snd_midi_event_decode()
335 status_event[type].decode(ev, xbuf + 0); in snd_midi_event_decode()
350 buf[0] = ev->data.note.note & 0x7f; in note_decode()
351 buf[1] = ev->data.note.velocity & 0x7f; in note_decode()
357 buf[0] = ev->data.control.value & 0x7f; in one_param_decode()
364 buf[0] = value & 0x7f; in pitchbend_decode()
365 buf[1] = (value >> 7) & 0x7f; in pitchbend_decode()
371 buf[0] = ev->data.control.param & 0x7f; in two_param_decode()
372 buf[1] = ev->data.control.value & 0x7f; in two_param_decode()
378 buf[0] = ev->data.control.value & 0x7f; in songpos_decode()
379 buf[1] = (ev->data.control.value >> 7) & 0x7f; in songpos_decode()
387 int idx = 0; in extra_decode_ctrl14()
389 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); in extra_decode_ctrl14()
390 if (ev->data.control.param < 0x20) { in extra_decode_ctrl14()
401 buf[idx++] = (ev->data.control.value >> 7) & 0x7f; in extra_decode_ctrl14()
404 buf[idx++] = ev->data.control.param + 0x20; in extra_decode_ctrl14()
405 buf[idx++] = ev->data.control.value & 0x7f; in extra_decode_ctrl14()
414 buf[idx++] = ev->data.control.param & 0x7f; in extra_decode_ctrl14()
415 buf[idx++] = ev->data.control.value & 0x7f; in extra_decode_ctrl14()
435 int idx = 0, i; in extra_decode_xrpn()
441 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); in extra_decode_xrpn()
442 bytes[0] = (ev->data.control.param & 0x3f80) >> 7; in extra_decode_xrpn()
443 bytes[1] = ev->data.control.param & 0x007f; in extra_decode_xrpn()
444 bytes[2] = (ev->data.control.value & 0x3f80) >> 7; in extra_decode_xrpn()
445 bytes[3] = ev->data.control.value & 0x007f; in extra_decode_xrpn()
452 for (i = 0; i < 4; i++) { in extra_decode_xrpn()