[PATCH 3/4 v6] ASoC: fsi: enable .of_xlate_dai_name on struct snd_soc_dai_driver

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Feb 20 12:04:59 EST 2013


Hi Stephen

> Hmm. I think that the .of_xlate_dai_name should be something related to
> the object (e.g. CODEC) that contains the DAIs, rather than the DAIs
> themselves. The intent is to ask some object (e.g. CODEC) which of its
> DAIs is represented by the DT DAI specifier, not to ask each DAI whether
> it is represented by that particular DT DAI specifier.
> 
> Aside from that, I'd expect the patch above to be something more like:
> 
> const char *fsi_xlate_dai_name(struct snd_soc_dai *dai,
> 				const struct of_phandle_args *args)
> {
> 	switch (args[0]) {
> 	case 0:
> 		return fsi_soc_dai[0].name;
> 	case 1:
> 		return fsi_soc_dai[1].name;
> 	default:
> 		return NULL;
> 	}
> }

Thank you for pointing it.
I use this style in next patch.

Best regards
---
Kuninori Morimoto


More information about the devicetree-discuss mailing list