From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Flax Subject: [PATCH 1/3] ASoC : Add an IC bit and frame master mode (SoC and Codec slave). Date: Sat, 25 Feb 2017 16:03:12 +1100 Message-ID: <057bbc69c3dcbb5199782ae6fe44d73862b8a1d1.1487997974.git.flatmax@flatmax.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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) In-Reply-To: In-Reply-To: References: 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 To: flatmax@flatmax.org 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 List-Id: alsa-devel@alsa-project.org 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 -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: flatmax@flatmax.org (Matt Flax) Date: Sat, 25 Feb 2017 16:03:12 +1100 Subject: [PATCH 1/3] ASoC : Add an IC bit and frame master mode (SoC and Codec slave). In-Reply-To: References: Message-ID: <057bbc69c3dcbb5199782ae6fe44d73862b8a1d1.1487997974.git.flatmax@flatmax.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 -- 2.7.4