All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support
@ 2015-08-07  6:23 Zidan Wang
  2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Zidan Wang @ 2015-08-07  6:23 UTC (permalink / raw)
  To: nicoleotsuka
  Cc: alsa-devel, timur, Zidan Wang, Xiubo.Lee, tiwai, lgirdwood, broonie

Add 32 bit word length support.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
---
 sound/soc/fsl/fsl_sai.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 0662809..40280ce 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2013 Freescale Semiconductor, Inc.
+ * Copyright 2012-2015 Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -13,7 +13,8 @@
 
 #define FSL_SAI_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
 			 SNDRV_PCM_FMTBIT_S20_3LE |\
-			 SNDRV_PCM_FMTBIT_S24_LE)
+			 SNDRV_PCM_FMTBIT_S24_LE |\
+			 SNDRV_PCM_FMTBIT_S32_LE)
 
 /* SAI Register Map Register */
 #define FSL_SAI_TCSR	0x00 /* SAI Transmit Control */
-- 
1.9.1

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

* [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support
  2015-08-07  6:23 [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Zidan Wang
@ 2015-08-07  6:23 ` Zidan Wang
  2015-08-07 13:18   ` Mark Brown
  2015-08-07 19:34   ` Nicolin Chen
  2015-08-07  6:23 ` [PATCH 3/3] ASoC: fsl_sai: Add imx6ul " Zidan Wang
  2015-08-07 13:19 ` [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Mark Brown
  2 siblings, 2 replies; 9+ messages in thread
From: Zidan Wang @ 2015-08-07  6:23 UTC (permalink / raw)
  To: nicoleotsuka
  Cc: alsa-devel, timur, Zidan Wang, Xiubo.Lee, tiwai, lgirdwood, broonie

i.MX7d SoC contains SAI module, so add imx7d platform support.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
---
 sound/soc/fsl/fsl_sai.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 5c737f1..390197e 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -704,6 +704,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
 		sai->sai_on_imx = true;
 
+	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
+		sai->sai_on_imx = true;
+
 	sai->is_lsb_first = of_property_read_bool(np, "lsb-first");
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -802,6 +805,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
 static const struct of_device_id fsl_sai_ids[] = {
 	{ .compatible = "fsl,vf610-sai", },
 	{ .compatible = "fsl,imx6sx-sai", },
+	{ .compatible = "fsl,imx7d-sai", },
 	{ /* sentinel */ }
 };
 
-- 
1.9.1

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

* [PATCH 3/3] ASoC: fsl_sai: Add imx6ul platform support
  2015-08-07  6:23 [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Zidan Wang
  2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
@ 2015-08-07  6:23 ` Zidan Wang
  2015-08-07 13:18   ` Mark Brown
  2015-08-07 13:19 ` [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Mark Brown
  2 siblings, 1 reply; 9+ messages in thread
From: Zidan Wang @ 2015-08-07  6:23 UTC (permalink / raw)
  To: nicoleotsuka
  Cc: alsa-devel, timur, Zidan Wang, Xiubo.Lee, tiwai, lgirdwood, broonie

i.MX6ul SoC contains SAI module, so add imx6ul platform support.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
---
 sound/soc/fsl/fsl_sai.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 390197e..229a517 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -701,10 +701,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
 
 	sai->pdev = pdev;
 
-	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
-		sai->sai_on_imx = true;
-
-	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
+	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai") ||
+	    of_device_is_compatible(pdev->dev.of_node, "fsl,imx6ul-sai") ||
+	    of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
 		sai->sai_on_imx = true;
 
 	sai->is_lsb_first = of_property_read_bool(np, "lsb-first");
@@ -805,6 +804,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
 static const struct of_device_id fsl_sai_ids[] = {
 	{ .compatible = "fsl,vf610-sai", },
 	{ .compatible = "fsl,imx6sx-sai", },
+	{ .compatible = "fsl,imx6ul-sai", },
 	{ .compatible = "fsl,imx7d-sai", },
 	{ /* sentinel */ }
 };
-- 
1.9.1

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

* Re: [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support
  2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
@ 2015-08-07 13:18   ` Mark Brown
  2015-08-07 19:34   ` Nicolin Chen
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-08-07 13:18 UTC (permalink / raw)
  To: Zidan Wang; +Cc: alsa-devel, timur, Xiubo.Lee, lgirdwood, tiwai, nicoleotsuka


[-- Attachment #1.1: Type: text/plain, Size: 312 bytes --]

On Fri, Aug 07, 2015 at 02:23:52PM +0800, Zidan Wang wrote:
> i.MX7d SoC contains SAI module, so add imx7d platform support.
> 
> Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
> ---
>  sound/soc/fsl/fsl_sai.c | 4 ++++
>  1 file changed, 4 insertions(+)

This needs a binding document update too.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 3/3] ASoC: fsl_sai: Add imx6ul platform support
  2015-08-07  6:23 ` [PATCH 3/3] ASoC: fsl_sai: Add imx6ul " Zidan Wang
@ 2015-08-07 13:18   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-08-07 13:18 UTC (permalink / raw)
  To: Zidan Wang; +Cc: alsa-devel, timur, Xiubo.Lee, lgirdwood, tiwai, nicoleotsuka


[-- Attachment #1.1: Type: text/plain, Size: 170 bytes --]

On Fri, Aug 07, 2015 at 02:23:53PM +0800, Zidan Wang wrote:
> i.MX6ul SoC contains SAI module, so add imx6ul platform support.

This needs a binding document update too.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support
  2015-08-07  6:23 [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Zidan Wang
  2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
  2015-08-07  6:23 ` [PATCH 3/3] ASoC: fsl_sai: Add imx6ul " Zidan Wang
@ 2015-08-07 13:19 ` Mark Brown
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-08-07 13:19 UTC (permalink / raw)
  To: Zidan Wang; +Cc: alsa-devel, timur, Xiubo.Lee, lgirdwood, tiwai, nicoleotsuka


[-- Attachment #1.1: Type: text/plain, Size: 415 bytes --]

On Fri, Aug 07, 2015 at 02:23:51PM +0800, Zidan Wang wrote:
> Add 32 bit word length support.

I notice that you're adding support for new platforms along with this -
does this support depend on the platform?  You should also have a note
in the commit log explaining that there are no code changes required in
the driver except the capability define since it already just writes the
width directly to the hardware.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support
  2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
  2015-08-07 13:18   ` Mark Brown
@ 2015-08-07 19:34   ` Nicolin Chen
  2015-08-10  1:14     ` Zidan Wang
  2015-08-11  9:38     ` Mark Brown
  1 sibling, 2 replies; 9+ messages in thread
From: Nicolin Chen @ 2015-08-07 19:34 UTC (permalink / raw)
  To: Zidan Wang; +Cc: alsa-devel, timur, Xiubo.Lee, tiwai, lgirdwood, broonie

On Fri, Aug 07, 2015 at 02:23:52PM +0800, Zidan Wang wrote:
> i.MX7d SoC contains SAI module, so add imx7d platform support.
> 
> Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
> ---
>  sound/soc/fsl/fsl_sai.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 5c737f1..390197e 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -704,6 +704,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
>  	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
>  		sai->sai_on_imx = true;
>  
> +	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
> +		sai->sai_on_imx = true;

What's the difference between imx6sx-sai and imx7d-sai?

I think you may put its compatible model in the DT instead of adding
a copy in the driver unless the SAI on the imx7d really has something
different.

For example:
	compatible = "fsl,imx6q-ssi", "fsl,imx51-ssi";
	/* The driver only has imx51-ssi */

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

* Re: [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support
  2015-08-07 19:34   ` Nicolin Chen
@ 2015-08-10  1:14     ` Zidan Wang
  2015-08-11  9:38     ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Zidan Wang @ 2015-08-10  1:14 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: alsa-devel, timur, Xiubo.Lee, tiwai, lgirdwood, broonie

On Fri, Aug 07, 2015 at 12:34:37PM -0700, Nicolin Chen wrote:
> On Fri, Aug 07, 2015 at 02:23:52PM +0800, Zidan Wang wrote:
> > i.MX7d SoC contains SAI module, so add imx7d platform support.
> > 
> > Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
> > ---
> >  sound/soc/fsl/fsl_sai.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index 5c737f1..390197e 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -704,6 +704,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
> >  	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
> >  		sai->sai_on_imx = true;
> >  
> > +	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
> > +		sai->sai_on_imx = true;
> 
> What's the difference between imx6sx-sai and imx7d-sai?
> 
> I think you may put its compatible model in the DT instead of adding
> a copy in the driver unless the SAI on the imx7d really has something
> different.
> 
> For example:
> 	compatible = "fsl,imx6q-ssi", "fsl,imx51-ssi";
> 	/* The driver only has imx51-ssi */

The imx7d-sai is the same as imx6sx-sai, so i should use compatible model "fsl,imx6sx-sai" for imx7d-sai.

Best Regards,
Zidan Wang

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

* Re: [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support
  2015-08-07 19:34   ` Nicolin Chen
  2015-08-10  1:14     ` Zidan Wang
@ 2015-08-11  9:38     ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-08-11  9:38 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: alsa-devel, timur, Zidan Wang, Xiubo.Lee, lgirdwood, tiwai


[-- Attachment #1.1: Type: text/plain, Size: 848 bytes --]

On Fri, Aug 07, 2015 at 12:34:37PM -0700, Nicolin Chen wrote:
> On Fri, Aug 07, 2015 at 02:23:52PM +0800, Zidan Wang wrote:

> > +	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx7d-sai"))
> > +		sai->sai_on_imx = true;

> What's the difference between imx6sx-sai and imx7d-sai?

> I think you may put its compatible model in the DT instead of adding
> a copy in the driver unless the SAI on the imx7d really has something
> different.

> For example:
> 	compatible = "fsl,imx6q-ssi", "fsl,imx51-ssi";
> 	/* The driver only has imx51-ssi */

It's generally good to have compatibles in the DT even if we believe the
hardware is identical since it can happen that differences are found
later (either due to new features being added or bugs found) and having
the explicit compatibles in DT already means that we only need to update
the driver.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2015-08-11  9:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07  6:23 [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Zidan Wang
2015-08-07  6:23 ` [PATCH 2/3] ASoC: fsl_sai: Add imx7d platform support Zidan Wang
2015-08-07 13:18   ` Mark Brown
2015-08-07 19:34   ` Nicolin Chen
2015-08-10  1:14     ` Zidan Wang
2015-08-11  9:38     ` Mark Brown
2015-08-07  6:23 ` [PATCH 3/3] ASoC: fsl_sai: Add imx6ul " Zidan Wang
2015-08-07 13:18   ` Mark Brown
2015-08-07 13:19 ` [PATCH 1/3] ASoC: fsl-sai: add 32 bit word length support Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.