Skip to content

Commit eacd9c7

Browse files
committed
ALSA: ump: Add no_process_stream flag
This is another preliminary patch for USB MIDI 2.0 gadget driver. Add a new flag, no_process_stream, to snd_ump for suppressing the UMP Stream message handling in UMP core. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a798076 commit eacd9c7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/sound/ump.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct snd_ump_endpoint {
2828
u32 stream_wait_for; /* expected stream message status */
2929
bool stream_finished; /* set when message has been processed */
3030
bool parsed; /* UMP / FB parse finished? */
31+
bool no_process_stream; /* suppress UMP stream messages handling */
3132
wait_queue_head_t stream_wait;
3233
struct snd_rawmidi_file stream_rfile;
3334

sound/core/ump.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ static void ump_handle_stream_msg(struct snd_ump_endpoint *ump,
854854
unsigned int status;
855855
int ret;
856856

857+
/* UMP stream message suppressed (for gadget UMP)? */
858+
if (ump->no_process_stream)
859+
return;
860+
857861
BUILD_BUG_ON(sizeof(*msg) != 16);
858862
ump_dbg(ump, "Stream msg: %08x %08x %08x %08x\n",
859863
buf[0], buf[1], buf[2], buf[3]);

0 commit comments

Comments
 (0)