From patchwork Wed Aug 5 15:29:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej S. Szmigiero" X-Patchwork-Id: 6951071 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4FADDC05AC for ; Wed, 5 Aug 2015 15:29:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78F1220529 for ; Wed, 5 Aug 2015 15:29:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4BD222051A for ; Wed, 5 Aug 2015 15:29:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 05EC62661A1; Wed, 5 Aug 2015 17:29:18 +0200 (CEST) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 10A07265E3F; Wed, 5 Aug 2015 17:29:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 900D7265FED; Wed, 5 Aug 2015 17:29:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vps-vb.mhejs.net (vi37-28-154-113.vibiznes.pl [37.28.154.113]) by alsa0.perex.cz (Postfix) with ESMTP id 99B8E265E32 for ; Wed, 5 Aug 2015 17:29:08 +0200 (CEST) Received: by vps-vb.mhejs.net with esmtps (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.82) (envelope-from ) id 1ZN0cu-0001li-Ce; Wed, 05 Aug 2015 17:29:08 +0200 Message-ID: <55C22BBE.1010303@maciej.szmigiero.name> Date: Wed, 05 Aug 2015 17:29:02 +0200 From: "Maciej S. Szmigiero" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: "alsa-devel@alsa-project.org" References: <55BA364E.1000803@maciej.szmigiero.name> <20150731055843.GX30895@pengutronix.de> <55BB9082.4030206@maciej.szmigiero.name> <20150802185103.GD19600@pengutronix.de> In-Reply-To: <20150802185103.GD19600@pengutronix.de> Cc: Xiubo Li , Takashi Iwai , linux-kernel , Liam Girdwood , Timur Tabi , Nicolin Chen , Mark Brown , Fabio Estevam , Markus Pargmann , linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH 6/6 v2][RESEND] ASoC: fsl_ssi: adjust set DAI format in AC'97 mode X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Adjust set DAI format function in fsl_ssi driver so it doesn't fail and clears RXDIR in AC'97 mode. Signed-off-by: Maciej Szmigiero --- Changes from v1: fix indentation to be consistent with rest of the driver. sound/soc/fsl/fsl_ssi.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 8e5ff5e..1ba63bd 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -900,14 +900,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, scr &= ~CCSR_SSI_SCR_SYS_CLK_EN; break; default: - return -EINVAL; + if (!fsl_ssi_is_ac97(ssi_private)) + return -EINVAL; } stcr |= strcr; srcr |= strcr; - if (ssi_private->cpu_dai_drv.symmetric_rates) { - /* Need to clear RXDIR when using SYNC mode */ + if (ssi_private->cpu_dai_drv.symmetric_rates + || fsl_ssi_is_ac97(ssi_private)) { + /* Need to clear RXDIR when using SYNC or AC97 mode */ srcr &= ~CCSR_SSI_SRCR_RXDIR; scr |= CCSR_SSI_SCR_SYN; }