diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-06-09 00:34:09 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-06-13 21:38:42 +0100 |
commit | 8cce431aa26ef24a4d4b820301ac73bf55df7a5e (patch) | |
tree | 54a4925c4e1f22311db37dd8298ace9a9685abbe /sound/soc/sh | |
parent | a97a06c7efc1ee34f500171f1c4e9608295bb79a (diff) | |
download | linux-8cce431aa26ef24a4d4b820301ac73bf55df7a5e.tar.gz linux-8cce431aa26ef24a4d4b820301ac73bf55df7a5e.tar.bz2 linux-8cce431aa26ef24a4d4b820301ac73bf55df7a5e.zip |
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>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 18 |
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) u32 val = 0x76543210; u32 mask = ~0; + /* + * *Hardware* L/R and *Software* L/R are inverted. + * We need to care about inversion timing to control + * Playback/Capture correctly. + * The point is [DVC] needs *Hardware* L/R, [MEM] needs *Software* L/R + * + * sL/R : software L/R + * hL/R : hardware L/R + * (*) : conversion timing + * + * Playback + * sL/R (*) hL/R hL/R hL/R hL/R hL/R + * [MEM] -> [SRC] -> [DVC] -> [CMD] -> [SSIU] -> [SSI] -> codec + * + * Capture + * hL/R hL/R hL/R hL/R hL/R (*) sL/R + * codec -> [SSI] -> [SSIU] -> [SRC] -> [DVC] -> [CMD] -> [MEM] + */ if (rsnd_io_is_play(io)) { struct rsnd_mod *src = rsnd_io_to_mod_src(io); |