Lines Matching full:cc

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()
290 static void reset_rpn(struct ump_cvt_to_ump_bank *cc) in reset_rpn() argument
292 cc->rpn_set = 0; in reset_rpn()
293 cc->nrpn_set = 0; in reset_rpn()
294 cc->cc_rpn_msb = cc->cc_rpn_lsb = 0; in reset_rpn()
295 cc->cc_data_msb = cc->cc_data_lsb = 0; in reset_rpn()
296 cc->cc_data_msb_set = cc->cc_data_lsb_set = 0; in reset_rpn()
299 static int fill_rpn(struct ump_cvt_to_ump_bank *cc, in fill_rpn() argument
303 if (!(cc->cc_data_lsb_set || cc->cc_data_msb_set)) in fill_rpn()
306 if (!flush && (!cc->cc_data_lsb_set || !cc->cc_data_msb_set)) in fill_rpn()
309 if (cc->rpn_set) { 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()
313 } else if (cc->nrpn_set) { 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()
322 cc->cc_data_lsb); in fill_rpn()
324 reset_rpn(cc); in fill_rpn()
335 struct ump_cvt_to_ump_bank *cc; in cvt_legacy_cmd_to_ump() local
355 cc = &cvt->bank[channel]; in cvt_legacy_cmd_to_ump()
379 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
380 cc->rpn_set = 1; in cvt_legacy_cmd_to_ump()
381 cc->cc_rpn_msb = buf[2]; in cvt_legacy_cmd_to_ump()
382 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cvt_legacy_cmd_to_ump()
383 reset_rpn(cc); in cvt_legacy_cmd_to_ump()
386 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
387 cc->rpn_set = 1; in cvt_legacy_cmd_to_ump()
388 cc->cc_rpn_lsb = buf[2]; in cvt_legacy_cmd_to_ump()
389 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cvt_legacy_cmd_to_ump()
390 reset_rpn(cc); in cvt_legacy_cmd_to_ump()
393 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
394 cc->nrpn_set = 1; in cvt_legacy_cmd_to_ump()
395 cc->cc_nrpn_msb = buf[2]; in cvt_legacy_cmd_to_ump()
398 ret = fill_rpn(cc, midi2, true); in cvt_legacy_cmd_to_ump()
399 cc->nrpn_set = 1; in cvt_legacy_cmd_to_ump()
400 cc->cc_nrpn_lsb = buf[2]; in cvt_legacy_cmd_to_ump()
403 cc->cc_data_msb_set = 1; in cvt_legacy_cmd_to_ump()
404 cc->cc_data_msb = buf[2]; in cvt_legacy_cmd_to_ump()
405 return fill_rpn(cc, midi2, false); in cvt_legacy_cmd_to_ump()
407 cc->bank_set = 1; in cvt_legacy_cmd_to_ump()
408 cc->cc_bank_msb = buf[2]; in cvt_legacy_cmd_to_ump()
411 cc->bank_set = 1; in cvt_legacy_cmd_to_ump()
412 cc->cc_bank_lsb = buf[2]; in cvt_legacy_cmd_to_ump()
415 cc->cc_data_lsb_set = 1; in cvt_legacy_cmd_to_ump()
416 cc->cc_data_lsb = buf[2]; 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()
426 if (cc->bank_set) { 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()
430 cc->bank_set = 0; in cvt_legacy_cmd_to_ump()