summaryrefslogtreecommitdiff
path: root/sound/core/rawmidi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-01-14 11:47:01 +0100
committerTakashi Iwai <tiwai@suse.de>2025-01-14 16:52:07 +0100
commit384669921779806105c56751abff41fa0127f93a (patch)
treeaf0786c417e9fcc5458a0efea37ccbcaa1786aa3 /sound/core/rawmidi.c
parent3784950b7b9ed18a5991b13c57145689b620d687 (diff)
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. Suggested-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20250114104711.19197-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/rawmidi.c')
-rw-r--r--sound/core/rawmidi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 8a681bff4f7f..70a958ac1112 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1837,7 +1837,6 @@ int snd_rawmidi_init(struct snd_rawmidi *rmidi,
INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams);
INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams);
rmidi->info_flags = info_flags;
- rmidi->tied_device = SNDRV_RAWMIDI_DEVICE_UNKNOWN;
if (id != NULL)
strscpy(rmidi->id, id, sizeof(rmidi->id));