From patchwork Wed Nov 29 21:32:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 10083677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6757D60353 for ; Wed, 29 Nov 2017 21:35:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58F5929BC5 for ; Wed, 29 Nov 2017 21:35:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DBF629BD5; Wed, 29 Nov 2017 21:35:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A04B29BC5 for ; Wed, 29 Nov 2017 21:35:19 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 36027267A36; Wed, 29 Nov 2017 22:33:28 +0100 (CET) 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 0673C2679C9; Wed, 29 Nov 2017 22:33:10 +0100 (CET) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by alsa0.perex.cz (Postfix) with ESMTP id 1D5202679AB for ; Wed, 29 Nov 2017 22:33:05 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vATLX4tM023531; Wed, 29 Nov 2017 15:33:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1511991184; bh=lkdMVEnskJw+fDVJaVtaz5kUQkskCRT1EhyaJXnOBao=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d5UAWwDbkAWif3QTts3khiX+gk4ECThcCDhu9S5r2jf+4uGqS7/ibMy87jE917qmc 9N7QpGNIjtW1BlJf+xDYWz+gdkfkuiZH5a9RYWftHV9Az99N/dNCei3AHGzNC+1TWc btctc4HKvy2yeUZ0qM3fjCV8wpJqp7kht1Hkihjc= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vATLX4pV011230; Wed, 29 Nov 2017 15:33:04 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 29 Nov 2017 15:33:04 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 29 Nov 2017 15:33:04 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vATLX4xh019687; Wed, 29 Nov 2017 15:33:04 -0600 Received: from localhost (uda0226330.dhcp.ti.com [128.247.58.231]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vATLX3316911; Wed, 29 Nov 2017 15:33:03 -0600 (CST) From: "Andrew F. Davis" To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren Date: Wed, 29 Nov 2017 15:32:53 -0600 Message-ID: <20171129213300.20021-13-afd@ti.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171129213300.20021-1-afd@ti.com> References: <20171129213300.20021-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, "Andrew F . Davis" Subject: [alsa-devel] [PATCH v2 12/19] ASoC: tlv320aic31xx: Add CODEC clock slave support 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 This CODEC supports being the WCLK and/or BCLK slave, add support for this here. Also make the alert into an error as alert is more urgent than needed here and is rarely used. Signed-off-by: Andrew F. Davis --- sound/soc/codecs/tlv320aic31xx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index 41e2d8077a62..b39db3eb06d0 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -926,8 +926,16 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai, case SND_SOC_DAIFMT_CBM_CFM: iface_reg1 |= AIC31XX_BCLK_MASTER | AIC31XX_WCLK_MASTER; break; + case SND_SOC_DAIFMT_CBS_CFM: + iface_reg1 |= AIC31XX_WCLK_MASTER; + break; + case SND_SOC_DAIFMT_CBM_CFS: + iface_reg1 |= AIC31XX_BCLK_MASTER; + break; + case SND_SOC_DAIFMT_CBS_CFS: + break; default: - dev_alert(codec->dev, "Invalid DAI master/slave interface\n"); + dev_err(codec->dev, "Invalid DAI master/slave interface\n"); return -EINVAL; }