Patch "ALSA: seq: Drop UMP events when no UMP-conversion is set" has been added to the 6.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: seq: Drop UMP events when no UMP-conversion is set

to the 6.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-seq-drop-ump-events-when-no-ump-conversion-is-s.patch
and it can be found in the queue-6.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 07d1a019f3d9e85c26a2d0b2a0a39b4c303bca57
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Mon Feb 17 18:00:30 2025 +0100

    ALSA: seq: Drop UMP events when no UMP-conversion is set
    
    [ Upstream commit e77aa4b2eaa7fb31b2a7a50214ecb946b2a8b0f6 ]
    
    When a destination client is a user client in the legacy MIDI mode and
    it sets the no-UMP-conversion flag, currently the all UMP events are
    still passed as-is.  But this may confuse the user-space, because the
    event packet size is different from the legacy mode.
    
    Since we cannot handle UMP events in user clients unless it's running
    in the UMP client mode, we should filter out those events instead of
    accepting blindly.  This patch addresses it by slightly adjusting the
    conditions for UMP event handling at the event delivery time.
    
    Fixes: 329ffe11a014 ("ALSA: seq: Allow suppressing UMP conversions")
    Link: https://lore.kernel.org/b77a2cd6-7b59-4eb0-a8db-22d507d3af5f@xxxxxxxxx
    Link: https://patch.msgid.link/20250217170034.21930-1-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 77b6ac9b5c11b..9955c4d54e42a 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -678,12 +678,18 @@ static int snd_seq_deliver_single_event(struct snd_seq_client *client,
 					  dest_port->time_real);
 
 #if IS_ENABLED(CONFIG_SND_SEQ_UMP)
-	if (!(dest->filter & SNDRV_SEQ_FILTER_NO_CONVERT)) {
-		if (snd_seq_ev_is_ump(event)) {
+	if (snd_seq_ev_is_ump(event)) {
+		if (!(dest->filter & SNDRV_SEQ_FILTER_NO_CONVERT)) {
 			result = snd_seq_deliver_from_ump(client, dest, dest_port,
 							  event, atomic, hop);
 			goto __skip;
-		} else if (snd_seq_client_is_ump(dest)) {
+		} else if (dest->type == USER_CLIENT &&
+			   !snd_seq_client_is_ump(dest)) {
+			result = 0; // drop the event
+			goto __skip;
+		}
+	} else if (snd_seq_client_is_ump(dest)) {
+		if (!(dest->filter & SNDRV_SEQ_FILTER_NO_CONVERT)) {
 			result = snd_seq_deliver_to_ump(client, dest, dest_port,
 							event, atomic, hop);
 			goto __skip;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux