lkml.org 
[lkml]   [2020]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 12/23] ASoC: simple-card: Support DPCM DAI link with multiple Codecs

Hi Sameer

> The simple-card driver supports multiple CPU and single Codec entries
> for DPCM DAI links. In some cases it is required to have multiple
> CPU/Codecs. Currently parsing logic for DPCM link loops over all
> children of DAI link but assumes that there is a single Codec entry.
> When DAI link has multiple Codecs it considers only the first Codec
> entry and remaining Codecs are wrongly treated as CPU. This happens
> because first Codec is used as reference for parsing all other child
> nodes.
(snip)
> @@ -137,8 +136,13 @@ static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv,
> * Codec |return|Pass
> * np
> */
> - if (li->cpu == (np == codec))
> - return 0;
> + if (li->cpu) {
> + if (!strcmp(np->name, "codec"))
> + return 0;
> + } else {
> + if (!strcmp(np->name, "cpu"))
> + return 0;
> + }

Checking node name is maybe nice idea,
but please consider "prefix" here.

Maybe base issue for multiple codec support
is that simple_for_each_link() is caring first codec only ?

simple_for_each_link(...)
{
...
do {
=> /* get codec */
=> codec = of_get_child_by_name(...);
...
}
}

Remove above and having simple_node_is_codec(np, xxx) function
or something can help it ?


Thank you for your help !!

Best regards
---
Kuninori Morimoto

\
 
 \ /
  Last update: 2020-06-29 03:25    [W:0.236 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site