Re: [PATCH v2] ASoC: simple-card-utils: fix graph_util_is_ports0() for DT overlays

From: Kuninori Morimoto

Date: Mon Mar 09 2026 - 19:15:42 EST



Hi Sen

> graph_util_is_ports0() identifies DPCM front-end (ports@0) vs back-end
> (ports@1) by calling of_get_child_by_name() to find the first "ports"
> child and comparing pointers. This relies on child iteration order
> matching DTS source order.
>
> When the DPCM topology comes from a DT overlay, __of_attach_node()
> inserts new children at the head of the sibling list, reversing the
> order. of_get_child_by_name() then returns ports@1 instead of ports@0,
> causing all front-end links to be classified as back-ends. The card
> registers with no PCM devices.
>
> Fix this by matching the unit address directly from the node name
> instead of relying on sibling order.
>
> Fixes: 92939252458f ("ASoC: simple-card-utils: add asoc_graph_is_ports0()")
> Signed-off-by: Sen Wang <sen@xxxxxx>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>


Thank you for your help !!

Best regards
---
Kuninori Morimoto