From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Luca Ceresoli <luca.ceresoli@bootlin.com>
Subject: [PATCH 3/3] ASoC: dapm-graph: show path name for non-static routes
Date: Fri, 07 Jun 2024 09:41:53 +0200 [thread overview]
Message-ID: <20240607-dapm-graph-v1-3-bb302970d055@bootlin.com> (raw)
In-Reply-To: <20240607-dapm-graph-v1-0-bb302970d055@bootlin.com>
Many routes are just static, not modifiable at runtime. Show the route name
for all the other routes as an edge label in the generated graph.
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
tools/sound/dapm-graph | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/sound/dapm-graph b/tools/sound/dapm-graph
index 4e90883912d0..f14bdfedee8f 100755
--- a/tools/sound/dapm-graph
+++ b/tools/sound/dapm-graph
@@ -134,11 +134,17 @@ process_dapm_widget()
# Collect any links. We could use "in" links or "out" links,
# let's use "in" links
if echo "${line}" | grep -q '^in '; then
+ local w_route=$(echo "$line" | awk -F\" '{print $2}')
local w_src=$(echo "$line" |
awk -F\" '{print $6 "_" $4}' |
sed 's/^(null)_/ROOT_/')
dbg_echo " - Input route from: ${w_src}"
- echo " \"${w_src}\" -> \"$w_tag\"" >> "${links_file}"
+ dbg_echo " - Route: ${w_route}"
+ local w_edge_attrs=""
+ if [ "${w_route}" != "static" ]; then
+ w_edge_attrs=" [label=\"${w_route}\"]"
+ fi
+ echo " \"${w_src}\" -> \"$w_tag\"${w_edge_attrs}" >> "${links_file}"
fi
done
@@ -220,7 +226,7 @@ process_dapm_tree()
echo "digraph G {" > "${dot_file}"
echo " fontname=\"sans-serif\"" >> "${dot_file}"
echo " node [fontname=\"sans-serif\"]" >> "${dot_file}"
-
+ echo " edge [fontname=\"sans-serif\"]" >> "${dot_file}"
# Process root directory (no component)
process_dapm_component "${tmp_dir}" "${dapm_dir}/dapm" "ROOT"
--
2.34.1
next prev parent reply other threads:[~2024-06-07 7:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 7:41 [PATCH 0/3] ASoC: dapm-graph: add component on/off and route names to graph Luca Ceresoli
2024-06-07 7:41 ` [PATCH 1/3] ASoC: dapm-graph: remove the "ROOT" cluster Luca Ceresoli
2024-06-07 7:41 ` [PATCH 2/3] ASoC: dapm-graph: visualize component On/Off bias level Luca Ceresoli
2024-06-07 7:41 ` Luca Ceresoli [this message]
2024-08-20 16:44 ` [PATCH 0/3] ASoC: dapm-graph: add component on/off and route names to graph Luca Ceresoli
2024-08-20 17:04 ` Mark Brown
2024-08-21 8:17 ` Luca Ceresoli
2024-08-21 12:56 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240607-dapm-graph-v1-3-bb302970d055@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox