From patchwork Thu Jul 30 14:35:58 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: 6903291 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 3FC24C05AC for ; Thu, 30 Jul 2015 14:37:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7626A2056C for ; Thu, 30 Jul 2015 14:37:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8537120551 for ; Thu, 30 Jul 2015 14:37:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6C18A265A98; Thu, 30 Jul 2015 16:37:23 +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,NO_DNS_FOR_FROM, 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 B3C2B265DB5; Thu, 30 Jul 2015 16:36:48 +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 24CF4265DAB; Thu, 30 Jul 2015 16:36:46 +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 266BD265D47 for ; Thu, 30 Jul 2015 16:36:04 +0200 (CEST) Received: by vps-vb.mhejs.net with esmtps (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.82) (envelope-from ) id 1ZKowF-0006g7-Tu; Thu, 30 Jul 2015 16:36:03 +0200 Message-ID: <55BA364E.1000803@maciej.szmigiero.name> Date: Thu, 30 Jul 2015 16:35:58 +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" Cc: Timur Tabi , Xiubo Li , Takashi Iwai , linux-kernel , Liam Girdwood , Nicolin Chen , Mark Brown , Fabio Estevam , linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH 6/6] 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 --- 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..37aabe3 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; }