Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3988004rwd; Tue, 23 May 2023 01:09:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UgXTUeVGwoMDUqREeudizvdvYV/w5k27YyHbL6bLYDywiql8k6pyUe3x/1xdLlQLODA2u X-Received: by 2002:a17:902:ea0f:b0:1a6:4a64:4d27 with SMTP id s15-20020a170902ea0f00b001a64a644d27mr16776457plg.40.1684829355815; Tue, 23 May 2023 01:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684829355; cv=none; d=google.com; s=arc-20160816; b=zmkBTMfH7HflAIyKh/Uhbs5ErZp+w9XmNhl7Fm1IM8obcJ7FRwEW6aghSGsYCF1UU5 7SSfUzw5x5TUsahf1lBumBjoCPApYhFPulNyllv+cg/xyqXz3pyEMPHs+qWPzfflBel9 6IOj6dLWDdkytPi4PwacM0AwavUqk7xiONPurcEx56lpYyAZ8wpi1pYtbb0FSi7HBqR1 NeS1ndy3a2ceoFiQ7zEXBi8skv/Q85yn9vaaunBpsSvB8nxuECNycByGfQ6kWZvrvaCL lE39C9944OnKvqYimQbOTtF6JxAXjcDjPjvSN1Vp4g5K8vMNWXfveqmuD7/HWc3K7tI4 BOfQ== 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=fHQrHilsIqjDo5H9WbGUCwqE2MfITTbQXGoxi+ShiBk=; b=xUmjqaD4iK4I7lA5G2Wfsh/iVQl5kew0XYsRBwg0LajqNYf+rIaGDJr6HTw2SJprqr Vux04SktspS02T8Z3keGHpVScrgo7y1rIQdgwa7ZJ3NGAezEdtVzs1QDCEKucc20ISm8 7hvirlEe8/EzMYmN1pALed2X7nrk4RgyLx0ngbc7Ln3bWqZG6+1UkAM1TgXgl8qQNFMm SIEOE3VgvwrlAc6Z/qspsERnJkJZ8SCD4u6veToZD3wZC+NImXqthrLFWlHUdMZwGNxl hbxD9xaRRYn9XQQSeBIFOn02pxRDNB+pHbUavWnkJUWBsczFizsVsmVwb6kUQGSjZi3R 0ukg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=oNNRfBQT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=J2iFqDWu; 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 j12-20020a170903024c00b001a64fba3382si821525plh.148.2023.05.23.01.09.03; Tue, 23 May 2023 01:09:15 -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=oNNRfBQT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=J2iFqDWu; 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 S236042AbjEWH5c (ORCPT + 99 others); Tue, 23 May 2023 03:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235705AbjEWH4j (ORCPT ); Tue, 23 May 2023 03:56:39 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1ACCE6A for ; Tue, 23 May 2023 00:55:36 -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 E51532041B; Tue, 23 May 2023 07:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684828452; 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=fHQrHilsIqjDo5H9WbGUCwqE2MfITTbQXGoxi+ShiBk=; b=oNNRfBQT3taA3ZwcuPQW/0mjshFULGlgmhc6kUnxcP8nnH5tPXrF/DB4aNRMlcOifEu9S1 7G3q00cEOGbbQHw9nLRq5ojJZG+q3Ye31sSq/++yc1uJ5ZuBO+T6tw2qQy3i4aCeYF15Xu //7rUUx0bJyePpwtbxVdUE5X7CltAWw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684828452; 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=fHQrHilsIqjDo5H9WbGUCwqE2MfITTbQXGoxi+ShiBk=; b=J2iFqDWuHzBL+wLK3QYiN/SFbj/S1l1zrT7vBaa0QmuU+J8kKwPwdBGsqrixTAy+cv+AyK 5fzyDyRPTjodJEAA== 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 965A513588; Tue, 23 May 2023 07:54:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WCEtIiRxbGT4KgAAMHmgww (envelope-from ); Tue, 23 May 2023 07:54:12 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 35/37] ALSA: seq: Print UMP Endpoint and Block information in proc outputs Date: Tue, 23 May 2023 09:53:56 +0200 Message-Id: <20230523075358.9672-36-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 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. Reviewed-by: Jaroslav Kysela 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..8cce8061ca55 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