From patchwork Thu Jun 26 14:23:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 4427901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 336C7BEEAA for ; Thu, 26 Jun 2014 14:26:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 648ED20377 for ; Thu, 26 Jun 2014 14:25:56 +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 BE1CC2038C for ; Thu, 26 Jun 2014 14:25:51 +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 1X0Aar-0003zd-KQ; Thu, 26 Jun 2014 14:24:05 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0AaI-00036S-OL for linux-arm-kernel@lists.infradead.org; Thu, 26 Jun 2014 14:23:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Date:Sender:Message-Id:Subject:Cc:To:From:References:In-Reply-To; bh=uSZ8859duZQph23AwvbboW0QOE8QLHPVAg8J+8t2GI0=; b=lWeqPykMtq0MsizP0voaEB6W9aeFyWtDcXFHzV6YfF/dLoH4/23lL+bNMXCI3lY9atVLauP/Jmcga+99ib7wTc0su2r+CmVGn6zqEiQXA8BERtuMvUB1p4se/G+HI5UnVi8ZN6kr8rU8EU0LPuOGWJsXYHhiM0AdyEmKsVxFtYA=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:39218 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1X0AZy-0002uj-TE; Thu, 26 Jun 2014 15:23:10 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1X0AZy-0003iQ-EJ; Thu, 26 Jun 2014 15:23:10 +0100 In-Reply-To: <20140626142231.GR32514@n2100.arm.linux.org.uk> References: <20140626142231.GR32514@n2100.arm.linux.org.uk> From: Russell King To: Mark Brown Subject: [PATCH 5/7] ASoC: kirkwood-i2s: fix pause handling some more Message-Id: Date: Thu, 26 Jun 2014 15:23:10 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_072331_087599_E0CCF331 X-CRM114-Status: GOOD ( 11.71 ) X-Spam-Score: -0.1 (/) Cc: Takashi Iwai , alsa-devel@alsa-project.org, Liam Girdwood , linux-arm-kernel@lists.infradead.org, Jaroslav Kysela 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 We still see the occasional timeout waiting for busy to clear. As the spec is contradictory, and we know that the current implementation doesn't work, try an alternative interpretation from the spec. This one appears to work - I have yet to find any issue with it during my testing over several months. Signed-off-by: Russell King --- sound/soc/kirkwood/kirkwood-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index b601ad680d7b..e98650c01eba 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -238,7 +238,7 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, uint32_t ctl, value; ctl = readl(priv->io + KIRKWOOD_PLAYCTL); - if (ctl & KIRKWOOD_PLAYCTL_PAUSE) { + if ((ctl & KIRKWOOD_PLAYCTL_ENABLE_MASK) == 0) { unsigned timeout = 5000; /* * The Armada510 spec says that if we enter pause mode, the