[alsa-devel] [PATCH v4 6/9] ASoC: add snd_soc_get_dai_id()
Rob Herring
robh+dt at kernel.org
Fri Apr 7 21:16:54 CEST 2017
On Mon, Mar 20, 2017 at 8:59 PM, Kuninori Morimoto
<kuninori.morimoto.gx at renesas.com> wrote:
>
> Hi Rob
>
> Thank you for your review
>
>> > +{
>> > + struct device_node *node;
>> > + struct device_node *endpoint;
>> > + int i, id;
>> > +
>> > + node = of_graph_get_port_parent(ep);
>> > +
>> > + i = 0;
>> > + id = -1;
>> > + for_each_endpoint_of_node(node, endpoint) {
>> > + if (endpoint == ep)
>> > + id = i;
>>
>> I don't see how this works when you have 1 DAI controller with
>> multiple endpoints versus multiple DAI controllers with a single
>> endpoint each. All the IDs will be 0 in the latter case.
>
> It support 1:1 endpoint pattern only.
Then the endpoint id is always 0 and this function is pointless.
Rob
More information about the Alsa-devel
mailing list