Lines Matching refs:cc

111 	ev->data.control.channel = val->cc.channel;  in ump_midi1_to_cc_ev()
112 ev->data.control.param = val->cc.index; in ump_midi1_to_cc_ev()
113 ev->data.control.value = val->cc.data; in ump_midi1_to_cc_ev()
232 ev->data.control.channel = val->cc.channel; in ump_midi2_to_cc_ev()
233 ev->data.control.param = val->cc.index; in ump_midi2_to_cc_ev()
234 ev->data.control.value = downscale_32_to_7bit(val->cc.data); in ump_midi2_to_cc_ev()
371 struct ump_cvt_to_ump_bank *cc; in cvt_ump_midi1_to_midi2() local
391 cc = &dest_port->midi2_bank[midi1->note.channel]; in cvt_ump_midi1_to_midi2()
392 switch (midi1->cc.index) { in cvt_ump_midi1_to_midi2()
394 cc->bank_set = 1; in cvt_ump_midi1_to_midi2()
395 cc->cc_bank_msb = midi1->cc.data; in cvt_ump_midi1_to_midi2()
398 cc->bank_set = 1; in cvt_ump_midi1_to_midi2()
399 cc->cc_bank_lsb = midi1->cc.data; in cvt_ump_midi1_to_midi2()
402 midi2->cc.index = midi1->cc.index; in cvt_ump_midi1_to_midi2()
403 midi2->cc.data = upscale_7_to_32bit(midi1->cc.data); in cvt_ump_midi1_to_midi2()
407 cc = &dest_port->midi2_bank[midi1->note.channel]; in cvt_ump_midi1_to_midi2()
408 if (cc->bank_set) { in cvt_ump_midi1_to_midi2()
410 midi2->pg.bank_msb = cc->cc_bank_msb; in cvt_ump_midi1_to_midi2()
411 midi2->pg.bank_lsb = cc->cc_bank_lsb; in cvt_ump_midi1_to_midi2()
412 cc->bank_set = 0; in cvt_ump_midi1_to_midi2()
462 midi1->cc.index = midi2->cc.index; in cvt_ump_midi2_to_midi1()
463 midi1->cc.data = downscale_32_to_7bit(midi2->cc.data); in cvt_ump_midi2_to_midi1()
467 midi1->cc.status = UMP_MSG_STATUS_CC; in cvt_ump_midi2_to_midi1()
468 midi1->cc.index = UMP_CC_BANK_SELECT; in cvt_ump_midi2_to_midi1()
469 midi1->cc.data = midi2->pg.bank_msb; in cvt_ump_midi2_to_midi1()
475 midi1->cc.index = UMP_CC_BANK_SELECT_LSB; in cvt_ump_midi2_to_midi1()
476 midi1->cc.data = midi2->pg.bank_lsb; in cvt_ump_midi2_to_midi1()
648 data->cc.status = status; in cc_ev_to_ump_midi1()
649 data->cc.channel = event->data.control.channel & 0x0f; in cc_ev_to_ump_midi1()
650 data->cc.index = event->data.control.param; in cc_ev_to_ump_midi1()
651 data->cc.data = event->data.control.value; in cc_ev_to_ump_midi1()
689 data->cc.status = UMP_MSG_STATUS_CC; in ctrl14_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()
693 data->cc.data = (event->data.control.value >> 7) & 0x7f; 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()
712 data->cc.status = UMP_MSG_STATUS_CC; in rpn_ev_to_ump_midi1()
713 data->cc.channel = event->data.control.channel & 0x0f; 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()
718 data[1].cc.index = is_rpn ? UMP_CC_RPN_LSB : UMP_CC_NRPN_LSB; in rpn_ev_to_ump_midi1()
719 data[1].cc.data = event->data.control.param & 0x7f; in rpn_ev_to_ump_midi1()
720 data[2].cc.index = UMP_CC_DATA; in rpn_ev_to_ump_midi1()
721 data[2].cc.data = (event->data.control.value >> 7) & 0x7f; in rpn_ev_to_ump_midi1()
722 data[3].cc.index = UMP_CC_DATA_LSB; in rpn_ev_to_ump_midi1()
723 data[3].cc.data = event->data.control.value & 0x7f; in rpn_ev_to_ump_midi1()
793 static void reset_rpn(struct ump_cvt_to_ump_bank *cc) in reset_rpn() argument
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()
803 static int fill_rpn(struct ump_cvt_to_ump_bank *cc, in fill_rpn() argument
808 if (!(cc->cc_data_lsb_set || cc->cc_data_msb_set)) in fill_rpn()
811 if (!flush && (!cc->cc_data_lsb_set || !cc->cc_data_msb_set)) in fill_rpn()
814 if (cc->rpn_set) { in fill_rpn()
816 data->rpn.bank = cc->cc_rpn_msb; in fill_rpn()
817 data->rpn.index = cc->cc_rpn_lsb; in fill_rpn()
818 } else if (cc->nrpn_set) { in fill_rpn()
820 data->rpn.bank = cc->cc_nrpn_msb; in fill_rpn()
821 data->rpn.index = cc->cc_nrpn_lsb; in fill_rpn()
826 data->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) | in fill_rpn()
827 cc->cc_data_lsb); in fill_rpn()
830 reset_rpn(cc); in fill_rpn()
843 struct ump_cvt_to_ump_bank *cc = &dest_port->midi2_bank[channel]; in cc_ev_to_ump_midi2() local
849 ret = fill_rpn(cc, data, channel, true); in cc_ev_to_ump_midi2()
850 cc->rpn_set = 1; in cc_ev_to_ump_midi2()
851 cc->cc_rpn_msb = val; in cc_ev_to_ump_midi2()
852 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cc_ev_to_ump_midi2()
853 reset_rpn(cc); in cc_ev_to_ump_midi2()
856 ret = fill_rpn(cc, data, channel, true); in cc_ev_to_ump_midi2()
857 cc->rpn_set = 1; in cc_ev_to_ump_midi2()
858 cc->cc_rpn_lsb = val; in cc_ev_to_ump_midi2()
859 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in cc_ev_to_ump_midi2()
860 reset_rpn(cc); in cc_ev_to_ump_midi2()
863 ret = fill_rpn(cc, data, channel, true); in cc_ev_to_ump_midi2()
864 cc->nrpn_set = 1; in cc_ev_to_ump_midi2()
865 cc->cc_nrpn_msb = val; in cc_ev_to_ump_midi2()
868 ret = fill_rpn(cc, data, channel, true); in cc_ev_to_ump_midi2()
869 cc->nrpn_set = 1; in cc_ev_to_ump_midi2()
870 cc->cc_nrpn_lsb = val; in cc_ev_to_ump_midi2()
873 cc->cc_data_msb_set = 1; in cc_ev_to_ump_midi2()
874 cc->cc_data_msb = val; in cc_ev_to_ump_midi2()
875 return fill_rpn(cc, data, channel, false); in cc_ev_to_ump_midi2()
877 cc->bank_set = 1; in cc_ev_to_ump_midi2()
878 cc->cc_bank_msb = val; in cc_ev_to_ump_midi2()
881 cc->bank_set = 1; in cc_ev_to_ump_midi2()
882 cc->cc_bank_lsb = val; in cc_ev_to_ump_midi2()
885 cc->cc_data_lsb_set = 1; in cc_ev_to_ump_midi2()
886 cc->cc_data_lsb = val; in cc_ev_to_ump_midi2()
887 return fill_rpn(cc, data, channel, false); in cc_ev_to_ump_midi2()
890 data->cc.status = status; in cc_ev_to_ump_midi2()
891 data->cc.channel = channel; in cc_ev_to_ump_midi2()
892 data->cc.index = index; 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()
916 struct ump_cvt_to_ump_bank *cc = &dest_port->midi2_bank[channel]; in pgm_ev_to_ump_midi2() local
921 if (cc->bank_set) { in pgm_ev_to_ump_midi2()
923 data->pg.bank_msb = cc->cc_bank_msb; in pgm_ev_to_ump_midi2()
924 data->pg.bank_lsb = cc->cc_bank_lsb; in pgm_ev_to_ump_midi2()
925 cc->bank_set = 0; in pgm_ev_to_ump_midi2()
953 struct ump_cvt_to_ump_bank *cc = &dest_port->midi2_bank[channel]; in ctrl14_ev_to_ump_midi2() local
962 cc->cc_bank_msb = msb; in ctrl14_ev_to_ump_midi2()
965 cc->bank_set = 1; in ctrl14_ev_to_ump_midi2()
966 cc->cc_bank_lsb = lsb; in ctrl14_ev_to_ump_midi2()
970 ret = fill_rpn(cc, data, channel, true); in ctrl14_ev_to_ump_midi2()
971 cc->cc_rpn_msb = msb; in ctrl14_ev_to_ump_midi2()
972 cc->cc_rpn_lsb = lsb; in ctrl14_ev_to_ump_midi2()
973 cc->rpn_set = 1; in ctrl14_ev_to_ump_midi2()
974 if (cc->cc_rpn_msb == 0x7f && cc->cc_rpn_lsb == 0x7f) in ctrl14_ev_to_ump_midi2()
975 reset_rpn(cc); in ctrl14_ev_to_ump_midi2()
979 ret = fill_rpn(cc, data, channel, true); in ctrl14_ev_to_ump_midi2()
980 cc->cc_nrpn_msb = msb; in ctrl14_ev_to_ump_midi2()
981 cc->nrpn_set = 1; in ctrl14_ev_to_ump_midi2()
982 cc->cc_nrpn_lsb = lsb; in ctrl14_ev_to_ump_midi2()
986 cc->cc_data_msb_set = cc->cc_data_lsb_set = 1; in ctrl14_ev_to_ump_midi2()
987 cc->cc_data_msb = msb; in ctrl14_ev_to_ump_midi2()
988 cc->cc_data_lsb = lsb; in ctrl14_ev_to_ump_midi2()
989 return fill_rpn(cc, data, channel, false); in ctrl14_ev_to_ump_midi2()
992 data->cc.status = UMP_MSG_STATUS_CC; in ctrl14_ev_to_ump_midi2()
993 data->cc.channel = channel; in ctrl14_ev_to_ump_midi2()
994 data->cc.index = index; in ctrl14_ev_to_ump_midi2()
996 data->cc.data = upscale_7_to_32bit(msb); in ctrl14_ev_to_ump_midi2()
998 data[1].cc.index = event->data.control.param | 0x20; in ctrl14_ev_to_ump_midi2()
999 data[1].cc.data = upscale_7_to_32bit(lsb); in ctrl14_ev_to_ump_midi2()
1003 data->cc.data = upscale_7_to_32bit(lsb); in ctrl14_ev_to_ump_midi2()