Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp872507lqt; Fri, 7 Jun 2024 00:42:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSFYGPYx3o1U7KDyLDPGjAY1C1VK/RSjxMzCwIPoHqn9Hq2ryzfD8+X/kPePUgyAyPIJVMuATSrt/iUzzjPuiOlZEhWjna9/ew23iTpQ== X-Google-Smtp-Source: AGHT+IFTA47kwLImnvVDK/9d9lnm3S3W8MogsvD707CEfK+eO5s7Izci2/5yDWrVkNqZM9ZWAEnd X-Received: by 2002:a25:c750:0:b0:dfa:fcdd:6cfc with SMTP id 3f1490d57ef6-dfafcdd74famr893000276.22.1717746172374; Fri, 07 Jun 2024 00:42:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717746172; cv=pass; d=google.com; s=arc-20160816; b=YJ+m/lyxrQQEwBVttQkgqXp1poikFZXFo4xPQ3xTukhGK3zW8CONSOPvvdvEqwcPJ1 Lszcuz1yHd32x79mQETQxvyuccg+7u72I3TEw1l4CblOqU++6XWjp2mxUew2ZRyCwGis PeWl+uSYTfxUN4dCBu7OlaTNOsqX8T8SU41HUOilJnIdQ6cVCQNE8eZZ6hmmNTUWHz/D X3im4A2JzL4wLEcGJXqzTeqifhBiSkyeJ6ik8mtyiQGmXyMZHSO9NKR/aun8u1OhB+kl mXq+TMKFy94ha8fc2aMdkDDOG/T8/aVV/JCAj5HLZkoFjcyY+Sd5NxEPEnjXw0Mwlns3 YFhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=7KUdMPyYR+5v/qbEBCxK1PceiwD8jwTiahptQXtojpk=; fh=0zzNuS9+V471bHjI+XmEZBtLdHtzjlrXBfz3KPI8N3A=; b=zRI0xPT/mloY/bZTbJtHppi21GTHrEqYzVLO07KseKnsU1oO4c+GiPN3at7+DgpA7l NeiCSC0Vt8r2n/z+muYxYY7zv7NdYPoD6ikpUlZSnNDs7BLYJAOxNTQcPMGTScWXi/gq YVD/87BngtcsmZNrxqN+zcyjfNQvHPjb8TUchDUErr4M1PPLjlCfrMuFdymWYjWjSY14 mlhV80TCzt9fPuPxAR0rnoGE1wCmYDS/R1e7NiH09Rwz5NWBjLuQbWiG/Y3MCLg9S0xt T57pi4KUAkQHt+AyM8iTFpb0Yj5GhjzZ46T6IVfQiR5lCMTf9CI029MWb0ErMLzM4Vop Po+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=B2JjAFj9; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-205553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04f9fdac3si20291026d6.430.2024.06.07.00.42.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 00:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=B2JjAFj9; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-205553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1A5301C221C6 for ; Fri, 7 Jun 2024 07:42:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C54D3157A48; Fri, 7 Jun 2024 07:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="B2JjAFj9" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFCF3156985; Fri, 7 Jun 2024 07:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717746146; cv=none; b=u8Etf6pojYiAWUxmnmi0mqh72+/lhCc+oyVYpi3zRHxe0LmJ/H4YdCI+BioKIl09nZiI+NjiP2Xciapuem6M04ERuuz4mUkaTSDoW0npFcfopk9D/SbL2pMNvtIpXTM/bxNlpw+kqgkPBrl6zLAPDikraI8jOjxonKuwdFfcAOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717746146; c=relaxed/simple; bh=1khzek1mpOyskhV/WZJAoR8W6Qt/xyLFvHy3BHVUR0U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=U2rYteKKrHr/4zwYprpHThwVG6v/LQL0JxQZYTxl/qEnX7Vp8TAme5j14KQNPvtWBSr0NO6uLngdR9KRwYUjjgdl/Ro6T5OZ3oQt/fZkpUUJ/Upi2IaQLHsaHH+XNMF6iq3IkFx25adp2TD/4nQ4r/EHv0fQ5viuSAyiyuW6Ouc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=B2JjAFj9; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 8717260004; Fri, 7 Jun 2024 07:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717746135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7KUdMPyYR+5v/qbEBCxK1PceiwD8jwTiahptQXtojpk=; b=B2JjAFj9CoeN0CWOb2n9PHWt6MmdcWkgMWEfv8w/G+ipd/tOm0sSvctSuRV3HYBV1Hhm6q +Pt0mecagM4T7L+J450fXAQ2IH0iosTdL+kscRHlu+gGeY8SHLwobF4/w+9eNVwinjcnTd zp5hV9xlv0kboXXbBmePOJLcMyz++Jpuk96vK9NLKcIrcR37GzkIZL+n5tyEpp42RgBzgp IAifIVNQwMoV9fXxZzV3i6eyzJdsSdbFdrK8d2zZI7HkLS/N8MePAXqYK+ylV0mcQLPvrw 1kE/zkniWPuTH3Vgc1Ox/mZIQRQnIBqLjgHg1w0GYr56hTv+4mDUTunNHIu/fA== From: Luca Ceresoli Date: Fri, 07 Jun 2024 09:41:51 +0200 Subject: [PATCH 1/3] ASoC: dapm-graph: remove the "ROOT" cluster Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240607-dapm-graph-v1-1-bb302970d055@bootlin.com> References: <20240607-dapm-graph-v1-0-bb302970d055@bootlin.com> In-Reply-To: <20240607-dapm-graph-v1-0-bb302970d055@bootlin.com> To: Alexandre Belloni , Thomas Petazzoni , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.13.0 X-GND-Sasl: luca.ceresoli@bootlin.com Widgets not belonging to any component are currently represented inside a cluster labeled "ROOT". This is not a correct representation of the actual structure, as these widgets are not necessarily related to each other as the ones inside actual components are. Improve the graphical representation by not adding a cluster around these widgets. Now a dot cluster represents a card component faithfully. This will be particularly important with the upcoming improvements which will visualize the component bias_level. Signed-off-by: Luca Ceresoli --- tools/sound/dapm-graph | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/sound/dapm-graph b/tools/sound/dapm-graph index 57d78f6df041..205783d124d3 100755 --- a/tools/sound/dapm-graph +++ b/tools/sound/dapm-graph @@ -150,29 +150,32 @@ process_dapm_widget() # # $1 = temporary work dir # $2 = component directory -# $3 = forced component name (extracted for path if empty) +# $3 = "ROOT" for the root card directory, empty otherwise process_dapm_component() { local tmp_dir="${1}" local c_dir="${2}" local c_name="${3}" + local is_component=0 local dot_file="${tmp_dir}/main.dot" local links_file="${tmp_dir}/links.dot" if [ -z "${c_name}" ]; then + is_component=1 + # Extract directory name into component name: # "./cs42l51.0-004a/dapm" -> "cs42l51.0-004a" c_name="$(basename $(dirname "${c_dir}"))" + + echo "" >> "${dot_file}" + echo " subgraph \"${c_name}\" {" >> "${dot_file}" + echo " cluster = true" >> "${dot_file}" + echo " label = \"${c_name}\"" >> "${dot_file}" + echo " color=dodgerblue" >> "${dot_file}" fi dbg_echo " * Component: ${c_name}" - echo "" >> "${dot_file}" - echo " subgraph \"${c_name}\" {" >> "${dot_file}" - echo " cluster = true" >> "${dot_file}" - echo " label = \"${c_name}\"" >> "${dot_file}" - echo " color=dodgerblue" >> "${dot_file}" - # Create empty file to ensure it will exist in all cases >"${links_file}" @@ -181,7 +184,9 @@ process_dapm_component() process_dapm_widget "${tmp_dir}" "${c_name}" "${w_file}" done - echo " }" >> "${dot_file}" + if [ ${is_component} = 1 ]; then + echo " }" >> "${dot_file}" + fi cat "${links_file}" >> "${dot_file}" } -- 2.34.1