From c568e33847469f41e3bc8cd6c163297b4fce01a3 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 28 Nov 2025 12:53:22 +0200 Subject: [PATCH] tools: tplgtool2.py: Differentiate PCM and COMPR devices in pcm list At the moment there is no information available about the type of the device (PCM or compr) in the pcm list. Use the compress parameter of the PCM to differentiate the two types of devices. Signed-off-by: Peter Ujfalusi --- tools/tplgtool2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/tplgtool2.py b/tools/tplgtool2.py index 0adfb998..e592f72a 100755 --- a/tools/tplgtool2.py +++ b/tools/tplgtool2.py @@ -738,7 +738,11 @@ def print_pcm_info(self): rate_max = cap["rate_max"] ch_min = cap["channels_min"] ch_max = cap["channels_max"] - print(f"pcm_id={pcm_id:>2};name={name.ljust(max_name_len, ' ')};type={pcm_type:<8};" + if pcm["compress"] == 1: + dev_type = "compr_id" + else: + dev_type = "pcm_id " + print(f"{dev_type}={pcm_id:>2};name={name.ljust(max_name_len, ' ')};type={pcm_type:<8};" f"rate_min={rate_min:>6};rate_max={rate_max:>6};ch_min={ch_min};ch_max={ch_max};" f"fmts={fmts}")