History

ALSA: rawmidi: Make tied_device=0 as default / unknown

In the original change, rawmidi_info.tied_device showed -1 for the unknown or untied device. But this would require the user-space to check the protocol version and judge the value conditionally, which is rather error-prone. Instead, set the tied_device = 0 to be default as unknown, and indicate the real device with the offset 1, for achieving more backward compatibility.

Takashi Iwai committed 1 year ago

Commit 38466991 parent 37849504 files · +11 −4Browse files

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

Unified · Split

include/uapi/sound/asound.h+1−1
@@ -730,7 +730,7 @@ enum { · 729 unmodified lines
730730 #define SNDRV_RAWMIDI_INFO_UMP 0x00000008
731731 #define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE 0x00000010
732732
733−#define SNDRV_RAWMIDI_DEVICE_UNKNOWN -1
733+#define SNDRV_RAWMIDI_DEVICE_UNKNOWN 0
734734
735735 struct snd_rawmidi_info {
736736 unsigned int device; /* RO/WR (control): device number */

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