History

ALSA: rawmidi: Skip UMP devices at SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE

Applications may look for rawmidi devices with the ioctl SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE. Returning a UMP device from this ioctl may confuse the existing applications that support only the legacy rawmidi. This patch changes the code to skip the UMP devices from the lookup for avoiding the confusion, and introduces a new ioctl to look for the UMP devices instead. Along with this change, bump the CTL protocol version to 2.0.9.

Takashi Iwai committed 3 years ago

Commit 127ae6f1 parent e3a8a5b2 files · +38 −22Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/sound/asound.h+2−1
@@ -1016,7 +1016,7 @@ struct snd_timer_tread { · 1015 unmodified lines
1016 * *1016 * *
1017 ****************************************************************************/1017 ****************************************************************************/
1018 1018
1019#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8)1019#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9)
1020 1020
1021struct snd_ctl_card_info {1021struct snd_ctl_card_info {
1022 int card; /* card number */1022 int card; /* card number */
@@ -1177,6 +1177,7 @@ struct snd_ctl_tlv { · 154 unmodified lines
1177#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)1177#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
1178#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)1178#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
1179#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)1179#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
1180#define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE _IOWR('U', 0x43, int)
1180#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)1181#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
1181#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)1182#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
1182 1183

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t