ALSA: rawmidi: Show substream activity in info ioctl
authorTakashi Iwai <tiwai@suse.de>
Fri, 10 Jan 2025 15:59:35 +0000 (16:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 12 Jan 2025 12:12:20 +0000 (13:12 +0100)
commitb8fefed73a952a33521ad416fb39683abd87454b
tree3ba450b0ff4258b033f335f1861b08d764dec252
parentbdf46443f350dd5d226fd528a5a5954ff762f591
ALSA: rawmidi: Show substream activity in info ioctl

The UMP legacy rawmidi may turn on/off the substream dynamically
depending on the UMP Function Block information.  So far, there was no
direct way to know whether the substream is disabled (inactive) or
not; at most one can take a look at the substream name string or try
to open and get -ENODEV.

This patch extends the rawmidi info ioctl to show the current inactive
state of the given substream.  When the selected substream is
inactive, info flags field contains the new bit flag
SNDRV_RAWMIDI_INFO_STREAM_INACTIVE.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250110155943.31578-3-tiwai@suse.de
Documentation/sound/designs/midi-2.0.rst
include/sound/rawmidi.h
include/uapi/sound/asound.h
sound/core/rawmidi.c
sound/core/ump.c