Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Add support for OMAP3 EVM
@ 2008-11-21 12:11 Anuj Aggarwal
  2008-11-21 16:33 ` David Brownell
  0 siblings, 1 reply; 9+ messages in thread
From: Anuj Aggarwal @ 2008-11-21 12:11 UTC (permalink / raw)
  To: alsa-devel, linux-omap; +Cc: Anuj Aggarwal

This patch adds ALSA SoC support for OMAP3 EVM using TWL4030 audio codec.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
 sound/soc/omap/Kconfig    |    7 ++
 sound/soc/omap/Makefile   |    2 +
 sound/soc/omap/omap3evm.c |  147 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3evm.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 6c56277..2a2a74e 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -38,5 +38,12 @@ config SND_OMAP_SOC_OMAP2EVM
 	help
 	  Say Y if you want to add support for SoC audio on the omap2evm board.

+config SND_OMAP_SOC_OMAP3EVM
+	tristate "SoC Audio support for OMAP3EVM board"
+	depends on SND_OMAP_SOC && MACH_OMAP3EVM
+	select SND_OMAP_SOC_MCBSP
+	select SND_SOC_TWL4030
+	help
+	  Say Y if you want to add support for SoC audio on the omap3evm board.


diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index f5da3cc..bbb3a77 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,9 +10,11 @@ snd-soc-n810-objs := n810.o
 snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
 snd-soc-omap2evm-objs := omap2evm.o
+snd-soc-omap3evm-objs := omap3evm.o

 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
 obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
+obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o

diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
new file mode 100644
index 0000000..570af55
--- /dev/null
+++ b/sound/soc/omap/omap3evm.c
@@ -0,0 +1,147 @@
+/*
+ * omap3evm.c  -- ALSA SoC support for OMAP3 EVM
+ *
+ * Author: Anuj Aggarwal <anuj.aggarwal@ti.com>
+ *
+ * Based on sound/soc/omap/beagle.c by Steve Sakoman
+ *
+ * Copyright (C) 2008 Texas Instruments, Incorporated
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/clk.h>
+#include <linux/platform_device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <mach/mcbsp.h>
+
+#include "omap-mcbsp.h"
+#include "omap-pcm.h"
+#include "../codecs/twl4030.h"
+
+static int omap3evm_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	int ret;
+
+	/* Set codec DAI configuration */
+	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) {
+		printk(KERN_ERR "can't set codec DAI configuration\n");
+		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_CBM_CFM);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set cpu DAI configuration\n");
+		return ret;
+	}
+
+	/* Set the codec system clock for DAC and ADC */
+	ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
+				     SND_SOC_CLOCK_IN);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set codec system clock\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+static struct snd_soc_ops omap3evm_ops = {
+	.hw_params = omap3evm_hw_params,
+};
+
+/* Digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link omap3evm_dai = {
+	.name = "TWL4030",
+	.stream_name = "TWL4030",
+	.cpu_dai = &omap_mcbsp_dai[0],
+	.codec_dai = &twl4030_dai,
+	.ops = &omap3evm_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_machine snd_soc_machine_omap3evm = {
+	.name = "omap3evm",
+	.dai_link = &omap3evm_dai,
+	.num_links = 1,
+};
+
+/* Audio subsystem */
+static struct snd_soc_device omap3evm_snd_devdata = {
+	.machine = &snd_soc_machine_omap3evm,
+	.platform = &omap_soc_platform,
+	.codec_dev = &soc_codec_dev_twl4030,
+};
+
+static struct platform_device *omap3evm_snd_device;
+
+static int __init omap3evm_soc_init(void)
+{
+	int ret;
+
+	if (!machine_is_omap3evm()) {
+		pr_debug("Not OMAP3 EVM!\n");
+		return -ENODEV;
+	}
+	pr_info("OMAP3 EVM SoC init\n");
+
+	omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
+	if (!omap3evm_snd_device) {
+		printk(KERN_ERR "Platform device allocation failed\n");
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
+	omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
+	*(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; /* McBSP2 */
+
+	ret = platform_device_add(omap3evm_snd_device);
+	if (ret)
+		goto err1;
+
+	return 0;
+
+err1:
+	printk(KERN_ERR "Unable to add platform device\n");
+	platform_device_put(omap3evm_snd_device);
+
+	return ret;
+}
+
+static void __exit omap3evm_soc_exit(void)
+{
+	platform_device_unregister(omap3evm_snd_device);
+}
+
+module_init(omap3evm_soc_init);
+module_exit(omap3evm_soc_exit);
+
+MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>");
+MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM");
+MODULE_LICENSE("GPL");
--
1.6.0.2.1172.ga5ed0


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

* Re: [PATCH] ASoC: Add support for OMAP3 EVM
  2008-11-21 12:11 Anuj Aggarwal
@ 2008-11-21 16:33 ` David Brownell
  0 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2008-11-21 16:33 UTC (permalink / raw)
  To: Anuj Aggarwal; +Cc: alsa-devel, linux-omap

On Friday 21 November 2008, Anuj Aggarwal wrote:
> +config SND_OMAP_SOC_OMAP3EVM
> +       tristate "SoC Audio support for OMAP3EVM board"
> +       depends on SND_OMAP_SOC && MACH_OMAP3EVM

also depends on TWL4030_CORE ... since reverse dependencies
don't work to handle things the "select" target depends on.


> +       select SND_OMAP_SOC_MCBSP
> +       select SND_SOC_TWL4030
> +       help
> +         Say Y if you want to add support for SoC audio on the omap3evm board.

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

* [PATCH] ASoC: Add support for OMAP3 EVM
@ 2008-11-25  5:39 Anuj Aggarwal
  2008-11-25 11:21 ` Jarkko Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Anuj Aggarwal @ 2008-11-25  5:39 UTC (permalink / raw)
  To: alsa-devel, linux-omap; +Cc: Anuj Aggarwal

This patch adds ALSA SoC support for OMAP3 EVM using TWL4030 audio codec.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
 sound/soc/omap/Kconfig    |    7 ++
 sound/soc/omap/Makefile   |    2 +
 sound/soc/omap/omap3evm.c |  147 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3evm.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 6c56277..c465139 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -38,5 +38,12 @@ config SND_OMAP_SOC_OMAP2EVM
 	help
 	  Say Y if you want to add support for SoC audio on the omap2evm board.
 
+config SND_OMAP_SOC_OMAP3EVM
+	tristate "SoC Audio support for OMAP3EVM board"
+	depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3EVM
+	select SND_OMAP_SOC_MCBSP
+	select SND_SOC_TWL4030
+	help
+	  Say Y if you want to add support for SoC audio on the omap3evm board.
 
 
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index f5da3cc..bbb3a77 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,9 +10,11 @@ snd-soc-n810-objs := n810.o
 snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
 snd-soc-omap2evm-objs := omap2evm.o
+snd-soc-omap3evm-objs := omap3evm.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
 obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
+obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
 
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
new file mode 100644
index 0000000..570af55
--- /dev/null
+++ b/sound/soc/omap/omap3evm.c
@@ -0,0 +1,147 @@
+/*
+ * omap3evm.c  -- ALSA SoC support for OMAP3 EVM
+ *
+ * Author: Anuj Aggarwal <anuj.aggarwal@ti.com>
+ *
+ * Based on sound/soc/omap/beagle.c by Steve Sakoman
+ *
+ * Copyright (C) 2008 Texas Instruments, Incorporated
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/clk.h>
+#include <linux/platform_device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <mach/mcbsp.h>
+
+#include "omap-mcbsp.h"
+#include "omap-pcm.h"
+#include "../codecs/twl4030.h"
+
+static int omap3evm_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	int ret;
+
+	/* Set codec DAI configuration */
+	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) {
+		printk(KERN_ERR "can't set codec DAI configuration\n");
+		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_CBM_CFM);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set cpu DAI configuration\n");
+		return ret;
+	}
+
+	/* Set the codec system clock for DAC and ADC */
+	ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
+				     SND_SOC_CLOCK_IN);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set codec system clock\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+static struct snd_soc_ops omap3evm_ops = {
+	.hw_params = omap3evm_hw_params,
+};
+
+/* Digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link omap3evm_dai = {
+	.name = "TWL4030",
+	.stream_name = "TWL4030",
+	.cpu_dai = &omap_mcbsp_dai[0],
+	.codec_dai = &twl4030_dai,
+	.ops = &omap3evm_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_machine snd_soc_machine_omap3evm = {
+	.name = "omap3evm",
+	.dai_link = &omap3evm_dai,
+	.num_links = 1,
+};
+
+/* Audio subsystem */
+static struct snd_soc_device omap3evm_snd_devdata = {
+	.machine = &snd_soc_machine_omap3evm,
+	.platform = &omap_soc_platform,
+	.codec_dev = &soc_codec_dev_twl4030,
+};
+
+static struct platform_device *omap3evm_snd_device;
+
+static int __init omap3evm_soc_init(void)
+{
+	int ret;
+
+	if (!machine_is_omap3evm()) {
+		pr_debug("Not OMAP3 EVM!\n");
+		return -ENODEV;
+	}
+	pr_info("OMAP3 EVM SoC init\n");
+
+	omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
+	if (!omap3evm_snd_device) {
+		printk(KERN_ERR "Platform device allocation failed\n");
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
+	omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
+	*(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; /* McBSP2 */
+
+	ret = platform_device_add(omap3evm_snd_device);
+	if (ret)
+		goto err1;
+
+	return 0;
+
+err1:
+	printk(KERN_ERR "Unable to add platform device\n");
+	platform_device_put(omap3evm_snd_device);
+
+	return ret;
+}
+
+static void __exit omap3evm_soc_exit(void)
+{
+	platform_device_unregister(omap3evm_snd_device);
+}
+
+module_init(omap3evm_soc_init);
+module_exit(omap3evm_soc_exit);
+
+MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>");
+MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM");
+MODULE_LICENSE("GPL");
-- 
1.5.6


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

* Re: [PATCH] ASoC: Add support for OMAP3 EVM
  2008-11-25  5:39 [PATCH] ASoC: Add support for OMAP3 EVM Anuj Aggarwal
@ 2008-11-25 11:21 ` Jarkko Nikula
  2008-11-25 14:52   ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Jarkko Nikula @ 2008-11-25 11:21 UTC (permalink / raw)
  To: ext Anuj Aggarwal; +Cc: alsa-devel, linux-omap, ext Misael Lopez Cruz

On Tue, 25 Nov 2008 11:09:37 +0530
"ext Anuj Aggarwal" <anuj.aggarwal@ti.com> wrote:

> This patch adds ALSA SoC support for OMAP3 EVM using TWL4030 audio codec.
> 
I don't know about audio connections in all of these OMAP2 & OMAP3 EVM's
& SDP's but would it be jsut possible to re-use
sound/soc/omap/omap3beagle.c?

Or if those EVM's & SDP's can route TWL4030 audio connections more
flexible than Beagle but somewhat similar manner, then probably have one
single machine driver for all EVM's?

Otherwise it doesn't make very much sense to have n similar machine
drivers where only functions and variable names differ.


Jarkko

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

* Re: [PATCH] ASoC: Add support for OMAP3 EVM
  2008-11-25 11:21 ` Jarkko Nikula
@ 2008-11-25 14:52   ` Mark Brown
  2009-02-25 20:25     ` [alsa-devel] " George G. Davis
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2008-11-25 14:52 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: ext Anuj Aggarwal, alsa-devel, linux-omap, ext Misael Lopez Cruz

On Tue, Nov 25, 2008 at 01:21:20PM +0200, Jarkko Nikula wrote:

> Or if those EVM's & SDP's can route TWL4030 audio connections more
> flexible than Beagle but somewhat similar manner, then probably have one
> single machine driver for all EVM's?

> Otherwise it doesn't make very much sense to have n similar machine
> drivers where only functions and variable names differ.

Yes, it looks like a lot of these drivers could be redone along the
lines of s3c24xx_uda134x.c with platform data specifying the differences
between the boards.

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

* Re: [alsa-devel] [PATCH] ASoC: Add support for OMAP3 EVM
  2008-11-25 14:52   ` Mark Brown
@ 2009-02-25 20:25     ` George G. Davis
  2009-02-25 20:27       ` Mark Brown
  2009-02-26  7:36       ` Peter Ujfalusi
  0 siblings, 2 replies; 9+ messages in thread
From: George G. Davis @ 2009-02-25 20:25 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jarkko Nikula, ext Anuj Aggarwal, alsa-devel, linux-omap,
	ext Misael Lopez Cruz

Hi,

On Tue, Nov 25, 2008 at 02:52:58PM +0000, Mark Brown wrote:
> On Tue, Nov 25, 2008 at 01:21:20PM +0200, Jarkko Nikula wrote:
> 
> > Or if those EVM's & SDP's can route TWL4030 audio connections more
> > flexible than Beagle but somewhat similar manner, then probably have one
> > single machine driver for all EVM's?
> 
> > Otherwise it doesn't make very much sense to have n similar machine
> > drivers where only functions and variable names differ.
> 
> Yes, it looks like a lot of these drivers could be redone along the
> lines of s3c24xx_uda134x.c with platform data specifying the differences
> between the boards.

Is someone working on updating ASoC drivers for OMAP TWL4030 based
boards as recommended above?  Just curious since I already made the
mistake of creating my own OMAP3 EVM ASoC driver w/o checking the
list first.  : /

--
Regards,
George

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

* Re: [alsa-devel] [PATCH] ASoC: Add support for OMAP3 EVM
  2009-02-25 20:25     ` [alsa-devel] " George G. Davis
@ 2009-02-25 20:27       ` Mark Brown
  2009-02-26  7:18         ` Jarkko Nikula
  2009-02-26  7:36       ` Peter Ujfalusi
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2009-02-25 20:27 UTC (permalink / raw)
  To: George G. Davis
  Cc: Jarkko Nikula, ext Anuj Aggarwal, alsa-devel, linux-omap,
	ext Misael Lopez Cruz

On Wed, Feb 25, 2009 at 03:25:59PM -0500, George G. Davis wrote:

> Is someone working on updating ASoC drivers for OMAP TWL4030 based
> boards as recommended above?  Just curious since I already made the
> mistake of creating my own OMAP3 EVM ASoC driver w/o checking the
> list first.  : /

Not to my knowledge.

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

* Re: [PATCH] ASoC: Add support for OMAP3 EVM
  2009-02-25 20:27       ` Mark Brown
@ 2009-02-26  7:18         ` Jarkko Nikula
  0 siblings, 0 replies; 9+ messages in thread
From: Jarkko Nikula @ 2009-02-26  7:18 UTC (permalink / raw)
  To: ext Mark Brown
  Cc: George G. Davis, alsa-devel@alsa-project.org, stanley.miao,
	ext Anuj Aggarwal, linux-omap@vger.kernel.org,
	ext Misael Lopez Cruz

On Wed, 25 Feb 2009 21:27:44 +0100
ext Mark Brown <broonie@sirena.org.uk> wrote:

> On Wed, Feb 25, 2009 at 03:25:59PM -0500, George G. Davis wrote:
> 
> > Is someone working on updating ASoC drivers for OMAP TWL4030 based
> > boards as recommended above?  Just curious since I already made the
> > mistake of creating my own OMAP3 EVM ASoC driver w/o checking the
> > list first.  : /
> 
> Not to my knowledge.

Stanley Miao started to do some early development on this:

http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012946.html
http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012995.html

IRCC this work was let to aside to develop since there were some slight
differencies between the boards and also TWL4030 didn't contain all the
features. Stanley, do you remember better?

Probably now there is a better change after tons of generic TWL4030
patches and TWL4030 codec updates from Peter Ujfalusi.


Jarkko

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

* Re: [PATCH] ASoC: Add support for OMAP3 EVM
  2009-02-25 20:25     ` [alsa-devel] " George G. Davis
  2009-02-25 20:27       ` Mark Brown
@ 2009-02-26  7:36       ` Peter Ujfalusi
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2009-02-26  7:36 UTC (permalink / raw)
  To: ext George G. Davis
  Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki),
	Mark Brown, ext Anuj Aggarwal, linux-omap@vger.kernel.org,
	ext Misael Lopez Cruz

On Wednesday 25 February 2009 22:25:59 ext George G. Davis wrote:
> Hi,
>
> On Tue, Nov 25, 2008 at 02:52:58PM +0000, Mark Brown wrote:
> > On Tue, Nov 25, 2008 at 01:21:20PM +0200, Jarkko Nikula wrote:
> > > Or if those EVM's & SDP's can route TWL4030 audio connections more
> > > flexible than Beagle but somewhat similar manner, then probably have
> > > one single machine driver for all EVM's?
> > >
> > > Otherwise it doesn't make very much sense to have n similar machine
> > > drivers where only functions and variable names differ.
> >
> > Yes, it looks like a lot of these drivers could be redone along the
> > lines of s3c24xx_uda134x.c with platform data specifying the differences
> > between the boards.
>
> Is someone working on updating ASoC drivers for OMAP TWL4030 based
> boards as recommended above?  Just curious since I already made the
> mistake of creating my own OMAP3 EVM ASoC driver w/o checking the
> list first.  : /

Well, I have checked the s3c24xx_uda134x.c and the corresponding uda134x.c 
codec driver. In case of the uda134x codec - since it does not have DAPM 
implementation, the board file does not need to deal with the output/input 
pins.
In case of boards using the TWL4030 codec it is not that simple IMHO.
You see TWL4030 has nine output 'pins' and six (plus 2x stereo digital mic) 
input 'pins'. 
So, yes it is doable, but will it make things cleaner and more manageable?
Few things came to my mind, which needs to be addressed:
1. Who is the master (OMAP McBSP or TWL4030)?
2. What is the reference clock in the given board
3.  Connected pins (or not connected pins)
4.  I2S or TDM mode (this is not implemented yet, but it is coming at some 
point)

It easy to provide 1, 2 and 4. But when it comes to 3... One needs to build up 
the DAPM routes in the common board file for the supported boards, which again 
doable based on - for example  - some model/board ID, but I think it will look 
ugly.

Or I might over complicate things ;) 

> --
> Regards,
> George

-- 
Péter

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

end of thread, other threads:[~2009-02-26  7:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25  5:39 [PATCH] ASoC: Add support for OMAP3 EVM Anuj Aggarwal
2008-11-25 11:21 ` Jarkko Nikula
2008-11-25 14:52   ` Mark Brown
2009-02-25 20:25     ` [alsa-devel] " George G. Davis
2009-02-25 20:27       ` Mark Brown
2009-02-26  7:18         ` Jarkko Nikula
2009-02-26  7:36       ` Peter Ujfalusi
  -- strict thread matches above, loose matches on Subject: below --
2008-11-21 12:11 Anuj Aggarwal
2008-11-21 16:33 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox