Skip to content

Commit 8c363f6

Browse files
morimotobroonie
authored andcommitted
ASoC: renesas: msiof: Add note for The possibility of R/L opposite Capture
This driver is assuming MSIOF is used as Clock/Frame Consumer Mode, and there is a case that some Codec (= Clock/Frame Provider) might output Clock/Frame before setup MSIOF. And, MSIOF will capture data without checking SYNC signal Hi/Low (= R/L). This means, if MSIOF RXE bit was set as 1 in case of SYNC signal was Hi (= R) timing, it will start capture data since next SYNC low signal (= L). Because Linux assumes sound data is lined up as R->L->R->L->..., the data R/L might be opposite. The only solution in this case is start CLK/SYNC *after* MSIOF settings, but it depends when and how Codec driver start it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Link: https://patch.msgid.link/875xd7yutm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent dc7473e commit 8c363f6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

sound/soc/renesas/rcar/msiof.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,25 @@
4646
* Setup both direction (Playback/Capture) in the same time.
4747
*/
4848

49+
/*
50+
* [NOTE-R/L]
51+
*
52+
* The data of Captured might be R/L opposite.
53+
*
54+
* This driver is assuming MSIOF is used as Clock/Frame Consumer Mode, and there is a case that some
55+
* Codec (= Clock/Frame Provider) might output Clock/Frame before setup MSIOF. It depends on Codec
56+
* driver implementation.
57+
*
58+
* MSIOF will capture data without checking SYNC signal Hi/Low (= R/L).
59+
*
60+
* This means, if MSIOF RXE bit was set as 1 in case of SYNC signal was Hi (= R) timing, it will
61+
* start capture data since next SYNC low singla (= L). Because Linux assumes sound data is lined
62+
* up as R->L->R->L->..., the data R/L will be opposite.
63+
*
64+
* The only solution in this case is start CLK/SYNC *after* MSIOF settings, but it depends when and
65+
* how Codec driver start it.
66+
*/
67+
4968
#include <linux/module.h>
5069
#include <linux/of.h>
5170
#include <linux/of_dma.h>

0 commit comments

Comments
 (0)