All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support
@ 2016-01-29 11:01 Felipe F. Tonello
  2016-01-29 11:01 ` [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation Felipe F. Tonello
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Felipe F. Tonello @ 2016-01-29 11:01 UTC (permalink / raw)
  To: alsa-devel
  Cc: linux-kernel, devicetree, Mark Brown, Takashi Iwai, Nicolin Chen,
	Rob Herring

add cs4271 and cs42727 support for fsl-asoc-card

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 9 +++++++++
 sound/soc/fsl/Kconfig                                     | 4 ++--
 sound/soc/fsl/fsl-asoc-card.c                             | 7 +++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index 4da41bf1888e..ceaef5126989 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -24,6 +24,9 @@ The compatible list for this generic sound card currently:
 
  "fsl,imx-audio-cs42888"
 
+ "fsl,imx-audio-cs427x"
+ (compatible with CS4271 and CS4272)
+
  "fsl,imx-audio-wm8962"
  (compatible with Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt)
 
@@ -63,6 +66,12 @@ Optional properties:
   - audio-asrc		: The phandle of ASRC. It can be absent if there's no
 			  need to add ASRC support via DPCM.
 
+Optional unless SSI is selected as a CPU DAI:
+
+  - mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX)
+
+  - mux-ext-port	: The external port of the i.MX audio muxer
+
 Example:
 sound-cs42888 {
 	compatible = "fsl,imx-audio-cs42888";
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 14dfdee05fd5..35aabf9dc503 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -292,8 +292,8 @@ config SND_SOC_FSL_ASOC_CARD
 	select SND_SOC_FSL_SSI
 	help
 	 ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
-	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
-	 and SGTL5000.
+	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888,
+	 CS4271, CS4272 and SGTL5000.
 	 Say Y if you want to add support for Freescale Generic ASoC Sound Card.
 
 endif # SND_IMX_SOC
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 562b3bd22d9a..56b6b07d1922 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -28,6 +28,8 @@
 #include "../codecs/wm8962.h"
 #include "../codecs/wm8960.h"
 
+#define CS427x_SYSCLK_MCLK 0
+
 #define RX 0
 #define TX 1
 
@@ -528,6 +530,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
 		priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT;
 		priv->cpu_priv.slot_width = 32;
 		priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
+	} else if (of_device_is_compatible(np, "fsl,imx-audio-cs427x")) {
+		codec_dai_name = "cs4271-hifi";
+		priv->codec_priv.mclk_id = CS427x_SYSCLK_MCLK;
+		priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
 	} else if (of_device_is_compatible(np, "fsl,imx-audio-sgtl5000")) {
 		codec_dai_name = "sgtl5000";
 		priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
@@ -681,6 +687,7 @@ fail:
 static const struct of_device_id fsl_asoc_card_dt_ids[] = {
 	{ .compatible = "fsl,imx-audio-ac97", },
 	{ .compatible = "fsl,imx-audio-cs42888", },
+	{ .compatible = "fsl,imx-audio-cs427x", },
 	{ .compatible = "fsl,imx-audio-sgtl5000", },
 	{ .compatible = "fsl,imx-audio-wm8962", },
 	{ .compatible = "fsl,imx-audio-wm8960", },
-- 
2.7.0

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

* [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation
  2016-01-29 11:01 [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support Felipe F. Tonello
@ 2016-01-29 11:01 ` Felipe F. Tonello
  2016-01-29 18:02   ` Nicolin Chen
  2016-01-29 17:58   ` Nicolin Chen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Felipe F. Tonello @ 2016-01-29 11:01 UTC (permalink / raw)
  To: alsa-devel
  Cc: linux-kernel, devicetree, Mark Brown, Takashi Iwai, Nicolin Chen,
	Rob Herring

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index ceaef5126989..16b254b04f8c 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -43,7 +43,7 @@ Required properties:
 
   - audio-cpu		: The phandle of an CPU DAI controller
 
-  - audio-codec		: The phandle of an audio codec
+  - audio-codec	: The phandle of an audio codec
 
   - audio-routing	: A list of the connections between audio components.
 			  Each entry is a pair of strings, the first being the
-- 
2.7.0

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

* Re: [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support
@ 2016-01-29 17:58   ` Nicolin Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolin Chen @ 2016-01-29 17:58 UTC (permalink / raw)
  To: Felipe F. Tonello
  Cc: alsa-devel, linux-kernel, devicetree, Mark Brown, Takashi Iwai,
	Rob Herring

On Fri, Jan 29, 2016 at 11:01:00AM +0000, Felipe F. Tonello wrote:
> add cs4271 and cs42727 support for fsl-asoc-card
> 
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 9 +++++++++
>  sound/soc/fsl/Kconfig                                     | 4 ++--
>  sound/soc/fsl/fsl-asoc-card.c                             | 7 +++++++
>  3 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> index 4da41bf1888e..ceaef5126989 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> @@ -24,6 +24,9 @@ The compatible list for this generic sound card currently:
>  
>   "fsl,imx-audio-cs42888"
>  
> + "fsl,imx-audio-cs427x"
> + (compatible with CS4271 and CS4272)
> +
>   "fsl,imx-audio-wm8962"
>   (compatible with Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt)
>  
> @@ -63,6 +66,12 @@ Optional properties:
>    - audio-asrc		: The phandle of ASRC. It can be absent if there's no
>  			  need to add ASRC support via DPCM.
>  
> +Optional unless SSI is selected as a CPU DAI:
> +
> +  - mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX)
> +
> +  - mux-ext-port	: The external port of the i.MX audio muxer
> +
>  Example:
>  sound-cs42888 {
>  	compatible = "fsl,imx-audio-cs42888";
> diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
> index 14dfdee05fd5..35aabf9dc503 100644
> --- a/sound/soc/fsl/Kconfig
> +++ b/sound/soc/fsl/Kconfig
> @@ -292,8 +292,8 @@ config SND_SOC_FSL_ASOC_CARD
>  	select SND_SOC_FSL_SSI
>  	help
>  	 ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
> -	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
> -	 and SGTL5000.
> +	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888,
> +	 CS4271, CS4272 and SGTL5000.
>  	 Say Y if you want to add support for Freescale Generic ASoC Sound Card.
>  
>  endif # SND_IMX_SOC
> diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
> index 562b3bd22d9a..56b6b07d1922 100644
> --- a/sound/soc/fsl/fsl-asoc-card.c
> +++ b/sound/soc/fsl/fsl-asoc-card.c
> @@ -28,6 +28,8 @@
>  #include "../codecs/wm8962.h"
>  #include "../codecs/wm8960.h"
>  
> +#define CS427x_SYSCLK_MCLK 0
> +
>  #define RX 0
>  #define TX 1
>  
> @@ -528,6 +530,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
>  		priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT;
>  		priv->cpu_priv.slot_width = 32;
>  		priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
> +	} else if (of_device_is_compatible(np, "fsl,imx-audio-cs427x")) {
> +		codec_dai_name = "cs4271-hifi";
> +		priv->codec_priv.mclk_id = CS427x_SYSCLK_MCLK;
> +		priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
>  	} else if (of_device_is_compatible(np, "fsl,imx-audio-sgtl5000")) {
>  		codec_dai_name = "sgtl5000";
>  		priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
> @@ -681,6 +687,7 @@ fail:
>  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
>  	{ .compatible = "fsl,imx-audio-ac97", },
>  	{ .compatible = "fsl,imx-audio-cs42888", },
> +	{ .compatible = "fsl,imx-audio-cs427x", },
>  	{ .compatible = "fsl,imx-audio-sgtl5000", },
>  	{ .compatible = "fsl,imx-audio-wm8962", },
>  	{ .compatible = "fsl,imx-audio-wm8960", },
> -- 
> 2.7.0
> 

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

* Re: [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support
@ 2016-01-29 17:58   ` Nicolin Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolin Chen @ 2016-01-29 17:58 UTC (permalink / raw)
  To: Felipe F. Tonello
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown, Takashi Iwai,
	Rob Herring

On Fri, Jan 29, 2016 at 11:01:00AM +0000, Felipe F. Tonello wrote:
> add cs4271 and cs42727 support for fsl-asoc-card
> 
> Signed-off-by: Felipe F. Tonello <eu-NLnRV5p3vwDxYxTyqlRmvgC/G2K4zDHf@public.gmane.org>

Acked-by: Nicolin Chen <nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

> ---
>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 9 +++++++++
>  sound/soc/fsl/Kconfig                                     | 4 ++--
>  sound/soc/fsl/fsl-asoc-card.c                             | 7 +++++++
>  3 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> index 4da41bf1888e..ceaef5126989 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> @@ -24,6 +24,9 @@ The compatible list for this generic sound card currently:
>  
>   "fsl,imx-audio-cs42888"
>  
> + "fsl,imx-audio-cs427x"
> + (compatible with CS4271 and CS4272)
> +
>   "fsl,imx-audio-wm8962"
>   (compatible with Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt)
>  
> @@ -63,6 +66,12 @@ Optional properties:
>    - audio-asrc		: The phandle of ASRC. It can be absent if there's no
>  			  need to add ASRC support via DPCM.
>  
> +Optional unless SSI is selected as a CPU DAI:
> +
> +  - mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX)
> +
> +  - mux-ext-port	: The external port of the i.MX audio muxer
> +
>  Example:
>  sound-cs42888 {
>  	compatible = "fsl,imx-audio-cs42888";
> diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
> index 14dfdee05fd5..35aabf9dc503 100644
> --- a/sound/soc/fsl/Kconfig
> +++ b/sound/soc/fsl/Kconfig
> @@ -292,8 +292,8 @@ config SND_SOC_FSL_ASOC_CARD
>  	select SND_SOC_FSL_SSI
>  	help
>  	 ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
> -	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
> -	 and SGTL5000.
> +	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888,
> +	 CS4271, CS4272 and SGTL5000.
>  	 Say Y if you want to add support for Freescale Generic ASoC Sound Card.
>  
>  endif # SND_IMX_SOC
> diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
> index 562b3bd22d9a..56b6b07d1922 100644
> --- a/sound/soc/fsl/fsl-asoc-card.c
> +++ b/sound/soc/fsl/fsl-asoc-card.c
> @@ -28,6 +28,8 @@
>  #include "../codecs/wm8962.h"
>  #include "../codecs/wm8960.h"
>  
> +#define CS427x_SYSCLK_MCLK 0
> +
>  #define RX 0
>  #define TX 1
>  
> @@ -528,6 +530,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
>  		priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT;
>  		priv->cpu_priv.slot_width = 32;
>  		priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
> +	} else if (of_device_is_compatible(np, "fsl,imx-audio-cs427x")) {
> +		codec_dai_name = "cs4271-hifi";
> +		priv->codec_priv.mclk_id = CS427x_SYSCLK_MCLK;
> +		priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
>  	} else if (of_device_is_compatible(np, "fsl,imx-audio-sgtl5000")) {
>  		codec_dai_name = "sgtl5000";
>  		priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
> @@ -681,6 +687,7 @@ fail:
>  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
>  	{ .compatible = "fsl,imx-audio-ac97", },
>  	{ .compatible = "fsl,imx-audio-cs42888", },
> +	{ .compatible = "fsl,imx-audio-cs427x", },
>  	{ .compatible = "fsl,imx-audio-sgtl5000", },
>  	{ .compatible = "fsl,imx-audio-wm8962", },
>  	{ .compatible = "fsl,imx-audio-wm8960", },
> -- 
> 2.7.0
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation
  2016-01-29 11:01 ` [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation Felipe F. Tonello
@ 2016-01-29 18:02   ` Nicolin Chen
  2016-01-31 17:49     ` Felipe Ferreri Tonello
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolin Chen @ 2016-01-29 18:02 UTC (permalink / raw)
  To: Felipe F. Tonello
  Cc: alsa-devel, linux-kernel, devicetree, Mark Brown, Takashi Iwai,
	Rob Herring

On Fri, Jan 29, 2016 at 11:01:01AM +0000, Felipe F. Tonello wrote:
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> index ceaef5126989..16b254b04f8c 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> @@ -43,7 +43,7 @@ Required properties:
>  
>    - audio-cpu		: The phandle of an CPU DAI controller
>  
> -  - audio-codec		: The phandle of an audio codec
> +  - audio-codec	: The phandle of an audio codec

The indentation was fine actually.....how did you see it misaligned?

>    - audio-routing	: A list of the connections between audio components.
>  			  Each entry is a pair of strings, the first being the
> -- 
> 2.7.0
> 

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

* Re: [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation
  2016-01-29 18:02   ` Nicolin Chen
@ 2016-01-31 17:49     ` Felipe Ferreri Tonello
  0 siblings, 0 replies; 8+ messages in thread
From: Felipe Ferreri Tonello @ 2016-01-31 17:49 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: alsa-devel, linux-kernel, devicetree, Mark Brown, Takashi Iwai,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]

Hi Nicolin,

On 29/01/16 18:02, Nicolin Chen wrote:
> On Fri, Jan 29, 2016 at 11:01:01AM +0000, Felipe F. Tonello wrote:
>> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
>> ---
>>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
>> index ceaef5126989..16b254b04f8c 100644
>> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
>> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
>> @@ -43,7 +43,7 @@ Required properties:
>>  
>>    - audio-cpu		: The phandle of an CPU DAI controller
>>  
>> -  - audio-codec		: The phandle of an audio codec
>> +  - audio-codec	: The phandle of an audio codec
> 
> The indentation was fine actually.....how did you see it misaligned?

It doesn't look right on tab width as 8 spaces. I use `less -x8' for
core.pager git config for example.

But if it is correct, just ignore this patch then.

Thanks

-- 
Felipe

[-- Attachment #2: 0x92698E6A.asc --]
[-- Type: application/pgp-keys, Size: 7195 bytes --]

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

* Re: [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support
  2016-01-29 11:01 [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support Felipe F. Tonello
  2016-01-29 11:01 ` [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation Felipe F. Tonello
  2016-01-29 17:58   ` Nicolin Chen
@ 2016-02-01 15:23 ` Rob Herring
  2016-02-05 13:35 ` Applied "ASoC: fsl-asoc-card: add cs4271 and cs4272 support" to the asoc tree Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2016-02-01 15:23 UTC (permalink / raw)
  To: Felipe F. Tonello
  Cc: alsa-devel, linux-kernel, devicetree, Mark Brown, Takashi Iwai,
	Nicolin Chen

On Fri, Jan 29, 2016 at 11:01:00AM +0000, Felipe F. Tonello wrote:
> add cs4271 and cs42727 support for fsl-asoc-card
> 
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 9 +++++++++
>  sound/soc/fsl/Kconfig                                     | 4 ++--
>  sound/soc/fsl/fsl-asoc-card.c                             | 7 +++++++
>  3 files changed, 18 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

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

* Applied "ASoC: fsl-asoc-card: add cs4271 and cs4272 support" to the asoc tree
  2016-01-29 11:01 [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support Felipe F. Tonello
                   ` (2 preceding siblings ...)
  2016-02-01 15:23 ` Rob Herring
@ 2016-02-05 13:35 ` Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-02-05 13:35 UTC (permalink / raw)
  To: Felipe F. Tonello, Nicolin Chen, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: fsl-asoc-card: add cs4271 and cs4272 support

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 57e756d30268a0373cce97165bd57331554f4bfd Mon Sep 17 00:00:00 2001
From: "Felipe F. Tonello" <eu@felipetonello.com>
Date: Fri, 29 Jan 2016 11:01:00 +0000
Subject: [PATCH] ASoC: fsl-asoc-card: add cs4271 and cs4272 support

add cs4271 and cs42727 support for fsl-asoc-card

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 9 +++++++++
 sound/soc/fsl/Kconfig                                     | 4 ++--
 sound/soc/fsl/fsl-asoc-card.c                             | 7 +++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index ce55c0a..943b36d 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -24,6 +24,9 @@ The compatible list for this generic sound card currently:
 
  "fsl,imx-audio-cs42888"
 
+ "fsl,imx-audio-cs427x"
+ (compatible with CS4271 and CS4272)
+
  "fsl,imx-audio-wm8962"
  (compatible with Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt)
 
@@ -61,6 +64,12 @@ Optional properties:
   - audio-asrc		: The phandle of ASRC. It can be absent if there's no
 			  need to add ASRC support via DPCM.
 
+Optional unless SSI is selected as a CPU DAI:
+
+  - mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX)
+
+  - mux-ext-port	: The external port of the i.MX audio muxer
+
 Example:
 sound-cs42888 {
 	compatible = "fsl,imx-audio-cs42888";
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 14dfdee..35aabf9 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -292,8 +292,8 @@ config SND_SOC_FSL_ASOC_CARD
 	select SND_SOC_FSL_SSI
 	help
 	 ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
-	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
-	 and SGTL5000.
+	 ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888,
+	 CS4271, CS4272 and SGTL5000.
 	 Say Y if you want to add support for Freescale Generic ASoC Sound Card.
 
 endif # SND_IMX_SOC
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 3d40797..dffd549 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -28,6 +28,8 @@
 #include "../codecs/wm8962.h"
 #include "../codecs/wm8960.h"
 
+#define CS427x_SYSCLK_MCLK 0
+
 #define RX 0
 #define TX 1
 
@@ -535,6 +537,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
 		priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT;
 		priv->cpu_priv.slot_width = 32;
 		priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
+	} else if (of_device_is_compatible(np, "fsl,imx-audio-cs427x")) {
+		codec_dai_name = "cs4271-hifi";
+		priv->codec_priv.mclk_id = CS427x_SYSCLK_MCLK;
+		priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
 	} else if (of_device_is_compatible(np, "fsl,imx-audio-sgtl5000")) {
 		codec_dai_name = "sgtl5000";
 		priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
@@ -692,6 +698,7 @@ fail:
 static const struct of_device_id fsl_asoc_card_dt_ids[] = {
 	{ .compatible = "fsl,imx-audio-ac97", },
 	{ .compatible = "fsl,imx-audio-cs42888", },
+	{ .compatible = "fsl,imx-audio-cs427x", },
 	{ .compatible = "fsl,imx-audio-sgtl5000", },
 	{ .compatible = "fsl,imx-audio-wm8962", },
 	{ .compatible = "fsl,imx-audio-wm8960", },
-- 
2.6.4

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

end of thread, other threads:[~2016-02-05 13:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29 11:01 [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support Felipe F. Tonello
2016-01-29 11:01 ` [PATCH v2 2/2] devicetree: sound: Fix fsl-asoc-card identation Felipe F. Tonello
2016-01-29 18:02   ` Nicolin Chen
2016-01-31 17:49     ` Felipe Ferreri Tonello
2016-01-29 17:58 ` [PATCH v2 1/2] ASoC: fsl-asoc-card: add cs4271 and cs4272 support Nicolin Chen
2016-01-29 17:58   ` Nicolin Chen
2016-02-01 15:23 ` Rob Herring
2016-02-05 13:35 ` Applied "ASoC: fsl-asoc-card: add cs4271 and cs4272 support" to the asoc tree 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.