alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver
@ 2011-12-30 15:41 Axel Lin
  2011-12-30 15:42 ` [PATCH 2/4] ASoC: Use dai_fmt in spitz " Axel Lin
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Axel Lin @ 2011-12-30 15:41 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/saarb.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/sound/soc/pxa/saarb.c b/sound/soc/pxa/saarb.c
index 2e21712..b2be225 100644
--- a/sound/soc/pxa/saarb.c
+++ b/sound/soc/pxa/saarb.c
@@ -92,15 +92,6 @@ static int saarb_i2s_hw_params(struct snd_pcm_substream *substream,
 	if (ret < 0)
 		return ret;
 
-	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
-			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
-	if (ret < 0)
-		return ret;
-	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
-			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
-	if (ret < 0)
-		return ret;
-
 	ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width);
 
 	return ret;
@@ -119,6 +110,8 @@ static struct snd_soc_dai_link saarb_dai[] = {
 		.platform_name	= "pxa-pcm-audio",
 		.codec_name	= "88pm860x-codec",
 		.init		= saarb_pm860x_init,
+		.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+				  SND_SOC_DAIFMT_CBM_CFM,
 		.ops		= &saarb_i2s_ops,
 	},
 };
-- 
1.7.5.4

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

* [PATCH 2/4] ASoC: Use dai_fmt in spitz machine driver
  2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
@ 2011-12-30 15:42 ` Axel Lin
  2011-12-31  0:17   ` Haojian Zhuang
  2011-12-30 15:43 ` [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 " Axel Lin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Axel Lin @ 2011-12-30 15:42 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/spitz.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index bb06048..76288ad 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -143,18 +143,6 @@ static int spitz_hw_params(struct snd_pcm_substream *substream,
 		break;
 	}
 
-	/* set codec DAI configuration */
-	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
-		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
-	if (ret < 0)
-		return ret;
-
-	/* set cpu DAI configuration */
-	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
-		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
-	if (ret < 0)
-		return ret;
-
 	/* set the codec system clock for DAC and ADC */
 	ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
 		SND_SOC_CLOCK_IN);
@@ -313,6 +301,8 @@ static struct snd_soc_dai_link spitz_dai = {
 	.platform_name = "pxa-pcm-audio",
 	.codec_name = "wm8750.0-001b",
 	.init = spitz_wm8750_init,
+	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+		   SND_SOC_DAIFMT_CBS_CFS,
 	.ops = &spitz_ops,
 };
 
-- 
1.7.5.4

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

* [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 machine driver
  2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
  2011-12-30 15:42 ` [PATCH 2/4] ASoC: Use dai_fmt in spitz " Axel Lin
@ 2011-12-30 15:43 ` Axel Lin
  2011-12-31  0:18   ` Haojian Zhuang
  2011-12-30 15:44 ` [PATCH 4/4] ASoC: Use dai_fmt in z2 " Axel Lin
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Axel Lin @ 2011-12-30 15:43 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/tavorevb3.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/sound/soc/pxa/tavorevb3.c b/sound/soc/pxa/tavorevb3.c
index 4bef12c..46ac1fe 100644
--- a/sound/soc/pxa/tavorevb3.c
+++ b/sound/soc/pxa/tavorevb3.c
@@ -92,16 +92,6 @@ static int evb3_i2s_hw_params(struct snd_pcm_substream *substream,
 	if (ret < 0)
 		return ret;
 
-	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
-			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
-	if (ret < 0)
-		return ret;
-
-	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
-			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
-	if (ret < 0)
-		return ret;
-
 	ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width);
 	return ret;
 }
@@ -119,6 +109,8 @@ static struct snd_soc_dai_link evb3_dai[] = {
 		.platform_name	= "pxa-pcm-audio",
 		.codec_name	= "88pm860x-codec",
 		.init		= evb3_pm860x_init,
+		.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+				  SND_SOC_DAIFMT_CBM_CFM,
 		.ops		= &evb3_i2s_ops,
 	},
 };
-- 
1.7.5.4

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

* [PATCH 4/4] ASoC: Use dai_fmt in z2 machine driver
  2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
  2011-12-30 15:42 ` [PATCH 2/4] ASoC: Use dai_fmt in spitz " Axel Lin
  2011-12-30 15:43 ` [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 " Axel Lin
@ 2011-12-30 15:44 ` Axel Lin
  2011-12-31  0:19   ` Haojian Zhuang
  2011-12-31  0:17 ` [PATCH 1/4] ASoC: Use dai_fmt in saarb " Haojian Zhuang
  2012-01-02 12:44 ` Mark Brown
  4 siblings, 1 reply; 9+ messages in thread
From: Axel Lin @ 2011-12-30 15:44 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/z2.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c
index d6807e0..e8f15ce 100644
--- a/sound/soc/pxa/z2.c
+++ b/sound/soc/pxa/z2.c
@@ -56,18 +56,6 @@ static int z2_hw_params(struct snd_pcm_substream *substream,
 		break;
 	}
 
-	/* set codec DAI configuration */
-	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
-		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
-	if (ret < 0)
-		return ret;
-
-	/* set cpu DAI configuration */
-	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
-		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
-	if (ret < 0)
-		return ret;
-
 	/* set the codec system clock for DAC and ADC */
 	ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
 		SND_SOC_CLOCK_IN);
@@ -196,6 +184,8 @@ static struct snd_soc_dai_link z2_dai = {
 	.platform_name = "pxa-pcm-audio",
 	.codec_name	= "wm8750.0-001b",
 	.init		= z2_wm8750_init,
+	.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+			  SND_SOC_DAIFMT_CBS_CFS,
 	.ops		= &z2_ops,
 };
 
-- 
1.7.5.4

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

* Re: [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver
  2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
                   ` (2 preceding siblings ...)
  2011-12-30 15:44 ` [PATCH 4/4] ASoC: Use dai_fmt in z2 " Axel Lin
@ 2011-12-31  0:17 ` Haojian Zhuang
  2012-01-02 12:44 ` Mark Brown
  4 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2011-12-31  0:17 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

On Fri, Dec 30, 2011 at 11:41 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/pxa/saarb.c |   11 ++---------
>  1 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/sound/soc/pxa/saarb.c b/sound/soc/pxa/saarb.c
> index 2e21712..b2be225 100644
> --- a/sound/soc/pxa/saarb.c
> +++ b/sound/soc/pxa/saarb.c
> @@ -92,15 +92,6 @@ static int saarb_i2s_hw_params(struct snd_pcm_substream *substream,
>        if (ret < 0)
>                return ret;
>
> -       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
> -                       SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -       if (ret < 0)
> -               return ret;
> -       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> -                       SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -       if (ret < 0)
> -               return ret;
> -
>        ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width);
>
>        return ret;
> @@ -119,6 +110,8 @@ static struct snd_soc_dai_link saarb_dai[] = {
>                .platform_name  = "pxa-pcm-audio",
>                .codec_name     = "88pm860x-codec",
>                .init           = saarb_pm860x_init,
> +               .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> +                                 SND_SOC_DAIFMT_CBM_CFM,
>                .ops            = &saarb_i2s_ops,
>        },
>  };
> --
> 1.7.5.4
>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

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

* Re: [PATCH 2/4] ASoC: Use dai_fmt in spitz machine driver
  2011-12-30 15:42 ` [PATCH 2/4] ASoC: Use dai_fmt in spitz " Axel Lin
@ 2011-12-31  0:17   ` Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2011-12-31  0:17 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

On Fri, Dec 30, 2011 at 11:42 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/pxa/spitz.c |   14 ++------------
>  1 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
> index bb06048..76288ad 100644
> --- a/sound/soc/pxa/spitz.c
> +++ b/sound/soc/pxa/spitz.c
> @@ -143,18 +143,6 @@ static int spitz_hw_params(struct snd_pcm_substream *substream,
>                break;
>        }
>
> -       /* set codec DAI configuration */
> -       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> -               SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
> -       if (ret < 0)
> -               return ret;
> -
> -       /* set cpu DAI configuration */
> -       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
> -               SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
> -       if (ret < 0)
> -               return ret;
> -
>        /* set the codec system clock for DAC and ADC */
>        ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
>                SND_SOC_CLOCK_IN);
> @@ -313,6 +301,8 @@ static struct snd_soc_dai_link spitz_dai = {
>        .platform_name = "pxa-pcm-audio",
>        .codec_name = "wm8750.0-001b",
>        .init = spitz_wm8750_init,
> +       .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> +                  SND_SOC_DAIFMT_CBS_CFS,
>        .ops = &spitz_ops,
>  };
>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

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

* Re: [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 machine driver
  2011-12-30 15:43 ` [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 " Axel Lin
@ 2011-12-31  0:18   ` Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2011-12-31  0:18 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

On Fri, Dec 30, 2011 at 11:43 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/pxa/tavorevb3.c |   12 ++----------
>  1 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/sound/soc/pxa/tavorevb3.c b/sound/soc/pxa/tavorevb3.c
> index 4bef12c..46ac1fe 100644
> --- a/sound/soc/pxa/tavorevb3.c
> +++ b/sound/soc/pxa/tavorevb3.c
> @@ -92,16 +92,6 @@ static int evb3_i2s_hw_params(struct snd_pcm_substream *substream,
>        if (ret < 0)
>                return ret;
>
> -       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
> -                       SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -       if (ret < 0)
> -               return ret;
> -
> -       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> -                       SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -       if (ret < 0)
> -               return ret;
> -
>        ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width);
>        return ret;
>  }
> @@ -119,6 +109,8 @@ static struct snd_soc_dai_link evb3_dai[] = {
>                .platform_name  = "pxa-pcm-audio",
>                .codec_name     = "88pm860x-codec",
>                .init           = evb3_pm860x_init,
> +               .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> +                                 SND_SOC_DAIFMT_CBM_CFM,
>                .ops            = &evb3_i2s_ops,
>        },
>  };
> --
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

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

* Re: [PATCH 4/4] ASoC: Use dai_fmt in z2 machine driver
  2011-12-30 15:44 ` [PATCH 4/4] ASoC: Use dai_fmt in z2 " Axel Lin
@ 2011-12-31  0:19   ` Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2011-12-31  0:19 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Eric Miao, Haojian Zhuang, Liam Girdwood

On Fri, Dec 30, 2011 at 11:44 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/pxa/z2.c |   14 ++------------
>  1 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c
> index d6807e0..e8f15ce 100644
> --- a/sound/soc/pxa/z2.c
> +++ b/sound/soc/pxa/z2.c
> @@ -56,18 +56,6 @@ static int z2_hw_params(struct snd_pcm_substream *substream,
>                break;
>        }
>
> -       /* set codec DAI configuration */
> -       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> -               SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
> -       if (ret < 0)
> -               return ret;
> -
> -       /* set cpu DAI configuration */
> -       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
> -               SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
> -       if (ret < 0)
> -               return ret;
> -
>        /* set the codec system clock for DAC and ADC */
>        ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
>                SND_SOC_CLOCK_IN);
> @@ -196,6 +184,8 @@ static struct snd_soc_dai_link z2_dai = {
>        .platform_name = "pxa-pcm-audio",
>        .codec_name     = "wm8750.0-001b",
>        .init           = z2_wm8750_init,
> +       .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> +                         SND_SOC_DAIFMT_CBS_CFS,
>        .ops            = &z2_ops,
>  };
>
> --
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

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

* Re: [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver
  2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
                   ` (3 preceding siblings ...)
  2011-12-31  0:17 ` [PATCH 1/4] ASoC: Use dai_fmt in saarb " Haojian Zhuang
@ 2012-01-02 12:44 ` Mark Brown
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-01-02 12:44 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Eric Miao, Haojian Zhuang, Liam Girdwood

On Fri, Dec 30, 2011 at 11:41:54PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied all, thanks.

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

end of thread, other threads:[~2012-01-02 12:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-30 15:41 [PATCH 1/4] ASoC: Use dai_fmt in saarb machine driver Axel Lin
2011-12-30 15:42 ` [PATCH 2/4] ASoC: Use dai_fmt in spitz " Axel Lin
2011-12-31  0:17   ` Haojian Zhuang
2011-12-30 15:43 ` [PATCH 3/4] ASoC: Use dai_fmt in tavorevb3 " Axel Lin
2011-12-31  0:18   ` Haojian Zhuang
2011-12-30 15:44 ` [PATCH 4/4] ASoC: Use dai_fmt in z2 " Axel Lin
2011-12-31  0:19   ` Haojian Zhuang
2011-12-31  0:17 ` [PATCH 1/4] ASoC: Use dai_fmt in saarb " Haojian Zhuang
2012-01-02 12:44 ` Mark Brown

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).