From patchwork Wed Jul 9 17:20:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 4519161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 18E119F1C4 for ; Wed, 9 Jul 2014 17:22:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BA832037F for ; Wed, 9 Jul 2014 17:22:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E3F720357 for ; Wed, 9 Jul 2014 17:22:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4vXl-00088b-0F; Wed, 09 Jul 2014 17:20:33 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4vXi-0007nB-FD for linux-arm-kernel@lists.infradead.org; Wed, 09 Jul 2014 17:20:31 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8G0032TG5H3S00@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 09 Jul 2014 18:20:05 +0100 (BST) X-AuditID: cbfec7f4-b7fac6d000006cfe-c8-53bd79c66c22 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 58.6F.27902.6C97DB35; Wed, 09 Jul 2014 18:20:06 +0100 (BST) Received: from [106.116.147.32] by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8G000HNG5H8860@eusync4.samsung.com>; Wed, 09 Jul 2014 18:20:06 +0100 (BST) Message-id: <53BD79C5.3060604@samsung.com> Date: Wed, 09 Jul 2014 19:20:05 +0200 From: Sylwester Nawrocki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-version: 1.0 To: Daniel Drake Subject: Re: [alsa-devel] [PATCH V3 2/2] ASoC: samsung: Add machine driver for Odroid X2/U3 References: <1404479625-25385-1-git-send-email-s.nawrocki@samsung.com> <1404479625-25385-2-git-send-email-s.nawrocki@samsung.com> In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xa7rHKvcGG5xZJWlx5eIhJoupD5+w Wcw/co7V4tH8x8wWmx5fY7WYcX4fk8Xmd/9YHdg9NnxuYvNY9D3LY9OqTjaPzUvqPfq2rGL0 +LxJLoAtissmJTUnsyy1SN8ugSvj7emFLAV7+SpmrV/F0sC4lruLkZNDQsBE4kffKXYIW0zi wr31bF2MXBxCAksZJdY2LGCGcD4xSvTtesoCUsUroCVx/2QnI4jNIqAqMfXMJjYQm03AUKL3 aB9YXFQgQuJA3zNWiHpBiR+T74H1igDV/1rezAoylFngMdDQmZfBioQFYiXeNe9ghNh2ilHi 9dz9TCAJToFgia1XPoLZzAI6Evtbp7FB2PISm9e8ZZ7AKDALyZJZSMpmISlbwMi8ilE0tTS5 oDgpPddQrzgxt7g0L10vOT93EyMk4L/sYFx8zOoQowAHoxIPr0bt7mAh1sSy4srcQ4wSHMxK Iry3SvYGC/GmJFZWpRblxxeV5qQWH2Jk4uCUamCUdGlbpW8sbz9vs5LyI8sklnv3w7ys+O+F /NFqcKzVOCM3S1v474sd6bYdmVfKvxkJTf8vw3yRTeLAI9tPB6yT/V5W2gj5eky6f972TZxU oKrj9A08sQKs6v3mz7Ptz3uwHOuQPVR9duuVpUy7cu+tPbrrSuwNs0tRt3qdkyc9j5l1ivvB ko1KLMUZiYZazEXFiQAjP7hGVgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140709_102030_675060_3DCA3788 X-CRM114-Status: GOOD ( 16.00 ) X-Spam-Score: -5.7 (-----) Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc , Chen Zhen , Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On 08/07/14 11:15, Daniel Drake wrote: > On Fri, Jul 4, 2014 at 2:13 PM, Sylwester Nawrocki > wrote: >> This patch adds the sound subsystem driver for Odroid-X2 and >> Odroid-U3 boards. The codec works in I2S master mode; there >> are two separate audio routing paths defined, as there are >> differences in the signal routing between the X2 and U3 boards, >> i.e. U3 uses single jack for headphones and microphone. >> >> Signed-off-by: Chen Zhen >> Signed-off-by: Sylwester Nawrocki > > Testing on ODROID-U2, v3 is not quite working for me, but v2 of the > patch was fine. > I boot up, run: > # speaker-test -c 2 -t wav > > As soon as I hear the word "front" I press ctrl+c and then run the > command again. > Now the command hangs with no audible output. > > Any ideas? Let me know if you have trouble reproducing. Thanks the feedback, we have also noticed this issue. It sounds like a bug in the Samsung I2S driver, which sets the CDCLK pin to input mode in the i2s_shutdown callback and never restores it. AFAICS this setting should not be lost after a call to struct soc_snd_dai_ops::shutdown(). I'm going will prepare a proper patch soon, until then you could try and see if this fixes the problem for you: ---8<--- Sylwester diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index d80121e..42c4f3e 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -724,10 +724,6 @@ static void i2s_shutdown(struct snd_pcm_substream *substream, spin_unlock_irqrestore(&lock, flags); - /* Gate CDCLK by default */ - if (!is_opened(other)) - i2s_set_sysclk(dai, SAMSUNG_I2S_CDCLK, - 0, SND_SOC_CLOCK_IN); } --->8--- -- Thanks,