[PATCH 4/5] ALSA: rawmidi: Check stream state at exported functions