Skip to content

Commit aaa55fa

Browse files
committed
ALSA: seq: ump: Fix seq port updates per FB info notify
update_port_infos() is called when a UMP FB Info update notification is received, and this function is supposed to update the attributes of the corresponding sequencer port. However, the function had a few issues and it brought to the incorrect states. Namely: - It tried to get a wrong sequencer info for the update without correcting the port number with the group-offset 1 - The loop exited immediately when a sequencer port isn't present; this ended up with the truncation if a sequencer port in the middle goes away This patch addresses those bugs. Fixes: 4a16a3a ("ALSA: seq: ump: Handle FB info update") Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 2e5bf5b commit aaa55fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/core/seq/seq_ump_client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,12 @@ static void update_port_infos(struct seq_ump_client *client)
257257
continue;
258258

259259
old->addr.client = client->seq_client;
260-
old->addr.port = i;
260+
old->addr.port = ump_group_to_seq_port(i);
261261
err = snd_seq_kernel_client_ctl(client->seq_client,
262262
SNDRV_SEQ_IOCTL_GET_PORT_INFO,
263263
old);
264264
if (err < 0)
265-
return;
265+
continue;
266266
fill_port_info(new, client, &client->ump->groups[i]);
267267
if (old->capability == new->capability &&
268268
!strcmp(old->name, new->name))
@@ -271,7 +271,7 @@ static void update_port_infos(struct seq_ump_client *client)
271271
SNDRV_SEQ_IOCTL_SET_PORT_INFO,
272272
new);
273273
if (err < 0)
274-
return;
274+
continue;
275275
/* notify to system port */
276276
snd_seq_system_client_ev_port_change(client->seq_client, i);
277277
}

0 commit comments

Comments
 (0)