aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-12-01 21:44:23 -0500
committerMark Brown <broonie@kernel.org>2016-12-05 06:36:43 -0500
commit3ce2959d162a8f2d69a83582df619a20ff3f6645 (patch)
tree375400144335b7bec313ea279f68eca571e7bf8c
parent4821d914fe747a91453021675a74069776f0b819 (diff)
ASoC: rsnd: rsnd_get_dalign() needs to care SSIU, not SSI
SSIU was controlled by SSI before, but commit c7f69ab53("ASoC: rsnd: use mod base common method on SSIU") separated it into ssiu.c But, it didn't care about rsnd_get_dalign() for judging SSI_BUSIF_DALIGN register value which changes the stream data order. This function will be called from cmd/src/ssiu now, but current code still cares ssi, not ssiu. This patch fix it up Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/core.c6
-rw-r--r--sound/soc/sh/rcar/rsnd.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 912dc62ff9c7..825635aaf30e 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -306,7 +306,7 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
306 */ 306 */
307u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io) 307u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
308{ 308{
309 struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io); 309 struct rsnd_mod *ssiu = rsnd_io_to_mod_ssiu(io);
310 struct rsnd_mod *target; 310 struct rsnd_mod *target;
311 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); 311 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
312 u32 val = 0x76543210; 312 u32 val = 0x76543210;
@@ -315,11 +315,11 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
315 if (rsnd_io_is_play(io)) { 315 if (rsnd_io_is_play(io)) {
316 struct rsnd_mod *src = rsnd_io_to_mod_src(io); 316 struct rsnd_mod *src = rsnd_io_to_mod_src(io);
317 317
318 target = src ? src : ssi; 318 target = src ? src : ssiu;
319 } else { 319 } else {
320 struct rsnd_mod *cmd = rsnd_io_to_mod_cmd(io); 320 struct rsnd_mod *cmd = rsnd_io_to_mod_cmd(io);
321 321
322 target = cmd ? cmd : ssi; 322 target = cmd ? cmd : ssiu;
323 } 323 }
324 324
325 mask <<= runtime->channels * 4; 325 mask <<= runtime->channels * 4;
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index d9e550211c09..71158c8bc254 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -428,6 +428,7 @@ struct rsnd_dai_stream {
428}; 428};
429#define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL) 429#define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL)
430#define rsnd_io_to_mod_ssi(io) rsnd_io_to_mod((io), RSND_MOD_SSI) 430#define rsnd_io_to_mod_ssi(io) rsnd_io_to_mod((io), RSND_MOD_SSI)
431#define rsnd_io_to_mod_ssiu(io) rsnd_io_to_mod((io), RSND_MOD_SSIU)
431#define rsnd_io_to_mod_ssip(io) rsnd_io_to_mod((io), RSND_MOD_SSIP) 432#define rsnd_io_to_mod_ssip(io) rsnd_io_to_mod((io), RSND_MOD_SSIP)
432#define rsnd_io_to_mod_src(io) rsnd_io_to_mod((io), RSND_MOD_SRC) 433#define rsnd_io_to_mod_src(io) rsnd_io_to_mod((io), RSND_MOD_SRC)
433#define rsnd_io_to_mod_ctu(io) rsnd_io_to_mod((io), RSND_MOD_CTU) 434#define rsnd_io_to_mod_ctu(io) rsnd_io_to_mod((io), RSND_MOD_CTU)