From: Takashi Iwai <tiwai@suse.de>
To: Mark Lentczner <mark@glyphic.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: kernel snd seq bugs: SND_SEQ_EVENT_CLIENT_CHANGE & SND_SEQ_EVENT_PORT_CHANGE
Date: Mon, 25 Nov 2024 10:37:24 +0100 [thread overview]
Message-ID: <87bjy3zmaz.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAPnksqRok7xGa4bxq9WWimVV=28-7_j628OmrWLS=S0=hzaTHQ@mail.gmail.com>
On Sun, 24 Nov 2024 22:31:13 +0100,
Mark Lentczner wrote:
>
> I'm the author of amidiminder - a utility that keeps track of desired
> connections between ALSA Seq (MIDI) ports.
>
> I've found a bug in the kernel part of the ALSA Sequencer, and am not sure
> where or how to report it.
>
> Summary:
> The events:
> * SND_SEQ_EVENT_CLIENT_CHANGE is never sent
> * SND_SEQ_EVENT_PORT_CHANGE is not sent on common port changes (name and
> port info)
>
> I have a lot of detail on these bugs, what other software causes them to be
> a problem (PureData), and where the missing code in the kernel
> sound/core/seq files is.
>
> Before I dump all the details in this forum.... where is the right place
> for me to report and/or discuss this?
Those events aren't created indeed. I don't remember exactly, as the
implementation was really old (decades ago), but I guess it was
because it'd give too much broadcasting when the event is triggered at
each client / port change.
Actually it's trivial to enable those events. It's just a patch like
below. But, I have to consider the result by this change and try to
avoid the unnecessary event bombing before going ahead.
thanks,
Takashi
-- 8< --
--- 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;
}
next prev parent reply other threads:[~2024-11-25 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 21:31 kernel snd seq bugs: SND_SEQ_EVENT_CLIENT_CHANGE & SND_SEQ_EVENT_PORT_CHANGE Mark Lentczner
2024-11-25 9:37 ` Takashi Iwai [this message]
2024-11-25 18:55 ` Mark Lentczner
2024-11-26 12:10 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bjy3zmaz.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=mark@glyphic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox