aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-06-08 20:34:09 -0400
committerMark Brown <broonie@kernel.org>2017-06-13 16:38:42 -0400
commit8cce431aa26ef24a4d4b820301ac73bf55df7a5e (patch)
tree54a4925c4e1f22311db37dd8298ace9a9685abbe
parenta97a06c7efc1ee34f500171f1c4e9608295bb79a (diff)
ASoC: rsnd: add detail explanation of L/R conversion timing
Renesas Sound device *Hardware* L/R and Linux *Software* L/R are inverted. Because of this background, it needs to convert L/R. Then, DVC needs *Hardware* L/R, and Linux needs *Software* L/R. Because Playback/Capture needs different timing, and there is no explanation about it on source code / git log, this patch adds it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/core.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 7c68f9d4a0ed..1bf261d677b7 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -310,6 +310,24 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
310 u32 val = 0x76543210; 310 u32 val = 0x76543210;
311 u32 mask = ~0; 311 u32 mask = ~0;
312 312
313 /*
314 * *Hardware* L/R and *Software* L/R are inverted.
315 * We need to care about inversion timing to control
316 * Playback/Capture correctly.
317 * The point is [DVC] needs *Hardware* L/R, [MEM] needs *Software* L/R
318 *
319 * sL/R : software L/R
320 * hL/R : hardware L/R
321 * (*) : conversion timing
322 *
323 * Playback
324 * sL/R (*) hL/R hL/R hL/R hL/R hL/R
325 * [MEM] -> [SRC] -> [DVC] -> [CMD] -> [SSIU] -> [SSI] -> codec
326 *
327 * Capture
328 * hL/R hL/R hL/R hL/R hL/R (*) sL/R
329 * codec -> [SSI] -> [SSIU] -> [SRC] -> [DVC] -> [CMD] -> [MEM]
330 */
313 if (rsnd_io_is_play(io)) { 331 if (rsnd_io_is_play(io)) {
314 struct rsnd_mod *src = rsnd_io_to_mod_src(io); 332 struct rsnd_mod *src = rsnd_io_to_mod_src(io);
315 333