Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2218812rwd; Fri, 19 May 2023 02:38:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ730e2OQ9nofr9QDPk/1lkZgFHCjdvx9YCVcLlb45Dz1RUmYeIl7yW/WyxW/NQQ+uZyF8U4 X-Received: by 2002:a05:6a00:2e1a:b0:63d:641f:5048 with SMTP id fc26-20020a056a002e1a00b0063d641f5048mr2659319pfb.16.1684489111984; Fri, 19 May 2023 02:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684489111; cv=none; d=google.com; s=arc-20160816; b=aRbR98mVK7bT2pjwp3Xgwi24Ayid8CCpeGr4XNxZWdZCuf2FrI6CGfJerqrUjgsVXx 4hEhyd7gWetI3QMLPklZDN/cfb7cNcwgP8PZD/rrzhuwahBF1dg2wxD/HU88nAsOlXxw 7h5bfW3rMwIHPGbK8y/b32VySUuVjYG3HLoLL9aHaHHkea3EEw9gU7flDfajiD9HhwWs TmNq/1nTkQ7Jp5z/cGVzHhuwAXZKYsd9WzduaRLkzXeKCEQkIkTLZaBi7B+wSyVUOKXr Is8g8TW+N7ZV4BDlv6X9uuJdFRnSLlGDYobUK3vzH/0pjKwN+DEHRCS0JfsR4b0tUYql fzeQ== 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=l1TEiSv0o3bNfukbYFt8AXhybPoVqwjpcYPyqBGQTlU=; b=0pFP/NqW1WtSSlxcX2F/AZcICj7LTQdbsmN23e13mYtKjPn0scJPOB/L7GE9v8H96D KrlorNKBgtNur6teu4JuDO1GX7VHU0CyPqVrjnpRXjhlEMbnbfLlpkbucdKIKKjxjhkC y7sMhPSjkJsH+VBSYsxyjKz7mjE28N4eTv7x3PpxaGyef/3YGWW0Xhxtcj5VXokR0Njr kdwnXd6VmqxRBqfxrUmHZ3Pg9CQlx74Y0tUleuvzTRuy9YNQbQg0lFv83kI8SgikdnVc m/23W2xwuDo/UdJbXJfqHcV9tBUqvFc/4+Qh90F8hmj71MpdeQWD5bQ+dg2Sh4w+YaXz F8Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=t7lu+feE; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=SiGNHPyo; 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 y18-20020aa78f32000000b0064d2c1fb45dsi2042208pfr.154.2023.05.19.02.38.20; Fri, 19 May 2023 02:38:31 -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=t7lu+feE; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=SiGNHPyo; 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 S229769AbjESJdQ (ORCPT + 99 others); Fri, 19 May 2023 05:33:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjESJck (ORCPT ); Fri, 19 May 2023 05:32:40 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A101199A for ; Fri, 19 May 2023 02:31:48 -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-out2.suse.de (Postfix) with ESMTPS id A0F6E1FE4B; Fri, 19 May 2023 09:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684488706; 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=l1TEiSv0o3bNfukbYFt8AXhybPoVqwjpcYPyqBGQTlU=; b=t7lu+feEt5qu08v1HxYzhYtAgR26S8XfPKpBY9i2AbGehY1sFLM7RRq20VG586tX+M7K6U 0dw6GDIbF3s1QmD1tt8+3FsAB4BVK8ykc9ETxp99WiA2/7qXhxZxXm9/oSydnzibrd+ria 3nC8iJwCLZm+CwXBzK6KEaJZDlxo15Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684488706; 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=l1TEiSv0o3bNfukbYFt8AXhybPoVqwjpcYPyqBGQTlU=; b=SiGNHPyoOJ4hegNpZQlBYziB2Db4EVTTfePySayMLHwHBrrnYtWgot+/fUzKsQ/R6Np+Jg UweSkC+GMZiO1ZAg== 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 7FC6E13A12; Fri, 19 May 2023 09:31:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6CDZHQJCZ2RXJAAAMHmgww (envelope-from ); Fri, 19 May 2023 09:31:46 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 28/36] ALSA: seq: Add UMP group number to snd_seq_port_info Date: Fri, 19 May 2023 11:31:06 +0200 Message-Id: <20230519093114.28813-29-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230519093114.28813-1-tiwai@suse.de> References: <20230519093114.28813-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. 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 3734e6352f5e..6926e14055f3 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -357,8 +357,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) @@ -404,8 +408,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