linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/10] ARM: mxs: add audio support
@ 2011-07-20  3:41 Dong Aisheng
  2011-07-20  3:41 ` [PATCH v4 01/10] ASoc: mxs: add mxs-pcm driver Dong Aisheng
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Dong Aisheng @ 2011-07-20  3:41 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series is to add audio support based on saif for mxs platform.
The driver only supports playback currently.
For capturing, due to hardware limitation that we have to use two saif
instances to implement full duplex (playback & recording), we need to
figure out a good design to fit in ASoC as the following work.

In addition, we simply just support master mode since saif tx can
only work as a master due to hw limitation(rx can work in both
master & slave mode).

Code is written based on the branch imx-for-3.1 in sascha's tree
http://git.pengutronix.de/git/imx/linux-2.6.git

Tested on MX28EVK.

For the ASoC-patches (1-4):
 Tested-by: Wolfram Sang <w.sang@pengutronix.de>
For the mach-mxs-Patches (5-10):
 Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>

Changes since v3:
This version only has one patch changed with another two for rebase
the changed one.
 * [PATCH v4 06/10] ARM: mxs: add saif device
	Drop DIGCTRL-handling based on Wolfram's comment
 * [PATCH v4 07/10] ARM: mxs: add sgtl5000 i2c device
 	Resend for rebase [PATCH v4 06/10] ARM: mxs: add saif device
 * [PATCH v4 08/10] ARM: mxs: add mxs-sgtl5000 device
 	Resend for rebase [PATCH v4 06/10] ARM: mxs: add saif device

changes since v2:
 * mxs-pcm
    - fix wrong periods_max.
    - For robustness replace the channels_min check with a check
      for the relevant substream being present
 * mxs-saif
    - Add IRQ_NONE handle
    - improve mxs_saif_set_clk to make it more easy to read
    - correct return value
    - request_irq sequence changed to after ioremap
 * mxs-sgtl5000
    - clean up a few unused code
 * Kconfig&Makefile
    - SND_SOC_MXS_SGTL5000 should depend on I2C in Kconfig
 * mxs
    - Select MXS_I2C in kconfig for mxs-sgtl5000

changes since v1:
 * export saif mclk control interface to machine driver.
   Machine driver can decide whether it needs to use mclk supplied by
   saif according to its requirement.
 * error checking improvement
 * remove a few unneccesary code

Dong Aisheng (10):
  ASoc: mxs: add mxs-pcm driver
  ASoc: mxs: add mxs-saif driver
  ASoc: mxs: add mxs-sgtl5000 machine driver
  ASoc: mxs: add asoc configuration files
  ARM: mxs: add saif clock
  ARM: mxs: add saif device
  ARM: mxs: add sgtl5000 i2c device
  ARM: mxs: add mxs-sgtl5000 device
  ARM: mxs: correct the using of frac div for saif
  ARM: mxs-dma: include <linux/dmaengine.h>

 arch/arm/mach-mxs/Kconfig                       |    2 +
 arch/arm/mach-mxs/clock-mx28.c                  |    8 +-
 arch/arm/mach-mxs/devices-mx28.h                |    3 +
 arch/arm/mach-mxs/devices/Kconfig               |    3 +
 arch/arm/mach-mxs/devices/Makefile              |    1 +
 arch/arm/mach-mxs/devices/platform-mxs-saif.c   |   60 ++
 arch/arm/mach-mxs/include/mach/devices-common.h |   12 +
 arch/arm/mach-mxs/include/mach/dma.h            |    2 +
 arch/arm/mach-mxs/mach-mx28evk.c                |   35 ++
 sound/soc/Kconfig                               |    1 +
 sound/soc/Makefile                              |    1 +
 sound/soc/mxs/Kconfig                           |   20 +
 sound/soc/mxs/Makefile                          |   10 +
 sound/soc/mxs/mxs-pcm.c                         |  359 ++++++++++++
 sound/soc/mxs/mxs-pcm.h                         |   43 ++
 sound/soc/mxs/mxs-saif.c                        |  677 +++++++++++++++++++++++
 sound/soc/mxs/mxs-saif.h                        |  130 +++++
 sound/soc/mxs/mxs-sgtl5000.c                    |  165 ++++++
 18 files changed, 1530 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-mxs/devices/platform-mxs-saif.c
 create mode 100644 sound/soc/mxs/Kconfig
 create mode 100644 sound/soc/mxs/Makefile
 create mode 100644 sound/soc/mxs/mxs-pcm.c
 create mode 100644 sound/soc/mxs/mxs-pcm.h
 create mode 100644 sound/soc/mxs/mxs-saif.c
 create mode 100644 sound/soc/mxs/mxs-saif.h
 create mode 100644 sound/soc/mxs/mxs-sgtl5000.c

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v3 07/10] ARM: mxs: add sgtl5000 i2c device
@ 2011-07-15 12:09 Dong Aisheng
  2011-07-19  4:35 ` [PATCH v4 " Dong Aisheng
  0 siblings, 1 reply; 17+ messages in thread
From: Dong Aisheng @ 2011-07-15 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-mxs/Kconfig        |    1 +
 arch/arm/mach-mxs/mach-mx28evk.c |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 405c28d..2de2ea1 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -49,6 +49,7 @@ config MACH_MX28EVK
 	select MXS_HAVE_PLATFORM_MXS_MMC
 	select MXS_HAVE_PLATFORM_MXSFB
 	select MXS_HAVE_PLATFORM_MXS_SAIF
+	select MXS_HAVE_PLATFORM_MXS_I2C
 	select MXS_OCOTP
 	help
 	  Include support for MX28EVK platform. This includes specific
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 7837a87..491cf0d 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -18,6 +18,7 @@
 #include <linux/leds.h>
 #include <linux/irq.h>
 #include <linux/clk.h>
+#include <linux/i2c.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -186,6 +187,12 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
 	/* led */
 	MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL,
 
+	/* I2C */
+	MX28_PAD_I2C0_SCL__I2C0_SCL |
+		(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+	MX28_PAD_I2C0_SDA__I2C0_SDA |
+		(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+
 	/* saif0 & saif1 */
 	MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
 		(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
@@ -366,6 +373,12 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
 	},
 };
 
+static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
+	{
+		I2C_BOARD_INFO("sgtl5000", 0x0a),
+	},
+};
+
 static void __init mx28evk_init(void)
 {
 	int ret;
@@ -409,6 +422,10 @@ static void __init mx28evk_init(void)
 	mx28_add_saif(0);
 	mx28_add_saif(1);
 
+	mx28_add_mxs_i2c(0);
+	i2c_register_board_info(0, mxs_i2c0_board_info,
+				ARRAY_SIZE(mxs_i2c0_board_info));
+
 	/*set the saif clk mux, both saif0/saif1 use saif0 clk*/
 	__raw_writel(0x2 << 10, DIGCTRL_BASE_ADDR);
 
-- 
1.7.0.4

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

end of thread, other threads:[~2011-07-20 16:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20  3:41 [PATCH v4 00/10] ARM: mxs: add audio support Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 01/10] ASoc: mxs: add mxs-pcm driver Dong Aisheng
2011-07-20 16:17   ` Liam Girdwood
2011-07-20 16:49     ` [alsa-devel] " Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 02/10] ASoc: mxs: add mxs-saif driver Dong Aisheng
2011-07-20 16:21   ` Liam Girdwood
2011-07-20 16:43     ` [alsa-devel] " Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 03/10] ASoc: mxs: add mxs-sgtl5000 machine driver Dong Aisheng
2011-07-20  3:28   ` [alsa-devel] " Tabi Timur-B04825
2011-07-20  3:41 ` [PATCH v4 04/10] ASoc: mxs: add asoc configuration files Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 05/10] ARM: mxs: add saif clock Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 06/10] ARM: mxs: add saif device Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 07/10] ARM: mxs: add sgtl5000 i2c device Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 08/10] ARM: mxs: add mxs-sgtl5000 device Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 09/10] ARM: mxs: correct the using of frac div for saif Dong Aisheng
2011-07-20  3:41 ` [PATCH v4 10/10] ARM: mxs-dma: include <linux/dmaengine.h> Dong Aisheng
  -- strict thread matches above, loose matches on Subject: below --
2011-07-15 12:09 [PATCH v3 07/10] ARM: mxs: add sgtl5000 i2c device Dong Aisheng
2011-07-19  4:35 ` [PATCH v4 " Dong Aisheng

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