From patchwork Sat Feb 25 05:03:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Flax X-Patchwork-Id: 9591465 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 519F560416 for ; Sat, 25 Feb 2017 05:10:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CC5A2863D for ; Sat, 25 Feb 2017 05:10:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EDD8286B6; Sat, 25 Feb 2017 05:10:43 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham 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 644AC2863D for ; Sat, 25 Feb 2017 05:10:42 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 718EB2670B8; Sat, 25 Feb 2017 06:04:16 +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 E405D2670C0; Sat, 25 Feb 2017 06:04:14 +0100 (CET) Received: from nskntmtas05p.mx.bigpond.com (nskntmtas05p.mx.bigpond.com [61.9.168.149]) by alsa0.perex.cz (Postfix) with ESMTP id E53772670B6 for ; Sat, 25 Feb 2017 06:04:08 +0100 (CET) Received: from nskntcmgw06p ([61.9.169.166]) by nskntmtas05p.mx.bigpond.com with ESMTP id <20170225050405.YLWV2121.nskntmtas05p.mx.bigpond.com@nskntcmgw06p>; Sat, 25 Feb 2017 05:04:05 +0000 Received: from meb ([124.190.105.82]) by nskntcmgw06p with BigPond Outbound id ot421u00M1mhCic01t42yj; Sat, 25 Feb 2017 05:04:05 +0000 X-Authority-Analysis: v=2.1 cv=H/EmuLsi c=1 sm=1 tr=0 a=j2gF+hSnfl5JSr2jVBK1AQ==:117 a=j2gF+hSnfl5JSr2jVBK1AQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=n2v9WMKugxEA:10 a=quVeovP3AAAA:8 a=sVKSV3fsNDaRGc22GAgA:9 a=AZ-0r2VTK9MkIlfBvydC:22 Received: from monstilationax2 ([192.168.0.51] helo=monstilationax2.telstra.com.au) by meb with esmtp (Exim 4.84_2) (envelope-from ) id 1chUbj-0003J5-3L; Sat, 25 Feb 2017 16:09:23 +1100 From: Matt Flax To: flatmax@flatmax.org Date: Sat, 25 Feb 2017 16:03:12 +1100 Message-Id: <057bbc69c3dcbb5199782ae6fe44d73862b8a1d1.1487997974.git.flatmax@flatmax.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Cc: hias@horus.com, alsa-devel@alsa-project.org, Stephen Warren , Lee Jones , phil@raspberrypi.org, Liam Girdwood , Eric Anholt , florian.kauer@koalo.de, broonie@kernel.org, Florian Meier , linux-rpi-kernel@lists.infradead.org, ckeepax@opensource.wolfsonmicro.com, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 1/3] ASoC : Add an IC bit and frame master mode (SoC and Codec slave). 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a new clock mode to the SoC system. The new mode allows for an IC (between the SoC and the Codec) to be bit and frame master. As SoC and codec drivers default to return -EINVAL, this new mode can not set either as master. Signed-off-by: Matt Flax --- include/sound/soc-dai.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 200e1f0..22f516f 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -77,14 +77,17 @@ struct snd_compr_stream; /* * DAI hardware clock masters. * - * This is wrt the codec, the inverse is true for the interface - * i.e. if the codec is clk and FRM master then the interface is - * clk and frame slave. + * SND_SOC_DAIFMT_C* definitions are wrt the codec, the inverse is true + * for the interface. i.e. if the codec is clk and FRM master then the + * interface is clk and frame slave. + * The SND_SOC_DAIFMT_IBM_IFM indicates that an IC inbetween the codec and SoC + * is master. In SND_SOC_DAIFMT_IBM_IFM mode both the codec and SoC are slaves. */ #define SND_SOC_DAIFMT_CBM_CFM (1 << 12) /* codec clk & FRM master */ #define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk slave & FRM master */ #define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame slave */ #define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM slave */ +#define SND_SOC_DAIFMT_IBM_IFM (5 << 12) /* IC clk & FRM master */ #define SND_SOC_DAIFMT_FORMAT_MASK 0x000f #define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0