alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsi: Add specified ID for soc-audio
@ 2010-07-16 10:51 Kuninori Morimoto
  2010-07-17 17:42 ` Liam Girdwood
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2010-07-16 10:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Liam Girdwood

Specified ID is necessary, when some codecs are used with FSI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Mark. Thank you about your advice.
it solved my issue.
This patch is v2 of "ASoC: FSI - codecs settings"

 include/sound/sh_fsi.h    |    3 +++
 sound/soc/sh/fsi-ak4642.c |    4 ++--
 sound/soc/sh/fsi-da7210.c |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h
index c022736..6463fd6 100644
--- a/include/sound/sh_fsi.h
+++ b/include/sound/sh_fsi.h
@@ -12,6 +12,9 @@
  * published by the Free Software Foundation.
  */
 
+#define FSI_PORT_A	0
+#define FSI_PORT_B	1
+
 /* flags format
 
  * 0xABCDEEFF
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index be01854..2c61ed2 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -38,7 +38,7 @@ static int fsi_ak4642_dai_init(struct snd_soc_codec *codec)
 static struct snd_soc_dai_link fsi_dai_link = {
 	.name		= "AK4642",
 	.stream_name	= "AK4642",
-	.cpu_dai	= &fsi_soc_dai[0], /* fsi */
+	.cpu_dai	= &fsi_soc_dai[FSI_PORT_A],
 	.codec_dai	= &ak4642_dai,
 	.init		= fsi_ak4642_dai_init,
 	.ops		= NULL,
@@ -62,7 +62,7 @@ static int __init fsi_ak4642_init(void)
 {
 	int ret = -ENOMEM;
 
-	fsi_snd_device = platform_device_alloc("soc-audio", -1);
+	fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_A);
 	if (!fsi_snd_device)
 		goto out;
 
diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c
index 33b4d17..5774449 100644
--- a/sound/soc/sh/fsi-da7210.c
+++ b/sound/soc/sh/fsi-da7210.c
@@ -33,7 +33,7 @@ static int fsi_da7210_init(struct snd_soc_codec *codec)
 static struct snd_soc_dai_link fsi_da7210_dai = {
 	.name		= "DA7210",
 	.stream_name	= "DA7210",
-	.cpu_dai	= &fsi_soc_dai[1], /* FSI B */
+	.cpu_dai	= &fsi_soc_dai[FSI_PORT_B],
 	.codec_dai	= &da7210_dai,
 	.init		= fsi_da7210_init,
 };
@@ -56,7 +56,7 @@ static int __init fsi_da7210_sound_init(void)
 {
 	int ret;
 
-	fsi_da7210_snd_device = platform_device_alloc("soc-audio", -1);
+	fsi_da7210_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
 	if (!fsi_da7210_snd_device)
 		return -ENOMEM;
 
-- 
1.7.0.4

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

* Re: [PATCH] ASoC: fsi: Add specified ID for soc-audio
  2010-07-16 10:51 [PATCH] ASoC: fsi: Add specified ID for soc-audio Kuninori Morimoto
@ 2010-07-17 17:42 ` Liam Girdwood
  2010-07-17 18:47   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Liam Girdwood @ 2010-07-17 17:42 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown

On Fri, 2010-07-16 at 19:51 +0900, Kuninori Morimoto wrote:
> Specified ID is necessary, when some codecs are used with FSI.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> Mark. Thank you about your advice.
> it solved my issue.
> This patch is v2 of "ASoC: FSI - codecs settings"
> 
>  include/sound/sh_fsi.h    |    3 +++
>  sound/soc/sh/fsi-ak4642.c |    4 ++--
>  sound/soc/sh/fsi-da7210.c |    4 ++--
>  3 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h
> index c022736..6463fd6 100644
> --- a/include/sound/sh_fsi.h
> +++ b/include/sound/sh_fsi.h
> @@ -12,6 +12,9 @@
>   * published by the Free Software Foundation.
>   */
>  
> +#define FSI_PORT_A	0
> +#define FSI_PORT_B	1
> +
>  /* flags format
>  
>   * 0xABCDEEFF
> diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
> index be01854..2c61ed2 100644
> --- a/sound/soc/sh/fsi-ak4642.c
> +++ b/sound/soc/sh/fsi-ak4642.c
> @@ -38,7 +38,7 @@ static int fsi_ak4642_dai_init(struct snd_soc_codec *codec)
>  static struct snd_soc_dai_link fsi_dai_link = {
>  	.name		= "AK4642",
>  	.stream_name	= "AK4642",
> -	.cpu_dai	= &fsi_soc_dai[0], /* fsi */
> +	.cpu_dai	= &fsi_soc_dai[FSI_PORT_A],
>  	.codec_dai	= &ak4642_dai,
>  	.init		= fsi_ak4642_dai_init,
>  	.ops		= NULL,
> @@ -62,7 +62,7 @@ static int __init fsi_ak4642_init(void)
>  {
>  	int ret = -ENOMEM;
>  
> -	fsi_snd_device = platform_device_alloc("soc-audio", -1);
> +	fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_A);
>  	if (!fsi_snd_device)
>  		goto out;
>  
> diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c
> index 33b4d17..5774449 100644
> --- a/sound/soc/sh/fsi-da7210.c
> +++ b/sound/soc/sh/fsi-da7210.c
> @@ -33,7 +33,7 @@ static int fsi_da7210_init(struct snd_soc_codec *codec)
>  static struct snd_soc_dai_link fsi_da7210_dai = {
>  	.name		= "DA7210",
>  	.stream_name	= "DA7210",
> -	.cpu_dai	= &fsi_soc_dai[1], /* FSI B */
> +	.cpu_dai	= &fsi_soc_dai[FSI_PORT_B],
>  	.codec_dai	= &da7210_dai,
>  	.init		= fsi_da7210_init,
>  };
> @@ -56,7 +56,7 @@ static int __init fsi_da7210_sound_init(void)
>  {
>  	int ret;
>  
> -	fsi_da7210_snd_device = platform_device_alloc("soc-audio", -1);
> +	fsi_da7210_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
>  	if (!fsi_da7210_snd_device)
>  		return -ENOMEM;
>  

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

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

* Re: [PATCH] ASoC: fsi: Add specified ID for soc-audio
  2010-07-17 17:42 ` Liam Girdwood
@ 2010-07-17 18:47   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2010-07-17 18:47 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: Linux-ALSA, Kuninori Morimoto

On Sat, Jul 17, 2010 at 06:42:37PM +0100, Liam Girdwood wrote:
> On Fri, 2010-07-16 at 19:51 +0900, Kuninori Morimoto wrote:
> > Specified ID is necessary, when some codecs are used with FSI.

> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

Applied, thanks!

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

end of thread, other threads:[~2010-07-17 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 10:51 [PATCH] ASoC: fsi: Add specified ID for soc-audio Kuninori Morimoto
2010-07-17 17:42 ` Liam Girdwood
2010-07-17 18:47   ` 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).