From patchwork Mon Aug 31 20:50:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatol Pomozov X-Patchwork-Id: 7101621 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 E80FFBEEC1 for ; Mon, 31 Aug 2015 20:51:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21F62206A3 for ; Mon, 31 Aug 2015 20:51:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E65FD206A4 for ; Mon, 31 Aug 2015 20:51:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 498F22619F7; Mon, 31 Aug 2015 22:51:22 +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.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 75E94260627; Mon, 31 Aug 2015 22:51:12 +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 1549026062E; Mon, 31 Aug 2015 22:51:12 +0200 (CEST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by alsa0.perex.cz (Postfix) with ESMTP id 4A6C826053D for ; Mon, 31 Aug 2015 22:51:06 +0200 (CEST) Received: by pacdd16 with SMTP id dd16so150438713pac.2 for ; Mon, 31 Aug 2015 13:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=9l5XjlCVTHi1WVB+xzEW+pSoJDMB7TyabV2gnTsP9Vg=; b=aGroOhbkEwL118LvOi4F4vNYURZOrcifk+5GHMpZqDHZ2w8sWsLjbFr+mgPmpQpltn psmfAGotLgtqp7GSmmXe3AaLjy+cd5i3ko3kUh9LpuwJiP7Y8wFHLU0s3TV5NoYyLPLo vahp7FQ9GvVjcjhU426rEM+X835xviOQ4FOccpcWf254/JDNHTZXmI2Y+zk8o2eM97M5 pAXBmtfku7ujvdwGPQqeKMQ/PSnQZr868BtEsNyMJH3ugvNvXSiEboV6pjxLK+jJnZ+I dOBGZE3Ufo+M/+ocXxC5uqHKvIMypoe7toj36DdTDEs7Y8bVwXTMB41xPOh2HJsTdax8 yEIA== X-Received: by 10.68.242.42 with SMTP id wn10mr13841185pbc.77.1441054264486; Mon, 31 Aug 2015 13:51:04 -0700 (PDT) Received: from anatol.mtv.corp.google.com ([172.22.64.197]) by smtp.gmail.com with ESMTPSA id uz5sm15666618pac.1.2015.08.31.13.51.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Aug 2015 13:51:03 -0700 (PDT) From: Anatol Pomozov To: alsa-devel@alsa-project.org Date: Mon, 31 Aug 2015 13:50:58 -0700 Message-Id: <1441054258-33200-1-git-send-email-anatol.pomozov@gmail.com> X-Mailer: git-send-email 2.5.0.457.gab17608 Cc: liam.r.girdwood@linux.intel.com, albertchen@realtek.com, broonie@kernel.org, lars@metafoo.de, Anatol Pomozov Subject: [alsa-devel] [PATCH] ASoC: Document DAI signal polarity 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 Per discussion at [1] currently there is no clear definition of what is FSYNC polarity. Different drivers use its own definition of what is "normal" and what is "inverted" fsync in different modes. This leads to compatibility problems between drivers. Explicitly specify meaning of BCLK/FSYNC polarity. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-August/097121.html Signed-off-by: Anatol Pomozov --- include/sound/soc-dai.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 2df96b1..c8170c4 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -48,10 +48,15 @@ struct snd_compr_stream; #define SND_SOC_DAIFMT_GATED (0 << 4) /* clock is gated */ /* - * DAI hardware signal inversions. + * DAI hardware signal polarity. * - * Specifies whether the DAI can also support inverted clocks for the specified - * format. + * For BCLK: + * - "normal" polarity means signal sensing happens at rising edge of BCLK + * - "inverted" polarity means signal sensing happens at falling edge of BCLK + * + * For FSYNC: + * - "normal" polarity means frame starts at rising edge of FSYNC + * - "inverted" polarity means frame starts at falling edge of FSYNC */ #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */ #define SND_SOC_DAIFMT_NB_IF (2 << 8) /* normal BCLK + inv FRM */