mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
rawmidi: add support for SNDRV_RAWMIDI_IOCTL_USER_PVERSION
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c578e80d6f
commit
c932c1e7ab
2 changed files with 6 additions and 0 deletions
|
|
@ -354,6 +354,11 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue