devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Create a new sound card to access MICFIL based on rpmsg channel
@ 2022-08-29  7:51 Chancel Liu
  2022-08-29  7:51 ` [PATCH 1/5] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver name Chancel Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Chancel Liu @ 2022-08-29  7:51 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

At a previous time, we have successfully created a virtual sound card
based on rpmsg. The sound card works under this mechanism Cortex-A core
tells the Cortex-M core the format, rate, channel, .etc configuration
of the PCM parameters and Cortex-M controls real hardware devices such
as SAI and DMA. From the view of Linux side, the sound card is bound to
a rpmsg channel through which it can access SAI.

Here these patches are introduced to create a new virtual sound card to
access MICFIL based on a new created rpmsg channel. It's easy to create
a new rpmsg channel for MICFIL through rpmsg name service announcment.
Also the other ASoC components bound to this rpmsg MICFIL sound card
will be registered with these patches.

If other sound cards using different hardware devices needs to be
created over rpmsg in the future, these patches can be referred.

Chancel Liu (5):
  ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver
    name
  ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFIL
  ASoC: imx-pcm-rpmsg: Register different platform drivers
  ASoC: fsl_rpmsg: Register different CPU DAI drivers
  ASoC: imx-rpmsg: Assign platform driver used by machine driver to link
    with

 .../devicetree/bindings/sound/fsl,rpmsg.yaml  | 34 +++++++++++++++++--
 sound/soc/fsl/fsl_rpmsg.c                     |  2 +-
 sound/soc/fsl/imx-audio-rpmsg.c               |  3 +-
 sound/soc/fsl/imx-pcm-rpmsg.c                 | 10 ++++--
 sound/soc/fsl/imx-rpmsg.c                     |  6 +++-
 5 files changed, 47 insertions(+), 8 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Re: [PATCH 1/5] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver name
@ 2022-09-13  7:14 Chancel Liu
  2022-09-13  8:39 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 10+ messages in thread
From: Chancel Liu @ 2022-09-13  7:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski, lgirdwood@gmail.com, broonie@kernel.org,
	perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org,
	S.J. Wang, Xiubo.Lee@gmail.com, festevam@gmail.com,
	nicoleotsuka@gmail.com, linuxppc-dev@lists.ozlabs.org

> > Add a string property to assign ASoC platform driver name. It also
> > represents the rpmsg channel this sound card sits on. 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@nxp.com>
> > ---
> >  .../devicetree/bindings/sound/fsl,rpmsg.yaml  | 34 +++++++++++++++++--
> >  1 file changed, 32 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > index d370c98a62c7..35e3cb9f768b 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,14 @@ properties:
> >        This is a boolean property. If present, the receiving function
> >        will be enabled.
> >
> > +  fsl,platform:
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    description: |
> > +      A string property to assign ASoC platform driver name.
> 
> No, this is not a property of hardware. Naming of some drivers in some
> systems does not fit DTS and bindings.
> 

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. I just want to
use a string property to distinguish different names of rpmsg channel.

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 better suggestion?

> > It also
> > +      represents the rpmsg channel this sound card sits on. This property
> > +      can be omitted if there is only one sound card and it sits on
> > +      "rpmsg-audio-channel".
> > +
> >  required:
> >    - compatible
> >    - model
> > @@ -107,3 +118,22 @@ examples:
> >                   <&clk IMX8MN_AUDIO_PLL2_OUT>;
> >          clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
> >      };
> > +
> > +  - |
> > +    #include <dt-bindings/clock/imx8mm-clock.h>
> > +
> > +    rpmsg_micfil: rpmsg_micfil {
> 
> Node names should be generic.
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevicetre
> e-specification.readthedocs.io%2Fen%2Flatest%2Fchapter2-devicetree-basics.h
> tml%23generic-names-recommendation&amp;data=05%7C01%7Cchancel.liu%
> 40nxp.com%7C8d5f4ca9669349c597b908da8a6a0311%7C686ea1d3bc2b4c6fa
> 92cd99c5c301635%7C0%7C0%7C637974485190445475%7CUnknown%7CTWFp
> bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6
> Mn0%3D%7C3000%7C%7C%7C&amp;sdata=SgDveDWfYyVYhBrG9gpi2aPgGV4j
> PwtqbQOtbaE%2FI2s%3D&amp;reserved=0
> 
> Also: no underscores in node names.
> 
> Best regards,
> Krzysztof

Thanks for your reminder. We will rename the node in patches for next
version like:

rpmsg_micfil: audio-controller {
	// property;
};

Regards, 
Chancel Liu

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-13  8:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29  7:51 [PATCH 0/5] Create a new sound card to access MICFIL based on rpmsg channel Chancel Liu
2022-08-29  7:51 ` [PATCH 1/5] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver name Chancel Liu
2022-08-30  6:28   ` S.J. Wang
2022-08-30  9:28   ` Krzysztof Kozlowski
2022-08-29  7:51 ` [PATCH 2/5] ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFIL Chancel Liu
2022-08-29  7:51 ` [PATCH 3/5] ASoC: imx-pcm-rpmsg: Register different platform drivers Chancel Liu
2022-08-30  6:31   ` S.J. Wang
2022-08-29  7:51 ` [PATCH 4/5] ASoC: fsl_rpmsg: Register different CPU DAI drivers Chancel Liu
2022-08-29  7:51 ` [PATCH 5/5] ASoC: imx-rpmsg: Assign platform driver used by machine driver to link with Chancel Liu
  -- strict thread matches above, loose matches on Subject: below --
2022-09-13  7:14 Re: [PATCH 1/5] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver name Chancel Liu
2022-09-13  8:39 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).