Skip to content

Commit 1532881

Browse files
tiwaigregkh
authored andcommitted
ALSA: seq: Notify client and port info changes
[ Upstream commit b8e49e2 ] It was supposed to be notified when a sequencer client info and a port info has changed (via SNDRV_SEQ_EVENT_CLIENT_CHANGE and SNDRV_SEQ_EVENT_PORT_CHANGE event, respectively), and there are already helper functions. But those aren't really sent from the driver so far, except for the recent support of UMP, simply due to the lack of implementations. This patch adds the missing notifications at updating the client and the port info. The formerly added notification for UMP is dropped because it's handled now in the port info side. Reported-by: Mark Lentczner <mark@glyphic.com> Link: https://lore.kernel.org/CAPnksqRok7xGa4bxq9WWimVV=28-7_j628OmrWLS=S0=hzaTHQ@mail.gmail.com Link: https://patch.msgid.link/20241128074734.32165-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Stable-dep-of: 92429ca ("ALSA: seq: Fix UMP group 16 filtering") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dbac3e4 commit 1532881

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

sound/core/seq/seq_clientmgr.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,10 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
13291329
client->midi_version = client_info->midi_version;
13301330
memcpy(client->event_filter, client_info->event_filter, 32);
13311331
client->group_filter = client_info->group_filter;
1332+
1333+
/* notify the change */
1334+
snd_seq_system_client_ev_client_change(client->number);
1335+
13321336
return 0;
13331337
}
13341338

@@ -1452,6 +1456,9 @@ static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client, void *arg)
14521456
if (port) {
14531457
snd_seq_set_port_info(port, info);
14541458
snd_seq_port_unlock(port);
1459+
/* notify the change */
1460+
snd_seq_system_client_ev_port_change(info->addr.client,
1461+
info->addr.port);
14551462
}
14561463
return 0;
14571464
}

sound/core/seq/seq_ump_client.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ static void update_port_infos(struct seq_ump_client *client)
272272
new);
273273
if (err < 0)
274274
continue;
275-
/* notify to system port */
276-
snd_seq_system_client_ev_port_change(client->seq_client, i);
277275
}
278276
}
279277

0 commit comments

Comments
 (0)