diff mbox series

[v2,4/4] ASoC: add imx-audmix DT binding documentation

Message ID 1546952716-2743-5-git-send-email-viorel.suman@nxp.com (mailing list archive)
State New, archived
Headers show
Series Add NXP AUDMIX device and machine drivers | expand

Commit Message

Viorel Suman Jan. 8, 2019, 1:05 p.m. UTC
Add the DT binding documentation for Audio Mixer
machine driver.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
---
 .../devicetree/bindings/sound/imx-audmix.txt       | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/imx-audmix.txt

Comments

Rob Herring (Arm) Jan. 15, 2019, 8:57 p.m. UTC | #1
On Tue, Jan 08, 2019 at 01:05:51PM +0000, Viorel Suman wrote:
> Add the DT binding documentation for Audio Mixer
> machine driver.
> 
> Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
> ---
>  .../devicetree/bindings/sound/imx-audmix.txt       | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/imx-audmix.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/imx-audmix.txt b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> new file mode 100644
> index 0000000..6ac1230
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> @@ -0,0 +1,24 @@
> +NXP Audio Mixer (AUDMIX) machine driver.
> +
> +Required properties:
> +===================================
> +  - compatible		: Compatible list, contains "fsl,imx-audmix"
> +
> +  - model		: Short audio card description.
> +
> +  - dais		: Must contain a list of phandles to AUDMIX connected
> +			  DAIs. The current implementation requires two phandles
> +			  to SAI interfaces to be provided, the first SAI in the
> +			  list being used to route the AUDMIX output.
> +
> +  - audmix-controller	: Must contain the phandle to the AUDMIX device node.

I don't think you need 2 nodes for this as this one is just a virtual 
device. Just add the dais property to the audmix node.

Rob
Daniel Baluta Jan. 16, 2019, 8:21 a.m. UTC | #2
On Tue, Jan 15, 2019 at 10:58 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Jan 08, 2019 at 01:05:51PM +0000, Viorel Suman wrote:
> > Add the DT binding documentation for Audio Mixer
> > machine driver.
> >
> > Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
> > ---
> >  .../devicetree/bindings/sound/imx-audmix.txt       | 24 ++++++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/imx-audmix.txt
> >
> > diff --git a/Documentation/devicetree/bindings/sound/imx-audmix.txt b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> > new file mode 100644
> > index 0000000..6ac1230
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> > @@ -0,0 +1,24 @@
> > +NXP Audio Mixer (AUDMIX) machine driver.
> > +
> > +Required properties:
> > +===================================
> > +  - compatible               : Compatible list, contains "fsl,imx-audmix"
> > +
> > +  - model            : Short audio card description.
> > +
> > +  - dais             : Must contain a list of phandles to AUDMIX connected
> > +                       DAIs. The current implementation requires two phandles
> > +                       to SAI interfaces to be provided, the first SAI in the
> > +                       list being used to route the AUDMIX output.
> > +
> > +  - audmix-controller        : Must contain the phandle to the AUDMIX device node.
>
> I don't think you need 2 nodes for this as this one is just a virtual
> device. Just add the dais property to the audmix node.

Hi Rob,

Thanks for the suggestion. We want to understand better the reasoning
behind this.

Is it because dais are physically connected to AUDMIX node?

In ALSA we usually add all the components inside the
associated machine driver virtual node.

thanks,
Daniel.
Rob Herring (Arm) Jan. 16, 2019, 2:57 p.m. UTC | #3
On Wed, Jan 16, 2019 at 2:22 AM Daniel Baluta <daniel.baluta@gmail.com> wrote:
>
> On Tue, Jan 15, 2019 at 10:58 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Tue, Jan 08, 2019 at 01:05:51PM +0000, Viorel Suman wrote:
> > > Add the DT binding documentation for Audio Mixer
> > > machine driver.
> > >
> > > Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
> > > ---
> > >  .../devicetree/bindings/sound/imx-audmix.txt       | 24 ++++++++++++++++++++++
> > >  1 file changed, 24 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/sound/imx-audmix.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/sound/imx-audmix.txt b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> > > new file mode 100644
> > > index 0000000..6ac1230
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/sound/imx-audmix.txt
> > > @@ -0,0 +1,24 @@
> > > +NXP Audio Mixer (AUDMIX) machine driver.
> > > +
> > > +Required properties:
> > > +===================================
> > > +  - compatible               : Compatible list, contains "fsl,imx-audmix"
> > > +
> > > +  - model            : Short audio card description.
> > > +
> > > +  - dais             : Must contain a list of phandles to AUDMIX connected
> > > +                       DAIs. The current implementation requires two phandles
> > > +                       to SAI interfaces to be provided, the first SAI in the
> > > +                       list being used to route the AUDMIX output.
> > > +
> > > +  - audmix-controller        : Must contain the phandle to the AUDMIX device node.
> >
> > I don't think you need 2 nodes for this as this one is just a virtual
> > device. Just add the dais property to the audmix node.
>
> Hi Rob,
>
> Thanks for the suggestion. We want to understand better the reasoning
> behind this.
>
> Is it because dais are physically connected to AUDMIX node?
>
> In ALSA we usually add all the components inside the
> associated machine driver virtual node.

Yes, but in those cases, there's a bunch of components (DAIs, DMA,
DSP, amp, codecs, etc.) with no main device. That doesn't really
appear to be the case here (or your example was incomplete).

It's simply that we try to avoid such virtual devices unless
absolutely necessary.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/imx-audmix.txt b/Documentation/devicetree/bindings/sound/imx-audmix.txt
new file mode 100644
index 0000000..6ac1230
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/imx-audmix.txt
@@ -0,0 +1,24 @@ 
+NXP Audio Mixer (AUDMIX) machine driver.
+
+Required properties:
+===================================
+  - compatible		: Compatible list, contains "fsl,imx-audmix"
+
+  - model		: Short audio card description.
+
+  - dais		: Must contain a list of phandles to AUDMIX connected
+			  DAIs. The current implementation requires two phandles
+			  to SAI interfaces to be provided, the first SAI in the
+			  list being used to route the AUDMIX output.
+
+  - audmix-controller	: Must contain the phandle to the AUDMIX device node.
+
+Machine driver configuration example:
+====================================
+  sound-audmix-sai {
+    compatible = "fsl,imx-audmix";
+    model = "audmix-sai";
+    dais = <&sai4>, <&sai5>;
+    audmix-controller = <&audmix>;
+  };
+