Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3990095rwd; Tue, 23 May 2023 01:11:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79dbl5V/YyUaWdOprcYV0LxBXaxUs9VLXP94phlKq3xEPHxkV/ZH0/+BuzNOsyWFAnRqlv X-Received: by 2002:a17:903:24d:b0:1ae:2f3f:881b with SMTP id j13-20020a170903024d00b001ae2f3f881bmr16572715plh.10.1684829479467; Tue, 23 May 2023 01:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684829479; cv=none; d=google.com; s=arc-20160816; b=A8Hfm5XN+Q/Bx5runt0aNJtgsO9H7pBv71iaaBMJA2HRAeRtF26FkkLsfSP4/F+AeO L154Bn9ct9zU8B5/T8DqrMhfeKliED8oEetdcCoHsvzVreqfTGKJfE51p7e+PgVmMV/+ nyDetCwsYNqRQmIQYBBw3dSO9avRa9k7AEHInWhVsWh+/mpW4q44ch3vm+GAC/lcHliY OJaTRW5IGhbd858zBJVNI75JVsnXBusyUI7v+4B2N0pNBzl4uFaJMkREzS1CkemQYVIL Eu35UujQJeTNNpcz+Q9FaiuFRWftdKP8nTGQjcittUvJ8t7YYtXJ8rPKWbjWu07Zh7OS ZSVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Sa3pwc1C5HhGxbLR03Hm6eyUQzwJ+yyOfNOAHUZ83fg=; b=w2F8LYmF8zJ2h+U/p0AT0Q04blWgrLu8II3l+ao4azY9df2V4KOstZ0MZffxfkYWow oaUGe9x+AJPPjmlJVzFS9HvWVg+8XPaj1AXZtj+ixq4oi/3p3wweZI9aHzGEDxFtIikM 56lENNbJkFO2cK+PVh4OOYQuGkX3oHJ+2ParZnNYvWz+/V8aPso6p1zcvU6HRzAPYWfg 6EmgUkPWY4MMr9jAWcdJy+5517mndYaAX5hnwdwtgmo1CIN3whAgHYD/KN4zKtpvF2/f 0M0iRQUdsVZgWDxZaMZwdHelnmK1jPHzlVJpy6Wm2SrblpDJuvmkd1GUuYqprtZIt42n sQng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="y1cY/y9B"; dkim=neutral (no key) header.i=@suse.de header.b=f4gFMx00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a170902788500b001a96c3b93besi5963531pll.68.2023.05.23.01.11.06; Tue, 23 May 2023 01:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="y1cY/y9B"; dkim=neutral (no key) header.i=@suse.de header.b=f4gFMx00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235994AbjEWH4z (ORCPT + 99 others); Tue, 23 May 2023 03:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235865AbjEWHzy (ORCPT ); Tue, 23 May 2023 03:55:54 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF4FB1B4 for ; Tue, 23 May 2023 00:55:16 -0700 (PDT) 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 30F8921A67; Tue, 23 May 2023 07:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684828451; 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: in-reply-to:in-reply-to:references:references; bh=Sa3pwc1C5HhGxbLR03Hm6eyUQzwJ+yyOfNOAHUZ83fg=; b=y1cY/y9BBnkXdpqA9huOH9Pk87lfjP2H1VdxMtHiahqPP3DdE2zkn43/JVpxy4UIRZgFxJ G4HgsF9r9jHl6oSeTvNWd6BTeyPwFowKWPrgM2v59cCdylobh6mtWJgK1UoJBG9zdCmRz3 jMtoVOsGNZjsPQROogmcLfS6+FlbHLU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684828451; 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: in-reply-to:in-reply-to:references:references; bh=Sa3pwc1C5HhGxbLR03Hm6eyUQzwJ+yyOfNOAHUZ83fg=; b=f4gFMx00Sm+Md8jzCk7Ggm5hQtj3eNjq6UkQcF5hJ2hy7VNTa5zXernYeQ9HfssNmiJUGl hYc7kWT8RYOOQkDw== 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 E3F3C13588; Tue, 23 May 2023 07:54:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SFO7NSJxbGT4KgAAMHmgww (envelope-from ); Tue, 23 May 2023 07:54:10 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 29/37] ALSA: seq: Add UMP group number to snd_seq_port_info Date: Tue, 23 May 2023 09:53:50 +0200 Message-Id: <20230523075358.9672-30-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230523075358.9672-1-tiwai@suse.de> References: <20230523075358.9672-1-tiwai@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add yet more new filed "ump_group" to snd_seq_port_info for specifying the associated UMP Group number for each sequencer port. This will be referred in the upcoming automatic UMP conversion in sequencer core. Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- include/uapi/sound/asequencer.h | 3 ++- sound/core/seq/seq_ports.c | 9 +++++++-- sound/core/seq/seq_ports.h | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h index eae1e0b0bf37..2470eaa5edc5 100644 --- a/include/uapi/sound/asequencer.h +++ b/include/uapi/sound/asequencer.h @@ -478,7 +478,8 @@ struct snd_seq_port_info { unsigned int flags; /* misc. conditioning */ unsigned char time_queue; /* queue # for timestamping */ unsigned char direction; /* port usage direction (r/w/bidir) */ - char reserved[58]; /* for future use */ + unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group number */ + char reserved[57]; /* for future use */ }; diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index 5574341f49eb..9b80f8275026 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -356,8 +356,12 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port, port->time_real = (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0; port->time_queue = info->time_queue; - /* direction */ + /* UMP direction and group */ port->direction = info->direction; + port->ump_group = info->ump_group; + if (port->ump_group > SNDRV_UMP_MAX_GROUPS) + port->ump_group = 0; + /* fill default port direction */ if (!port->direction) { if (info->capability & SNDRV_SEQ_PORT_CAP_READ) @@ -403,8 +407,9 @@ int snd_seq_get_port_info(struct snd_seq_client_port * port, info->time_queue = port->time_queue; } - /* direction */ + /* UMP direction and group */ info->direction = port->direction; + info->ump_group = port->ump_group; return 0; } diff --git a/sound/core/seq/seq_ports.h b/sound/core/seq/seq_ports.h index dce733ab2398..c6c138edceab 100644 --- a/sound/core/seq/seq_ports.h +++ b/sound/core/seq/seq_ports.h @@ -72,8 +72,9 @@ struct snd_seq_client_port { int midi_voices; int synth_voices; - /* direction */ + /* UMP direction and group */ unsigned char direction; + unsigned char ump_group; }; struct snd_seq_client; -- 2.35.3