Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2221373rwd; Fri, 19 May 2023 02:41:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jNN8ilzTes2aBuPXqPJpLlQMdS9329xKwEFZI9BQIcyj+nr8/XlQoilJX2wlOcrser3LK X-Received: by 2002:a17:902:a589:b0:1ab:797:afbe with SMTP id az9-20020a170902a58900b001ab0797afbemr1941769plb.8.1684489270304; Fri, 19 May 2023 02:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684489270; cv=none; d=google.com; s=arc-20160816; b=mnnp0u7PrkfK/T9tuCyzJmNvrGyfP3+PK9efxXzm8CTEkNN7B8RlHECyP+cZWTYmeB t6cxxiwiPMwepajwwuXPkTRa0GiwnsM1UmFNdntrgrv86ZbMXCzkSui0GPXI1tw6cGI1 DLZzv9LBsWLHZs458urMMsUI0Z79Xm07WiBgVIiZ6EsV1VwYms1JKPzphwZkYsGHPq8C YeWjM2IjwGRtcF0bMbStMv1smlOvVPu3iCZPPPTxEPWFeKab+27WrvGMgnfZY7xUvJK+ 4U3B1KUcgihVX0eaXyDFchGP6RgSMyt/IL8S8uJSNx6IdPqy0LWFROYAMOEE8Vgg82J7 WD7w== 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=Pka+FAS5v3W+sCEaoavXmDKAfyes9oP7et2fJmTgVyc=; b=N9jkUVVwVzVkR8UxIaJKminq2s6MMFCoyGbj+0X7xoUin9BN6MdwYL01fSynbska3Y 1LUdwD/tuQtDRrbQvlI8bdrxZob1coN1F6NtUHsGzTSDJ27Au2KNXNtCzwlzVLf9k+/4 HP1UvgRi0NxOP9QE06r86+bMTIpLu57hr7zPYj3qCIlCDWidP4OWeTS3ADQZDQkQ7t3+ boeczcQPwwzLinbUCmcGStnaPgsXb1+vM8FNZ07iqki/RvkYH6ijPEIdTVE0OpPoWUWR G1kWu3NFLZyKRd3diHrgRayUQPU7oRMiaBN4JZ2jZBTEMjR1SrJovEYlwEcY5efb1gOs 1hmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RJw3i3ng; dkim=neutral (no key) header.i=@suse.de header.b=htgSCeil; 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 g1-20020a1709026b4100b001a922d1f4c7si3194938plt.60.2023.05.19.02.40.57; Fri, 19 May 2023 02:41:10 -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=RJw3i3ng; dkim=neutral (no key) header.i=@suse.de header.b=htgSCeil; 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 S231791AbjESJdb (ORCPT + 99 others); Fri, 19 May 2023 05:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231691AbjESJcs (ORCPT ); Fri, 19 May 2023 05:32:48 -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 32D431BD0 for ; Fri, 19 May 2023 02:31:52 -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 9C53022245; Fri, 19 May 2023 09:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684488710; 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=Pka+FAS5v3W+sCEaoavXmDKAfyes9oP7et2fJmTgVyc=; b=RJw3i3nguYq2ZWpS1a5C1XLsaXuWtqdYpWc9U4G2H/6TxhBoSRADqejNRNEEULbDJ0Mhq4 vX7TFX5PkyOmKQpcdcDn9+kbLmw3xjptVGUj2NKf4jk7tlpb4QWJdUjt33BLfV2yxp2Lwe sKDlE/V1ZXBhRUbizM1gnjJKszbh8KU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684488710; 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=Pka+FAS5v3W+sCEaoavXmDKAfyes9oP7et2fJmTgVyc=; b=htgSCeil8q+1iKaIdmhTa1K3nSNajUXJt+t9dGcAO8NyU7Ri5S7sz17YqY8FebLJn5J3gV oTJzsRZcfXqTlOCw== 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 71CCD13A12; Fri, 19 May 2023 09:31:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +E3wGQZCZ2RXJAAAMHmgww (envelope-from ); Fri, 19 May 2023 09:31:50 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 34/36] ALSA: seq: Print UMP Endpoint and Block information in proc outputs Date: Fri, 19 May 2023 11:31:12 +0200 Message-Id: <20230519093114.28813-35-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 This patch enhances the /proc/asound/seq/clients output to show a few more information about the assigned UMP Endpoint and Blocks. The "Groups" are shown in 1-based group number to align with the sequencer client name and port number. Signed-off-by: Takashi Iwai --- sound/core/seq/seq_clientmgr.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 03ca78ea2cce..8f416f5d0b4d 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -2120,6 +2120,33 @@ static void terminate_ump_info_strings(void *p, int type) } } +#ifdef CONFIG_SND_PROC_FS +static void dump_ump_info(struct snd_info_buffer *buffer, + struct snd_seq_client *client) +{ + struct snd_ump_endpoint_info *ep; + struct snd_ump_block_info *bp; + int i; + + if (!client->ump_info) + return; + ep = client->ump_info[SNDRV_SEQ_CLIENT_UMP_INFO_ENDPOINT]; + if (ep && ep->name) + snd_iprintf(buffer, " UMP Endpoint: \"%s\"\n", ep->name); + for (i = 0; i < SNDRV_UMP_MAX_BLOCKS; i++) { + bp = client->ump_info[i + 1]; + if (bp && bp->name) { + snd_iprintf(buffer, " UMP Block %d: \"%s\" [%s]\n", + i, bp->name, + bp->active ? "Active" : "Inactive"); + snd_iprintf(buffer, " Groups: %d-%d\n", + bp->first_group + 1, + bp->first_group + bp->num_groups); + } + } +} +#endif + /* UMP-specific ioctls -- called directly without data copy */ static int snd_seq_ioctl_client_ump_info(struct snd_seq_client *caller, unsigned int cmd, @@ -2654,6 +2681,9 @@ void snd_seq_info_clients_read(struct snd_info_entry *entry, c, client->name, client->type == USER_CLIENT ? "User" : "Kernel", midi_version_string(client->midi_version)); +#if IS_ENABLED(CONFIG_SND_SEQ_UMP) + dump_ump_info(buffer, client); +#endif snd_seq_info_dump_ports(buffer, client); if (snd_seq_write_pool_allocated(client)) { snd_iprintf(buffer, " Output pool :\n"); -- 2.35.3