Message ID | 1612693435-31418-8-git-send-email-shengjiu.wang@nxp.com |
---|---|
State | New |
Headers | show |
Series | Add audio driver base on rpmsg on i.MX platform | expand |
On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > core. The Cortex-M core will control the audio interface, DMA and audio > codec, setup the pipeline, the audio driver on Cortex-A core side is just > to communitcate with M core, it is a virtual sound card and don't touch > the hardware. I don't understand why there are 2 nodes for this other than you happen to want to split this into 2 Linux drivers. It's 1 h/w thing. > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> > --- > .../bindings/sound/imx-audio-rpmsg.yaml | 48 +++++++++++++++++++ > 1 file changed, 48 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > new file mode 100644 > index 000000000000..b941aeb80678 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > @@ -0,0 +1,48 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/imx-audio-rpmsg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP i.MX audio complex with rpmsg > + > +maintainers: > + - Shengjiu Wang <shengjiu.wang@nxp.com> > + > +properties: > + compatible: > + enum: > + - fsl,imx-audio-rpmsg > + > + model: > + $ref: /schemas/types.yaml#/definitions/string > + description: User specified audio sound card name > + > + audio-cpu: > + description: The phandle of an CPU DAI controller > + > + rpmsg-out: > + description: | > + This is a boolean property. If present, the transmitting function > + will be enabled, > + > + rpmsg-in: > + description: | > + This is a boolean property. If present, the receiving function > + will be enabled. > + > +required: > + - compatible > + - model > + - audio-cpu > + > +additionalProperties: false > + > +examples: > + - | > + sound-rpmsg { > + compatible = "fsl,imx-audio-rpmsg"; > + model = "ak4497-audio"; > + audio-cpu = <&rpmsg_audio>; > + rpmsg-out; > + }; > -- > 2.27.0 >
On Thu, Feb 11, 2021 at 6:18 AM Rob Herring <robh@kernel.org> wrote: > > On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > > core. The Cortex-M core will control the audio interface, DMA and audio > > codec, setup the pipeline, the audio driver on Cortex-A core side is just > > to communitcate with M core, it is a virtual sound card and don't touch > > the hardware. > > I don't understand why there are 2 nodes for this other than you happen > to want to split this into 2 Linux drivers. It's 1 h/w thing. This one is for the sound card machine driver. Another one is for the sound card cpu dai driver. so there are 2 nodes. > > > > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> > > --- > > .../bindings/sound/imx-audio-rpmsg.yaml | 48 +++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > > > > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > > new file mode 100644 > > index 000000000000..b941aeb80678 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml > > @@ -0,0 +1,48 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/sound/imx-audio-rpmsg.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: NXP i.MX audio complex with rpmsg > > + > > +maintainers: > > + - Shengjiu Wang <shengjiu.wang@nxp.com> > > + > > +properties: > > + compatible: > > + enum: > > + - fsl,imx-audio-rpmsg > > + > > + model: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: User specified audio sound card name > > + > > + audio-cpu: > > + description: The phandle of an CPU DAI controller > > + > > + rpmsg-out: > > + description: | > > + This is a boolean property. If present, the transmitting function > > + will be enabled, > > + > > + rpmsg-in: > > + description: | > > + This is a boolean property. If present, the receiving function > > + will be enabled. > > + > > +required: > > + - compatible > > + - model > > + - audio-cpu > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + sound-rpmsg { > > + compatible = "fsl,imx-audio-rpmsg"; > > + model = "ak4497-audio"; > > + audio-cpu = <&rpmsg_audio>; > > + rpmsg-out; > > + }; > > -- > > 2.27.0 > >
On Thu, Feb 18, 2021 at 1:23 AM Shengjiu Wang <shengjiu.wang@gmail.com> wrote: > > On Thu, Feb 11, 2021 at 6:18 AM Rob Herring <robh@kernel.org> wrote: > > > > On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > > > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > > > core. The Cortex-M core will control the audio interface, DMA and audio > > > codec, setup the pipeline, the audio driver on Cortex-A core side is just > > > to communitcate with M core, it is a virtual sound card and don't touch > > > the hardware. > > > > I don't understand why there are 2 nodes for this other than you happen > > to want to split this into 2 Linux drivers. It's 1 h/w thing. > > This one is for the sound card machine driver. Another one is > for the sound card cpu dai driver. so there are 2 nodes. You are explaining this to me in terms of drivers. Explain it in terms of h/w blocks. Rob
Hi On Fri, Mar 5, 2021 at 4:05 AM Rob Herring <robh@kernel.org> wrote: > > On Thu, Feb 18, 2021 at 1:23 AM Shengjiu Wang <shengjiu.wang@gmail.com> wrote: > > > > On Thu, Feb 11, 2021 at 6:18 AM Rob Herring <robh@kernel.org> wrote: > > > > > > On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > > > > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > > > > core. The Cortex-M core will control the audio interface, DMA and audio > > > > codec, setup the pipeline, the audio driver on Cortex-A core side is just > > > > to communitcate with M core, it is a virtual sound card and don't touch > > > > the hardware. > > > > > > I don't understand why there are 2 nodes for this other than you happen > > > to want to split this into 2 Linux drivers. It's 1 h/w thing. > > > > This one is for the sound card machine driver. Another one is > > for the sound card cpu dai driver. so there are 2 nodes. > > You are explaining this to me in terms of drivers. Explain it in terms > of h/w blocks. > Yes, there is only 1 h/w block, which is (MU) message unit As the sound card needs a cpu dai node and sound card node, so from the driver's perspective, I use two nodes. Seems It is hard to only use one node for my case. or do you have any suggestions? Best regards Wang shengjiu
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml new file mode 100644 index 000000000000..b941aeb80678 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/imx-audio-rpmsg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX audio complex with rpmsg + +maintainers: + - Shengjiu Wang <shengjiu.wang@nxp.com> + +properties: + compatible: + enum: + - fsl,imx-audio-rpmsg + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + + audio-cpu: + description: The phandle of an CPU DAI controller + + rpmsg-out: + description: | + This is a boolean property. If present, the transmitting function + will be enabled, + + rpmsg-in: + description: | + This is a boolean property. If present, the receiving function + will be enabled. + +required: + - compatible + - model + - audio-cpu + +additionalProperties: false + +examples: + - | + sound-rpmsg { + compatible = "fsl,imx-audio-rpmsg"; + model = "ak4497-audio"; + audio-cpu = <&rpmsg_audio>; + rpmsg-out; + };
Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M core. The Cortex-M core will control the audio interface, DMA and audio codec, setup the pipeline, the audio driver on Cortex-A core side is just to communitcate with M core, it is a virtual sound card and don't touch the hardware. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> --- .../bindings/sound/imx-audio-rpmsg.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml