lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZBb0ZJk7aTaji-xH2jEs7QiTaoXTuS5_K-ruSaxpEnWdw@mail.gmail.com>
Date:   Mon, 20 Nov 2023 11:57:56 +0200
From:   Daniel Baluta <daniel.baluta@...il.com>
To:     Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc:     Daniel Baluta <daniel.baluta@....nxp.com>, broonie@...nel.org,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        iuliana.prodan@....com, shengjiu.wang@....com
Subject: Re: [RFC PATCH] ASoC: simple-card: Use dai_id from node description

Hello Morimoto-san,

On Mon, Nov 20, 2023 at 6:36 AM Kuninori Morimoto
<kuninori.morimoto.gx@...esas.com> wrote:
>
>
> Hi Daniel, Mark
>
> > We can specify DAI id using reg property. When dts
> > node has only 1 DAI simple-card always assumes that DAI id is 0.
> >
> > But this is not correct in the case of SOF for example which adds DAIs
> > staticaly (See definition of snd_soc_dai_driver in sound/soc/sof/imx/imx8m.c)
> (snip)
> > -     args.args_count = (of_graph_get_endpoint_count(node) > 1);
> > +     args.args_count = (of_graph_get_endpoint_count(node) >= 1);
>
> If my understanding was correct, for example you want to use 2nd DAI
> but your DT has only 1 port (thus, it is using reg property) ?

Yes.

>
> Current simple utils is assuming (1) DT has all DAI settings, (2) having
> reg property is option.
>
> But current DT requests reg property.
> So maybe it is good time to remove non-reg-property support ?

I have no problem removing non-reg-property support. This will work
for me. Will later send a patch.

I want to understand how current non-reg-property support works.

I'm looking at commit 73b17f1a65c881fc ("SoC: simple-card-utils:
support snd_soc_get_dai_id()").

So, the reg property was introduced for cases where we can have ports
of different types? E.g
In the case of HDMI we can have Audio ports and Video ports? And we
need reg property in order
to get the correct DAI id?

I don't understand how DAI id is currently computed if we don't  have
the reg property and also
we have Non HDMI sound case:

Here is the code:

»       /*
»        * Non HDMI sound case, counting port/endpoint on its DT
»        * is enough. Let's count it.
»        */
»       i = 0;
»       id = -1;
»       for_each_endpoint_of_node(node, endpoint) {
»       »       if (endpoint == ep)
»       »       »       id = i;
»       »       i++;
»       }

»       of_node_put(node);


So, this code assumes that the DAI id is exactly the number of the port, right?
But this is wrong if we have a component (port) with multiple DAIs attached.

Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ