#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
+#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
snd_ctl_close(ctl);
return -SND_ERROR_INCOMPATIBLE_VERSION;
}
+ if (SNDRV_PROTOCOL_VERSION(2, 0, 2) <= ver) {
+ /* inform the protocol version we're supporting */
+ unsigned int user_ver = SNDRV_RAWMIDI_VERSION;
+ ioctl(fd, SNDRV_RAWMIDI_IOCTL_USER_PVERSION, &user_ver);
+ }
if (subdevice >= 0) {
memset(&info, 0, sizeof(info));
info.stream = outputp ? SNDRV_RAWMIDI_STREAM_OUTPUT : SNDRV_RAWMIDI_STREAM_INPUT;