Thread (1 message) 1 message, 1 author, 2013-02-20

Re: [PATCH 1/4 v6] ASoC: add .of_xlate_dai_name callback on struct snd_soc_dai_driver

From: Kuninori Morimoto <hidden>
Date: 2013-02-20 00:52:53
Also in: alsa-devel

Hi Stephen

Thank you for checking patch
quoted
+	if (dai->id != args->args[0])
+		return NULL;
This rather assumes that drivers with multiple DAIs will order the list
of DAIs passed to snd_soc_register_dais() in the same order as the
numbering in their device tree binding document. That seems a little
optimistic.

The whole reason for adding an .of_xlate_dai_name function to the DAI
driver was to allow drivers to implement their own translation without
any dependency on ASoC internals, orders of lists of DAIs registered
with ASoC, etc.
Ahh.. I see
Thank you for pointing it.
quoted
+		if (dai->dev->of_node != args.np)
+			continue;
+
+		if (dai->driver->of_xlate_dai_name) {
+			name = dai->driver->of_xlate_dai_name(dai, &args);
+			if (name)
+				return name;
This probably also wants to return an integer to differentiate between
e.g. "invalid value" and "no driver found yet".
I see, will fix it.


Best regards
---
Kuninori Morimoto
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help