Merge "MIDI: check range of port counts" into rvc-dev