Re: [PATCH] ASoC: audio-graph-card2: use correct endpoint when getting link parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Morimoto-san,

On 21.01.25 г. 1:35 ч., Kuninori Morimoto wrote:

Hi Ivaylo

Thank you for the patch

When link DT nodes are parsed, most functions get port as a parameter,
which results in port endpoint@0 always being used. However, each endpoint
might have different settings, but those are currently ignored.

Fix that by passing endpoint instead of port when parsing link parameters.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@xxxxxxxxx>
---
(snip)
@@ -831,9 +830,8 @@ int audio_graph2_link_normal(struct simple_util_priv *priv,
  			     struct device_node *lnk,
  			     struct link_info *li)
  {
-	struct device_node *cpu_port = lnk;
-	struct device_node *cpu_ep	__free(device_node) = of_graph_get_next_port_endpoint(cpu_port, NULL);
-	struct device_node *codec_port	__free(device_node) = of_graph_get_remote_port(cpu_ep);
+	struct device_node *cpu_ep __free(device_node) = of_graph_get_next_port_endpoint(lnk, NULL);
+	struct device_node *codec_ep __free(device_node) = of_graph_get_remote_endpoint(cpu_ep);
  	int ret;

You don't need to change cpu_port/cpu_ep here ?
And, I would like to keep "cpu_port = lnk" here.


cpu_port will be used on the next line only, but ok, will send v2 with the above changes.

Thanks,
Ivo

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

Thank you for your help !!

Best regards
---
Kuninori Morimoto




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux