Skip to content

Commit 8310ea0

Browse files
committed
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 <peter.ujfalusi@linux.intel.com>
1 parent 29377c4 commit 8310ea0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/tplgtool2.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,11 @@ def print_pcm_info(self):
738738
rate_max = cap["rate_max"]
739739
ch_min = cap["channels_min"]
740740
ch_max = cap["channels_max"]
741-
print(f"pcm_id={pcm_id:>2};name={name.ljust(max_name_len, ' ')};type={pcm_type:<8};"
741+
if pcm["compress"] == 1:
742+
dev_type = "compr_id"
743+
else:
744+
dev_type = "pcm_id "
745+
print(f"{dev_type}={pcm_id:>2};name={name.ljust(max_name_len, ' ')};type={pcm_type:<8};"
742746
f"rate_min={rate_min:>6};rate_max={rate_max:>6};ch_min={ch_min};ch_max={ch_max};"
743747
f"fmts={fmts}")
744748

0 commit comments

Comments
 (0)