diff mbox

ASoC: Document DAI signal polarity

Message ID 9EE27E29D4384141AEEB23E69581718501431DDB@RTITMBSV05.realtek.com.tw (mailing list archive)
State New, archived
Headers show

Commit Message

Albert Chen Sept. 1, 2015, 1:27 a.m. UTC
Loop more

-----Original Message-----
From: Anatol Pomozov [mailto:anatol.pomozov@gmail.com] 
Sent: Tuesday, September 01, 2015 4:51 AM
To: alsa-devel@alsa-project.org
Cc: broonie@kernel.org; lars@metafoo.de; Albert Chen; liam.r.girdwood@linux.intel.com; Anatol Pomozov
Subject: [PATCH] ASoC: Document DAI signal polarity

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 <anatol.pomozov@gmail.com>
---
 include/sound/soc-dai.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--
2.5.0.457.gab17608


------Please consider the environment before printing this e-mail.
diff mbox

Patch

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 */