Hi Ivaylo
Sorry for the late review.
We may have multiple links between ports, with each link(snip)
having different parameters. Currently, no matter the topology,
it is always port endpoint 0 that is used when setting parameters.
On a complex sound system, like the one found on Motorola droid4,
hifi and voice DAIs require differents formats (i2s vs dsp_a)
and curently it is impossible to use DT to set that.
Implementing the change leads to partially dropping of at least
0dedbde5062d (ASoC: cpcap: Implement set_tdm_slot for voice call
support), as core does most of what is needed to configure voice DAI.
We (on Maemo Leste ) use the patch (along with few others) to have
voice calls working properly on d4 through UCM.
The patch is for linux 6.6, I want to know whether the
approach would be accepted before sending a proper patch for
current master.
the original commit message follows:
When link parameters are parsed, it is always endpoint@0 that is used and
parameters set to other endpoints are ignored.
Fix that by using endpoint that is set in DT when parsing link parameters.
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@xxxxxxxxx>
---
@@ -684,7 +683,6 @@ int audio_graph2_link_dpcm(struct asoc_simple_priv *priv,
{
struct device_node *ep = port_to_endpoint(lnk);
struct device_node *rep = of_graph_get_remote_endpoint(ep);
- struct device_node *rport = of_graph_get_remote_port(ep);
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
int is_cpu = asoc_graph_is_ports0(lnk);
@@ -718,7 +716,7 @@ int audio_graph2_link_dpcm(struct asoc_simple_priv *priv,
dai_link->dynamic = 1;
dai_link->dpcm_merged_format = 1;
- ret = graph_parse_node(priv, GRAPH_DPCM, rport, li, 1);
+ ret = graph_parse_node(priv, GRAPH_DPCM, rep, li, 1);
Please correct me if I was misunderstanding
Is the main issue "remote" side endpoint ?
You want to parse "remote" endpoint (= rep) directly, but the function
requests "port" (= rport), and it will use endpoint0 ( != rep).
Is this the main issue you want to fix ?