From patchwork Thu Nov 28 07:47:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13887739 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04C9983CC1 for ; Thu, 28 Nov 2024 07:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732780059; cv=none; b=kH4Y8KrSW7LnaSBpCD8YJjuG/IH41xZBpKKk856adTiu+MM23CknW467X9tp+JDdbOdchhSUKNSw2UrVfLCdozrBQXMSwOGtMKVfF5YCRtb9C0OD7BjRRzxLUwNVXkS7fUJ1VqediRN7kaBEHDx5fJvcyItv4Kj7NL7LrtmY0yI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732780059; c=relaxed/simple; bh=gDo96r1pQUAk+k8DIcNlYezbCDTsd0EaV+P22x+R4d8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=u1ZscOLFoJQ2i9Qx+ftoBBbQ/oQ+uKaEWt3M2pccliW58DN0n5/FAnA+NCskoyD7YkRpOmfHW4gQ/mhsRxnGRYQEn/eEAckZhctaoekRBw+gX7ERprWIhBfYDXrGCH2Ay2tM/4S+3f+B8p7Ehr0pJFQ+g+PY6tmWpmhq2m3p2YE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OvIwJuXX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ZGUFw7EY; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OvIwJuXX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ZGUFw7EY; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OvIwJuXX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZGUFw7EY"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OvIwJuXX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZGUFw7EY" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 157351F44F; Thu, 28 Nov 2024 07:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1732780056; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hedfNJ20QIwAisQsvA0OWoZG7YjqUOr8iMrqHGoOq0U=; b=OvIwJuXX7n8CIEVJPOPUNzTU/V9cHD55SwhlB7K5d1CajoqgT2YfHrwn4Ipo1oNjUfm21w uuRCx4t5XHqtII5ZI9Y9R9AJ3foVphUrxy9SnpmWLc2KFs0Y8kS6VCvuFiCHOoODWrZvDl MEKFH9nxSyucyRjVhl9C/SzJwnczAFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1732780056; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hedfNJ20QIwAisQsvA0OWoZG7YjqUOr8iMrqHGoOq0U=; b=ZGUFw7EYsknScO7BsDnAFqmT8DdHV6Exhm29V/NmLP1o7hyhFJ76KCt83cN3yb+Z5SnshB KfDqCHLGjooGRtBA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=OvIwJuXX; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ZGUFw7EY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1732780056; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hedfNJ20QIwAisQsvA0OWoZG7YjqUOr8iMrqHGoOq0U=; b=OvIwJuXX7n8CIEVJPOPUNzTU/V9cHD55SwhlB7K5d1CajoqgT2YfHrwn4Ipo1oNjUfm21w uuRCx4t5XHqtII5ZI9Y9R9AJ3foVphUrxy9SnpmWLc2KFs0Y8kS6VCvuFiCHOoODWrZvDl MEKFH9nxSyucyRjVhl9C/SzJwnczAFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1732780056; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hedfNJ20QIwAisQsvA0OWoZG7YjqUOr8iMrqHGoOq0U=; b=ZGUFw7EYsknScO7BsDnAFqmT8DdHV6Exhm29V/NmLP1o7hyhFJ76KCt83cN3yb+Z5SnshB KfDqCHLGjooGRtBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E227013690; Thu, 28 Nov 2024 07:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id HaJ+NRcgSGcwGQAAD6G6ig (envelope-from ); Thu, 28 Nov 2024 07:47:35 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Cc: Mark Lentczner Subject: [PATCH] ALSA: seq: Notify client and port info changes Date: Thu, 28 Nov 2024 08:47:33 +0100 Message-ID: <20241128074734.32165-1-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 157351F44F X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO 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 Link: https://lore.kernel.org/CAPnksqRok7xGa4bxq9WWimVV=28-7_j628OmrWLS=S0=hzaTHQ@mail.gmail.com Signed-off-by: Takashi Iwai --- sound/core/seq/seq_clientmgr.c | 7 +++++++ sound/core/seq/seq_ump_client.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 3930e2f9082f..fe2d7f901610 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1290,6 +1290,10 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client, client->midi_version = client_info->midi_version; memcpy(client->event_filter, client_info->event_filter, 32); client->group_filter = client_info->group_filter; + + /* notify the change */ + snd_seq_system_client_ev_client_change(client->number); + return 0; } @@ -1413,6 +1417,9 @@ static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client, void *arg) if (port) { snd_seq_set_port_info(port, info); snd_seq_port_unlock(port); + /* notify the change */ + snd_seq_system_client_ev_port_change(info->addr.client, + info->addr.port); } return 0; } diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c index e5d3f4d206bf..22cac6997d30 100644 --- a/sound/core/seq/seq_ump_client.c +++ b/sound/core/seq/seq_ump_client.c @@ -272,8 +272,6 @@ static void update_port_infos(struct seq_ump_client *client) new); if (err < 0) return; - /* notify to system port */ - snd_seq_system_client_ev_port_change(client->seq_client, i); } }