From patchwork Sun Aug 2 22:44:11 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: 6926261 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 52D5FC05AC for ; Sun, 2 Aug 2015 22:44:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 717D820437 for ; Sun, 2 Aug 2015 22:44:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1CC55203E5 for ; Sun, 2 Aug 2015 22:44:38 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E1819261B31; Mon, 3 Aug 2015 00:44:36 +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=ham version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0678D261B0E; Mon, 3 Aug 2015 00:44:30 +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 153FA261B19; Mon, 3 Aug 2015 00:44:28 +0200 (CEST) Received: from vps-vb.mhejs.net (vi37-28-154-113.vibiznes.pl [37.28.154.113]) by alsa0.perex.cz (Postfix) with ESMTP id 2F0A42614E2 for ; Mon, 3 Aug 2015 00:44:21 +0200 (CEST) Received: by vps-vb.mhejs.net with esmtps (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.82) (envelope-from ) id 1ZM1zM-0005aS-Pb; Mon, 03 Aug 2015 00:44:16 +0200 Message-ID: <55BE9D3B.3090303@maciej.szmigiero.name> Date: Mon, 03 Aug 2015 00:44:11 +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] 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. Changes from v1: fix indentation to be consistent with rest of the driver. Signed-off-by: Maciej Szmigiero --- 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; }