Lines Matching +full:0 +full:x7f

37 	if (src <= 0x40)  in upscale_7_to_16bit()
39 repeat = src & 0x3f; in upscale_7_to_16bit()
48 if (src <= 0x40) in upscale_7_to_32bit()
50 repeat = src & 0x3f; in upscale_7_to_32bit()
60 if (src <= 0x2000) in upscale_14_to_32bit()
62 repeat = src & 0x1fff; in upscale_14_to_32bit()
68 return port->ump_group ? (port->ump_group - 1) : 0; in get_ump_group()
73 ump_compose(type, get_ump_group(port), 0, 0)
122 /* Encoders for MIDI1 status 0x80-0xe0 */
124 {SNDRV_SEQ_EVENT_NOTEOFF, ump_midi1_to_note_ev}, /* 0x80 */
125 {SNDRV_SEQ_EVENT_NOTEON, ump_midi1_to_note_ev}, /* 0x90 */
126 {SNDRV_SEQ_EVENT_KEYPRESS, ump_midi1_to_note_ev}, /* 0xa0 */
127 {SNDRV_SEQ_EVENT_CONTROLLER, ump_midi1_to_cc_ev}, /* 0xb0 */
128 {SNDRV_SEQ_EVENT_PGMCHANGE, ump_midi1_to_ctrl_ev}, /* 0xc0 */
129 {SNDRV_SEQ_EVENT_CHANPRESS, ump_midi1_to_ctrl_ev}, /* 0xd0 */
130 {SNDRV_SEQ_EVENT_PITCHBEND, ump_midi1_to_pitchbend_ev}, /* 0xe0 */
138 if (status < 0x8 || status > 0xe) in cvt_ump_midi1_to_event()
139 return 0; /* invalid - skip */ in cvt_ump_midi1_to_event()
163 /* Encoders for 0xf0 - 0xff */
165 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf0 */
166 {SNDRV_SEQ_EVENT_QFRAME, ump_system_to_one_param_ev}, /* 0xf1 */
167 {SNDRV_SEQ_EVENT_SONGPOS, ump_system_to_songpos_ev}, /* 0xf2 */
168 {SNDRV_SEQ_EVENT_SONGSEL, ump_system_to_one_param_ev}, /* 0xf3 */
169 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf4 */
170 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf5 */
171 {SNDRV_SEQ_EVENT_TUNE_REQUEST, NULL}, /* 0xf6 */
172 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf7 */
173 {SNDRV_SEQ_EVENT_CLOCK, NULL}, /* 0xf8 */
174 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf9 */
175 {SNDRV_SEQ_EVENT_START, NULL}, /* 0xfa */
176 {SNDRV_SEQ_EVENT_CONTINUE, NULL}, /* 0xfb */
177 {SNDRV_SEQ_EVENT_STOP, NULL}, /* 0xfc */
178 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xfd */
179 {SNDRV_SEQ_EVENT_SENSING, NULL}, /* 0xfe */
180 {SNDRV_SEQ_EVENT_RESET, NULL}, /* 0xff */
188 if ((status & 0xf0) != UMP_MIDI1_MSG_REALTIME) in cvt_ump_system_to_event()
189 return 0; /* invalid status - skip */ in cvt_ump_system_to_event()
190 status &= 0x0f; in cvt_ump_system_to_event()
194 return 0; in cvt_ump_system_to_event()
209 /* correct note-on velocity 0 to 1; in ump_midi2_to_note_ev()
249 ev[1] = ev[0]; in ump_midi2_to_pgm_ev()
283 /* Encoders for MIDI2 status 0x00-0xf0 */
285 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x00 */
286 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x10 */
287 {SNDRV_SEQ_EVENT_REGPARAM, ump_midi2_to_rpn_ev}, /* 0x20 */
288 {SNDRV_SEQ_EVENT_NONREGPARAM, ump_midi2_to_rpn_ev}, /* 0x30 */
289 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x40 */
290 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x50 */
291 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x60 */
292 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0x70 */
293 {SNDRV_SEQ_EVENT_NOTEOFF, ump_midi2_to_note_ev}, /* 0x80 */
294 {SNDRV_SEQ_EVENT_NOTEON, ump_midi2_to_note_ev}, /* 0x90 */
295 {SNDRV_SEQ_EVENT_KEYPRESS, ump_midi2_to_note_ev}, /* 0xa0 */
296 {SNDRV_SEQ_EVENT_CONTROLLER, ump_midi2_to_cc_ev}, /* 0xb0 */
297 {SNDRV_SEQ_EVENT_PGMCHANGE, ump_midi2_to_pgm_ev}, /* 0xc0 */
298 {SNDRV_SEQ_EVENT_CHANPRESS, ump_midi2_to_ctrl_ev}, /* 0xd0 */
299 {SNDRV_SEQ_EVENT_PITCHBEND, ump_midi2_to_pitchbend_ev}, /* 0xe0 */
300 {SNDRV_SEQ_EVENT_NONE, NULL}, /* 0xf0 */
310 return 0; /* skip */ in cvt_ump_midi2_to_event()
322 int size = 0; in cvt_ump_sysex7_to_event()
324 val = data[0]; in cvt_ump_sysex7_to_event()
328 return 0; // skip in cvt_ump_sysex7_to_event()
332 buf[0] = UMP_MIDI1_MSG_SYSEX_START; in cvt_ump_sysex7_to_event()
336 if (bytes > 0) in cvt_ump_sysex7_to_event()
337 buf[size++] = (val >> 8) & 0x7f; in cvt_ump_sysex7_to_event()
339 buf[size++] = val & 0x7f; in cvt_ump_sysex7_to_event()
342 buf[size++] = (val >> 24) & 0x7f; in cvt_ump_sysex7_to_event()
344 buf[size++] = (val >> 16) & 0x7f; in cvt_ump_sysex7_to_event()
346 buf[size++] = (val >> 8) & 0x7f; in cvt_ump_sysex7_to_event()
348 buf[size++] = val & 0x7f; in cvt_ump_sysex7_to_event()
374 memset(&ev_cvt.ump, 0, sizeof(ev_cvt.ump)); in cvt_ump_midi1_to_midi2()
396 return 0; // skip in cvt_ump_midi1_to_midi2()
400 return 0; // skip in cvt_ump_midi1_to_midi2()
412 cc->bank_set = 0; in cvt_ump_midi1_to_midi2()
423 return 0; in cvt_ump_midi1_to_midi2()
445 memset(&ev_cvt.ump, 0, sizeof(ev_cvt.ump)); in cvt_ump_midi2_to_midi1()
473 if (err < 0) in cvt_ump_midi2_to_midi1()
480 if (err < 0) in cvt_ump_midi2_to_midi1()
492 midi1->pb.data_lsb = v & 0x7f; in cvt_ump_midi2_to_midi1()
495 return 0; in cvt_ump_midi2_to_midi1()
517 ev_cvt[0] = ev_cvt[1] = *event; in cvt_ump_to_any()
518 ev_cvt[0].flags = flags; in cvt_ump_to_any()
537 return 0; in cvt_ump_to_any()
540 for (i = 0; i < len; i++) { in cvt_ump_to_any()
543 if (err < 0) in cvt_ump_to_any()
547 return 0; in cvt_ump_to_any()
559 ev.ump[0] &= ~(0xfU << 24); in deliver_with_group_convert()
561 ev.ump[0] |= ((dest_port->ump_group - 1) << 24); in deliver_with_group_convert()
574 group = ump_message_group(ev->ump[0]); in ump_event_filtered()
575 if (ump_is_groupless_msg(ump_message_type(ev->ump[0]))) in ump_event_filtered()
576 return dest->group_filter & (1U << 0); in ump_event_filtered()
592 return 0; // skip, no variable event for UMP, so far in snd_seq_deliver_from_ump()
594 return 0; // skip if group filter is set and matching in snd_seq_deliver_from_ump()
595 type = ump_message_type(ump_ev->ump[0]); in snd_seq_deliver_from_ump()
636 data->note.channel = event->data.note.channel & 0x0f; in note_ev_to_ump_midi1()
637 data->note.velocity = event->data.note.velocity & 0x7f; in note_ev_to_ump_midi1()
638 data->note.note = event->data.note.note & 0x7f; in note_ev_to_ump_midi1()
649 data->cc.channel = event->data.control.channel & 0x0f; in cc_ev_to_ump_midi1()
662 data->caf.channel = event->data.control.channel & 0x0f; in ctrl_ev_to_ump_midi1()
663 data->caf.data = event->data.control.value & 0x7f; in ctrl_ev_to_ump_midi1()
675 val = clamp(val, 0, 0x3fff); in pitchbend_ev_to_ump_midi1()
677 data->pb.channel = event->data.control.channel & 0x0f; in pitchbend_ev_to_ump_midi1()
678 data->pb.data_msb = (val >> 7) & 0x7f; in pitchbend_ev_to_ump_midi1()
679 data->pb.data_lsb = val & 0x7f; in pitchbend_ev_to_ump_midi1()
690 data->cc.channel = event->data.control.channel & 0x0f; in ctrl14_ev_to_ump_midi1()
691 data->cc.index = event->data.control.param & 0x7f; in ctrl14_ev_to_ump_midi1()
692 if (event->data.control.param < 0x20) { in ctrl14_ev_to_ump_midi1()
693 data->cc.data = (event->data.control.value >> 7) & 0x7f; in ctrl14_ev_to_ump_midi1()
694 data[1] = data[0]; in ctrl14_ev_to_ump_midi1()
695 data[1].cc.index = event->data.control.param | 0x20; in ctrl14_ev_to_ump_midi1()
696 data[1].cc.data = event->data.control.value & 0x7f; in ctrl14_ev_to_ump_midi1()
700 data->cc.data = event->data.control.value & 0x7f; in ctrl14_ev_to_ump_midi1()
713 data->cc.channel = event->data.control.channel & 0x0f; in rpn_ev_to_ump_midi1()
714 data[1] = data[2] = data[3] = data[0]; in rpn_ev_to_ump_midi1()
716 data[0].cc.index = is_rpn ? UMP_CC_RPN_MSB : UMP_CC_NRPN_MSB; in rpn_ev_to_ump_midi1()
717 data[0].cc.data = (event->data.control.param >> 7) & 0x7f; in rpn_ev_to_ump_midi1()
719 data[1].cc.data = event->data.control.param & 0x7f; in rpn_ev_to_ump_midi1()
721 data[2].cc.data = (event->data.control.value >> 7) & 0x7f; in rpn_ev_to_ump_midi1()
723 data[3].cc.data = event->data.control.value & 0x7f; in rpn_ev_to_ump_midi1()
746 data->system.parm1 = event->data.control.value & 0x7f; in system_1p_ev_to_ump_midi1()
758 data->system.parm1 = event->data.control.value & 0x7f; in system_2p_ev_to_ump_midi1()
759 data->system.parm2 = (event->data.control.value >> 7) & 0x7f; in system_2p_ev_to_ump_midi1()
774 data->note.channel = event->data.note.channel & 0x0f; in note_ev_to_ump_midi2()
775 data->note.note = event->data.note.note & 0x7f; in note_ev_to_ump_midi2()
776 data->note.velocity = upscale_7_to_16bit(event->data.note.velocity & 0x7f); in note_ev_to_ump_midi2()
787 data->paf.channel = event->data.note.channel & 0x0f; in paf_ev_to_ump_midi2()
788 data->paf.note = event->data.note.note & 0x7f; in paf_ev_to_ump_midi2()
789 data->paf.data = upscale_7_to_32bit(event->data.note.velocity & 0x7f); in paf_ev_to_ump_midi2()
795 cc->rpn_set = 0; in reset_rpn()
796 cc->nrpn_set = 0; in reset_rpn()
797 cc->cc_rpn_msb = cc->cc_rpn_lsb = 0; in reset_rpn()
798 cc->cc_data_msb = cc->cc_data_lsb = 0; in reset_rpn()
799 cc->cc_data_msb_set = cc->cc_data_lsb_set = 0; in reset_rpn()
809 return 0; // skip in fill_rpn()
812 return 0; // skip in fill_rpn()
823 return 0; // skip in fill_rpn()
840 unsigned char channel = event->data.control.channel & 0x0f; in cc_ev_to_ump_midi2()
841 unsigned char index = event->data.control.param & 0x7f; in cc_ev_to_ump_midi2()
842 unsigned char val = event->data.control.value & 0x7f; in cc_ev_to_ump_midi2()
852 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cc_ev_to_ump_midi2()
859 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cc_ev_to_ump_midi2()
879 return 0; // skip in cc_ev_to_ump_midi2()
883 return 0; // skip in cc_ev_to_ump_midi2()
893 data->cc.data = upscale_7_to_32bit(event->data.control.value & 0x7f); in cc_ev_to_ump_midi2()
904 data->caf.channel = event->data.control.channel & 0x0f; in ctrl_ev_to_ump_midi2()
905 data->caf.data = upscale_7_to_32bit(event->data.control.value & 0x7f); in ctrl_ev_to_ump_midi2()
915 unsigned char channel = event->data.control.channel & 0x0f; in pgm_ev_to_ump_midi2()
920 data->pg.program = event->data.control.value & 0x7f; in pgm_ev_to_ump_midi2()
925 cc->bank_set = 0; in pgm_ev_to_ump_midi2()
938 val = clamp(val, 0, 0x3fff); in pitchbend_ev_to_ump_midi2()
940 data->pb.channel = event->data.control.channel & 0x0f; in pitchbend_ev_to_ump_midi2()
951 unsigned char channel = event->data.control.channel & 0x0f; in ctrl14_ev_to_ump_midi2()
952 unsigned char index = event->data.control.param & 0x7f; in ctrl14_ev_to_ump_midi2()
957 msb = (event->data.control.value >> 7) & 0x7f; in ctrl14_ev_to_ump_midi2()
958 lsb = event->data.control.value & 0x7f; in ctrl14_ev_to_ump_midi2()
967 return 0; // skip in ctrl14_ev_to_ump_midi2()
974 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in ctrl14_ev_to_ump_midi2()
995 if (event->data.control.param < 0x20) { in ctrl14_ev_to_ump_midi2()
997 data[1] = data[0]; in ctrl14_ev_to_ump_midi2()
998 data[1].cc.index = event->data.control.param | 0x20; in ctrl14_ev_to_ump_midi2()
1015 data->rpn.bank = (event->data.control.param >> 7) & 0x7f; in rpn_ev_to_ump_midi2()
1016 data->rpn.index = event->data.control.param & 0x7f; in rpn_ev_to_ump_midi2()
1017 data->rpn.data = upscale_14_to_32bit(event->data.control.value & 0x3fff); in rpn_ev_to_ump_midi2()
1082 { SNDRV_SEQ_EVENT_CONTROL14, 0,
1114 for (i = 0; i < ARRAY_SIZE(seq_ev_ump_encoders); i++) in find_ump_encoder()
1125 dest->type = 0; in setup_ump_event()
1128 memset(dest->ump, 0, sizeof(dest->ump)); in setup_ump_event()
1150 return 0; in cvt_to_ump_midi1()
1153 for (i = 0; i < n; i++) { in cvt_to_ump_midi1()
1154 ev_cvt.ump[0] = data[i].raw; in cvt_to_ump_midi1()
1158 if (err < 0) in cvt_to_ump_midi1()
1162 return 0; in cvt_to_ump_midi1()
1181 data->raw[0] = make_raw_ump(dest_port, UMP_MSG_TYPE_MIDI2_CHANNEL_VOICE); in cvt_to_ump_midi2()
1182 data->raw[1] = 0; in cvt_to_ump_midi2()
1185 return 0; in cvt_to_ump_midi2()
1188 for (i = 0; i < n; i++) { in cvt_to_ump_midi2()
1193 if (err < 0) in cvt_to_ump_midi2()
1197 return 0; in cvt_to_ump_midi2()
1204 memset(val, 0, 8); in fill_sysex7_ump()
1209 val[0] |= ump_compose(UMP_MSG_TYPE_DATA, get_ump_group(dest_port), in fill_sysex7_ump()
1222 int offset = 0; in cvt_sysex_to_ump()
1227 return 0; in cvt_sysex_to_ump()
1232 if (len <= 0) in cvt_sysex_to_ump()
1250 if (len > 0 && len < 8 && in cvt_sysex_to_ump()
1265 if (err < 0) in cvt_sysex_to_ump()
1269 return 0; in cvt_sysex_to_ump()
1280 return 0; /* group filtered - skip the event */ in snd_seq_deliver_to_ump()