Skip to content

Commit aa7727e

Browse files
author
Chao Song
committed
tplgtool.py: make string comparison in lower case
Topology1 uses upper case strings for PCM and widget names, while topology2 uses lower case, align string comparison to use lower case to make it work for both topology1 and topology2. Signed-off-by: Chao Song <chao.song@linux.intel.com>
1 parent c7eb27c commit aa7727e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/tplgtool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,12 +749,12 @@ def comp_in_list(comp, comp_list):
749749
TplgFormatter.recursive_search_comp(elem, comp_type, comp_list, direction)
750750

751751
if type(node) != list and direction == "forward":
752-
if node["widget"]["name"].startswith(comp_type):
752+
if node["widget"]["name"].lower().startswith(comp_type):
753753
if not comp_in_list(node, comp_list): comp_list.append(node["widget"])
754754
TplgFormatter.recursive_search_comp(node["sink"], comp_type, comp_list, direction)
755755

756756
if type(node) != list and direction == "backward":
757-
if node["widget"]["name"].startswith(comp_type):
757+
if node["widget"]["name"].lower().startswith(comp_type):
758758
if not comp_in_list(node, comp_list): comp_list.append(node["widget"])
759759
TplgFormatter.recursive_search_comp(node["source"], comp_type, comp_list, direction)
760760

@@ -763,7 +763,7 @@ def comp_in_list(comp, comp_list):
763763
def find_connected_comp(ref_node, comp_type):
764764
if ref_node is None:
765765
return None
766-
comp_type = comp_type.upper() # to upper case
766+
comp_type = comp_type.lower()
767767
comp_list = []
768768
node = ref_node
769769
TplgFormatter.recursive_search_comp(node, comp_type, comp_list, "forward")

0 commit comments

Comments
 (0)