From patchwork Mon Aug 6 13:07:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: gcembed X-Patchwork-Id: 1279031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 15A233FC23 for ; Mon, 6 Aug 2012 13:11:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SyN2j-0007m7-Da; Mon, 06 Aug 2012 13:08:21 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SyN2e-0007lt-Jj for linux-arm-kernel@lists.infradead.org; Mon, 06 Aug 2012 13:08:18 +0000 Received: by wgbez12 with SMTP id ez12so1943020wgb.18 for ; Mon, 06 Aug 2012 06:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=f9Tt4Hp/jRKEQDPrwW3PyMhSolG/063NM3P7eHmcGvw=; b=VCfy1OexfL9DViX7sLQaELgQGyHYTRKeIWI6eD5WeyffQFSlqDOxz7chkpmXrXpTZh kIBYB2GxYgoRIihhf/ahQ6uHXzImRUT4/ei7mbTqTOkYAzIhgEmhGVAaKo/EXL/xrUyn CFcKWElgumJjLtJ65p5s6oH+/mg3wbfB0aNm3wTzZbt2Oh5eLuljNGUNFPsDvW7TVreW mrBVz5cg7cFVRx8idR+MMGDAU3f4CPADheFAGK6KrZrEyPy1JCOUmdMglClFK0+NnhZ9 ljNu73ijELGbkzSrTMErJsWkCNx+pwXdNfiRhJ6Q9EuY9ML1w+H81GaoKCXkuv7pmLme A9hw== Received: by 10.180.19.169 with SMTP id g9mr18366607wie.9.1344258494775; Mon, 06 Aug 2012 06:08:14 -0700 (PDT) Received: from t410.TRUMP (34.16-66-87.adsl-static.isp.belgacom.be. [87.66.16.34]) by mx.google.com with ESMTPS id eu4sm15497148wib.2.2012.08.06.06.08.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 06:08:13 -0700 (PDT) From: =?UTF-8?q?Ga=C3=ABtan=20Carlier?= To: Sascha Hauer , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/1] mx27_3ds: Add sound support Date: Mon, 6 Aug 2012 15:07:27 +0200 Message-Id: <1344258447-6162-1-git-send-email-gcembed@gmail.com> X-Mailer: git-send-email 1.7.7.4 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (gcembed[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: alsa-devel@alsa-project.org, =?UTF-8?q?Ga=C3=ABtan=20Carlier?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, I have ported code "Enable sound on mx31_3ds" from Philippe Rétornaz to MX27 3DS platform on master branch of linux-next (tag next-20120806). I also applied patch "dma: imx-dma: Fix kernel crash due to missing clock conversion" of Fabio Estevam which is not yet merged in linux-next. Thanks to them, everything is working good on MX27 3DS platform except that sound is played too fast. Which parameter must be adjusted to have sound playing at normal speed ? In mc13783 codec driver, imx_add_imx_ssi(), clock configuration in mach-mx27_3ds file ? Thanks for your help. Signed-off-by: Gaëtan Carlier --- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/mach-mx27_3ds.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index afd542a..63f64f1 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -302,6 +302,7 @@ config MACH_MX27_3DS select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX_FB select IMX_HAVE_PLATFORM_IMX_I2C + select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_MX2_CAMERA diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 58c24c1..a5d4080 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c @@ -158,6 +158,11 @@ static const int mx27pdk_pins[] __initconst = { PB21_PF_CSI_HSYNC, CSI_PWRDWN | GPIO_GPIO | GPIO_OUT, CSI_RESET | GPIO_GPIO | GPIO_OUT, + /* SSI */ + PC16_PF_SSI4_FS, + PC17_PF_SSI4_RXD, + PC18_PF_SSI4_TXD, + PC19_PF_SSI4_CLK, }; static struct gpio mx27_3ds_camera_gpios[] = { @@ -329,13 +334,23 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { }; /* MC13783 */ +static struct mc13xxx_codec_platform_data mx27_3ds_codec = { + .dac_ssi_port = MC13783_SSI1_PORT, + .adc_ssi_port = MC13783_SSI1_PORT, +}; + static struct mc13xxx_platform_data mc13783_pdata = { .regulators = { .regulators = mx27_3ds_regulators, .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), }, - .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC, + .codec = &mx27_3ds_codec, + .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC | MC13XXX_USE_CODEC, +}; + +static struct imx_ssi_platform_data mx27_3ds_ssi_pdata = { + .flags = IMX_SSI_DMA | IMX_SSI_NET, }; /* SPI */ @@ -512,6 +527,8 @@ static void __init mx27pdk_init(void) } imx27_add_mx2_camera(&mx27_3ds_cam_pdata); + imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); + imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); } static void __init mx27pdk_timer_init(void)