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: <VI1PR04MB4222BDB1378A01E99DFC6211E3519@VI1PR04MB4222.eurprd04.prod.outlook.com>
Date:   Fri, 23 Sep 2022 09:56:07 +0000
From:   Chancel Liu <chancel.liu@....com>
To:     Rob Herring <robh@...nel.org>
CC:     "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "shengjiu.wang@...il.com" <shengjiu.wang@...il.com>,
        "S.J. Wang" <shengjiu.wang@....com>,
        "Xiubo.Lee@...il.com" <Xiubo.Lee@...il.com>,
        "festevam@...il.com" <festevam@...il.com>,
        "nicoleotsuka@...il.com" <nicoleotsuka@...il.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: RE: Re: [PATCH v2 1/7] ASoC: dt-bindings: fsl_rpmsg: Add a property
 to assign the rpmsg channel

> > Add a string property to assign the rpmsg channel this sound card sits
> > on. It also represents the name of ASoC platform driver. This property
> > can be omitted if there is only one sound card and it sits on
> > "rpmsg-audio-channel".
> >
> > Signed-off-by: Chancel Liu <chancel.liu@....com>
> > ---
> >  .../devicetree/bindings/sound/fsl,rpmsg.yaml  | 37 ++++++++++++++++++-
> >  1 file changed, 35 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > index d370c98a62c7..3744ae794c00 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > @@ -11,8 +11,11 @@ maintainers:
> >
> >  description: |
> >    fsl_rpmsg is a virtual audio device. Mapping to real hardware devices
> > -  are SAI, DMA controlled by Cortex M core. What we see from Linux
> > -  side is a device which provides audio service by rpmsg channel.
> > +  are SAI, MICFIL, DMA controlled by Cortex M core. What we see from
> > +  Linux side is a device which provides audio service by rpmsg channel.
> > +  We can create different sound cards which access different hardwares
> > +  such as SAI, MICFIL, .etc through building rpmsg channels between
> > +  Cortex-A and Cortex-M.
> >
> >  properties:
> >    compatible:
> > @@ -85,6 +88,17 @@ properties:
> >        This is a boolean property. If present, the receiving function
> >        will be enabled.
> >
> > +  fsl,rpmsg-channel-name:
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    description: |
> > +      A string property to assign rpmsg channel this sound card sits on.
> > +      It also represents the name of ASoC platform driver. This property
> 
> That's a Linux detail which doesn't belong in DT.
> 

We pass hardware parameters in dts node to set up clocks or other
configurations. These configurations are finally sent to Cortex-M by
rpmsg channel because Cortex-M actually controls real hardware devices.
If there's only one sound card sits on one rpmsg channel we will not
need this property. But if there are several sound cards we need to
specify correct rpmsg channel. Thus hardware configurations can be
properly sent to Cortex-M. From this level to speak, this property is
hardware-related since rpmsg channel represents the real hardware audio
controller.

Here I attach the discussion in version 1 patches for your information:
---
This property aims to tell the ASoC driver which rpmsg channel the
sound card depends on. If there are several sound cards sit on rpmsg,
we should pass correct information in dts node to specify the name of
rpmsg channel. That is why I meant to add this property. 

Actually this property is hardware-related. As we discussed before,
this kind of sound card based on rpmsg works under this mechanism
Cortex-A core tells the Cortex-M core configuration of the PCM
parameters then Cortex-M controls real hardware devices. This property
specifying rpmsg channel represents the real hardware audio controller.
---

That's my idea adding this property. Do you have any suggstion?

Regards, 
Chancel Liu

> > +      can be omitted if there is only one sound card and it sits on
> > +      "rpmsg-audio-channel".
> > +    enum:
> > +      - rpmsg-audio-channel
> > +      - rpmsg-micfil-channel
> > +
> >  required:
> >    - compatible
> >    - model
> > @@ -107,3 +121,22 @@ examples:
> >                   <&clk IMX8MN_AUDIO_PLL2_OUT>;
> >          clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
> >      };
> > +
> > +  - |
> > +    #include <dt-bindings/clock/imx8mm-clock.h>
> > +
> > +    rpmsg_micfil: audio-controller {
> > +        compatible = "fsl,imx8mm-rpmsg-audio";
> > +        model = "micfil-audio";
> > +        fsl,rpmsg-channel-name = "rpmsg-micfil-channel";
> > +        fsl,enable-lpa;
> > +        fsl,rpmsg-in;
> > +        clocks = <&clk IMX8MM_CLK_PDM_IPG>,
> > +                 <&clk IMX8MM_CLK_PDM_ROOT>,
> > +                 <&clk IMX8MM_CLK_SDMA3_ROOT>,
> > +                 <&clk IMX8MM_AUDIO_PLL1_OUT>,
> > +                 <&clk IMX8MM_AUDIO_PLL2_OUT>;
> > +        clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
> > +    };
> > +
> > +...
> > --
> > 2.25.1
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ