ASoc: SOF: topology: connect DAI to a single DAI link#5309
ASoc: SOF: topology: connect DAI to a single DAI link#5309ranj063 merged 1 commit intothesofproject:topic/sof-devfrom
Conversation
|
@ranj063 @bardliao Not 100% about the fix, but given "dai->name = rtd->dai_link->name;" is a single field, it seem unintentional the loop over all DAI links and set the dai name to last matching DAI link. One alternative would be to break out only if the stream name is an exact match (not partial), but in the end, I didn't see the benefit of continuing to search for matches. |
This relies on the fact that the DAI links are created in the ascending order of the port numbers. But I guess it's reasonable to assume that. I think this issue is specific to nocodec anyway. |
ujfalusi
left a comment
There was a problem hiding this comment.
We need a CI run on this
4992360 to
09c2646
Compare
sound/soc/sof/topology.c
Outdated
| full = rtd; | ||
| break; | ||
| } | ||
| else if (strstr(rtd->dai_link->stream_name, w->sname)) { |
There was a problem hiding this comment.
this looks much better @kv2019i but just a minor nit, this else can go in the previous line.
The partial matching of DAI widget to link names, can cause problems if one of the widget names is a substring of another. E.g. with names "Foo1" and Foo10", it's not possible to correctly link up "Foo1". Modify the logic so that if multiple DAI links match the widget stream name, prioritize a full match if one is found. Fixes: fe88788 ("ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget") Link: thesofproject#5308 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
09c2646 to
32050e6
Compare
Due to partial matching, DAI stream name may match to multiple DAI links. Break out when a match is found as only a single link can be connected to a SOF DAI object.
Fixes: fe88788 ("ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget")
Link: #5308