Lines Matching refs:midi2
102 static int cvt_ump_midi2_to_legacy(const union snd_ump_midi2_msg *midi2, in cvt_ump_midi2_to_legacy() argument
105 unsigned char status = midi2->note.status; in cvt_ump_midi2_to_legacy()
106 unsigned char channel = midi2->note.channel; in cvt_ump_midi2_to_legacy()
113 buf[1] = midi2->note.note; in cvt_ump_midi2_to_legacy()
114 buf[2] = downscale_16_to_7bit(midi2->note.velocity); in cvt_ump_midi2_to_legacy()
119 buf[1] = midi2->paf.note; in cvt_ump_midi2_to_legacy()
120 buf[2] = downscale_32_to_7bit(midi2->paf.data); in cvt_ump_midi2_to_legacy()
123 buf[1] = midi2->cc.index; in cvt_ump_midi2_to_legacy()
124 buf[2] = downscale_32_to_7bit(midi2->cc.data); in cvt_ump_midi2_to_legacy()
127 buf[1] = downscale_32_to_7bit(midi2->caf.data); in cvt_ump_midi2_to_legacy()
130 if (midi2->pg.bank_valid) { in cvt_ump_midi2_to_legacy()
133 buf[2] = midi2->pg.bank_msb; in cvt_ump_midi2_to_legacy()
136 buf[5] = midi2->pg.bank_lsb; in cvt_ump_midi2_to_legacy()
138 buf[7] = midi2->pg.program; in cvt_ump_midi2_to_legacy()
141 buf[1] = midi2->pg.program; in cvt_ump_midi2_to_legacy()
144 v = downscale_32_to_14bit(midi2->pb.data); in cvt_ump_midi2_to_legacy()
152 buf[2] = midi2->rpn.bank; in cvt_ump_midi2_to_legacy()
155 buf[5] = midi2->rpn.index; in cvt_ump_midi2_to_legacy()
158 v = downscale_32_to_14bit(midi2->rpn.data); in cvt_ump_midi2_to_legacy()
300 union snd_ump_midi2_msg *midi2, in fill_rpn() argument
310 midi2->rpn.status = UMP_MSG_STATUS_RPN; in fill_rpn()
311 midi2->rpn.bank = cc->cc_rpn_msb; in fill_rpn()
312 midi2->rpn.index = cc->cc_rpn_lsb; in fill_rpn()
314 midi2->rpn.status = UMP_MSG_STATUS_NRPN; in fill_rpn()
315 midi2->rpn.bank = cc->cc_nrpn_msb; in fill_rpn()
316 midi2->rpn.index = cc->cc_nrpn_lsb; in fill_rpn()
321 midi2->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) | in fill_rpn()
336 union snd_ump_midi2_msg *midi2 = (union snd_ump_midi2_msg *)data; in cvt_legacy_cmd_to_ump() local
369 midi2->note.note = buf[1]; in cvt_legacy_cmd_to_ump()
370 midi2->note.velocity = upscale_7_to_16bit(buf[2]); in cvt_legacy_cmd_to_ump()
373 midi2->paf.note = buf[1]; in cvt_legacy_cmd_to_ump()
374 midi2->paf.data = upscale_7_to_32bit(buf[2]); in cvt_legacy_cmd_to_ump()
379 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
386 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
393 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
398 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
405 return fill_rpn(cc, midi2, false); in cvt_legacy_cmd_to_ump()
417 return fill_rpn(cc, midi2, false); in cvt_legacy_cmd_to_ump()
419 midi2->cc.index = buf[1]; in cvt_legacy_cmd_to_ump()
420 midi2->cc.data = upscale_7_to_32bit(buf[2]); in cvt_legacy_cmd_to_ump()
425 midi2->pg.program = buf[1]; in cvt_legacy_cmd_to_ump()
427 midi2->pg.bank_valid = 1; in cvt_legacy_cmd_to_ump()
428 midi2->pg.bank_msb = cc->cc_bank_msb; in cvt_legacy_cmd_to_ump()
429 midi2->pg.bank_lsb = cc->cc_bank_lsb; in cvt_legacy_cmd_to_ump()
434 midi2->caf.data = upscale_7_to_32bit(buf[1]); in cvt_legacy_cmd_to_ump()
437 midi2->pb.data = upscale_14_to_32bit(buf[1] | (buf[2] << 7)); in cvt_legacy_cmd_to_ump()