From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63E68C7EE26 for ; Mon, 22 May 2023 08:01:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4BD7E3E7; Mon, 22 May 2023 10:00:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4BD7E3E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684742499; bh=nNM+stwf1leO7AoAXXareJTlOepoSTXriueTQ4Ryy2U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JJIOh0iUTDhWtkQ1lBHfTqp+IvkEJJy6l9P8Rw/KnXh/QKXa7Q0i04zgL5/hJGVqH a8Y6CJiL5NnSearAI90ZKzIifUXAUA23OT/Msd2qoY27ArnwEg99C6rK3IuF3ggrEi D1smMQ9fw25c0yhu8ZETnoSLLSLJhgWw1FLlexPA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 114DEF80249; Mon, 22 May 2023 10:00:48 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C664BF8024E; Mon, 22 May 2023 10:00:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EC3BAF8024E; Mon, 22 May 2023 10:00:45 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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 alsa1.perex.cz (Postfix) with ESMTPS id C251EF80086 for ; Mon, 22 May 2023 10:00:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C251EF80086 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=tUXo//Ia; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PygK2KMq Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2CCEB218FA; Mon, 22 May 2023 08:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684742441; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W3zKM3AvJOwPEeFq/T8HxFxliU6t3U3Bvdq9H0coEGY=; b=tUXo//IaQXhAlCwTFIoHiDlrTQKaUzHFLA9DYPO2f1pHzJsPGR/HgWnMo6IjqfIPkDlM8v w/zCOpItJhjCtlQB8cf2gsEP6azOU4A0oxbOWZ6HdeNHiCMxDGM+YgiCEHlt315IPwB0tT DP7HR7vEbao2Tg5VIDJQwcmgt8VjwIw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684742441; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W3zKM3AvJOwPEeFq/T8HxFxliU6t3U3Bvdq9H0coEGY=; b=PygK2KMqDsR8h8YLQaC1Tjs4A/Iw8cp1r3xS+KHv9V2Nntd7aGeO/TZv1L9dF4PJ9d/vK/ Lr5Eztqtd7GlLdBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0C1FA13776; Mon, 22 May 2023 08:00:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Y0YVAikha2RKRgAAMHmgww (envelope-from ); Mon, 22 May 2023 08:00:41 +0000 Date: Mon, 22 May 2023 10:00:40 +0200 Message-ID: <87jzx0yevr.wl-tiwai@suse.de> From: Takashi Iwai To: Jaroslav Kysela Cc: alsa-devel@alsa-project.org Subject: Re: [PATCH 24/36] ALSA: seq: Add UMP support In-Reply-To: <643cd65f-74f3-97b8-f48a-6cb25772095d@perex.cz> References: <20230519093114.28813-1-tiwai@suse.de> <20230519093114.28813-25-tiwai@suse.de> <643cd65f-74f3-97b8-f48a-6cb25772095d@perex.cz> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: GEWMT42JBH2ALLPXMFEDUZJVAEEOK3U7 X-Message-ID-Hash: GEWMT42JBH2ALLPXMFEDUZJVAEEOK3U7 X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 22 May 2023 09:34:45 +0200, Jaroslav Kysela wrote: > > On 19. 05. 23 11:31, Takashi Iwai wrote: > > Starting from this commit, we add the basic support of UMP (Universal > > MIDI Packet) events on ALSA sequencer infrastructure. The biggest > > change here is that, for transferring UMP packets that are up to 128 > > bits, we extend the data payload of ALSA sequencer event record when > > the client is declared to support for the new UMP events. > > > > A new event flag bit, SNDRV_SEQ_EVENT_UMP, is defined and it shall be > > set for the UMP packet events that have the larger payload of 128 > > bits, defined as struct snd_seq_ump_event. > > > > For applications that want to access the UMP packets, first of all, a > > sequencer client has to declare the user-protocol to match with the > > latest one via the new SNDRV_SEQ_IOCTL_USER_PVERSION; otherwise it's > > treated as if a legacy client without UMP support. > > > > Then the client can switch to the new UMP mode (MIDI 1.0 or MIDI 2.0) > > with a new field, midi_version, in snd_seq_client_info. When switched > > to UMP mode (midi_version = 1 or 2), the client can write the UMP > > events with SNDRV_SEQ_EVENT_UMP flag. For reads, the alignment size > > is changed from snd_seq_event (28 bytes) to snd_seq_ump_event (32 > > bytes). When a UMP sequencer event is delivered to a legacy sequencer > > client, it's ignored or handled as an error. > > The internal struct snd_seq_event_cell is also extended by 4 bytes. I > think that it is worth to note this in this commit (the memory > footprint is slightly growing). Yes, will do that. But note that the size growth of snd_seq_event_cell happens only for 32bit archs (there was already padding on 64bit archs). > Maybe handle !SND_UMP here, but we can > wait, if someone really requires this optimization. Right, I began with that, but I threw it away in the end as it becomes unnecessarily complex. thanks, Takashi