diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2016-02-09 02:04:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-09 11:17:32 -0500 |
commit | c308abe45e2a7bc58e22d9b6d04dccf76a1b2012 (patch) | |
tree | 0cf70edd4a76bbb1682a9c4f057dfce091db7fb0 | |
parent | b5b442abd9d5cfe4f04a1e83be9900c87444bd66 (diff) |
ASoC: rsnd: rsnd_ssi_is_multi_slave() macro uses rsnd_ssi_multi_slaves()
b4c83b171 ("ASoC: rsnd: add Multi channel support") added
Multi channel support, and current rsnd_ssi_is_multi_slave()'s check
method is !SSI equals SSIM1/2/3. But, SSI parent also hit to this macro.
Because of this reason, some stream which needs SSI parent clock
can't work correctly. This patch uses rsnd_ssi_multi_slaves() to
solve this issue. This issue was reported by Dung.
Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
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/ssi.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 803e9ae65915..592505a4bc13 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
@@ -94,7 +94,8 @@ struct rsnd_ssi { | |||
94 | #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) | 94 | #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) |
95 | #define rsnd_ssi_mode_flags(p) ((p)->flags) | 95 | #define rsnd_ssi_mode_flags(p) ((p)->flags) |
96 | #define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io)) | 96 | #define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io)) |
97 | #define rsnd_ssi_is_multi_slave(ssi, io) ((mod) != rsnd_io_to_mod_ssi(io)) | 97 | #define rsnd_ssi_is_multi_slave(mod, io) \ |
98 | (rsnd_ssi_multi_slaves(io) & (1 << rsnd_mod_id(mod))) | ||
98 | 99 | ||
99 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) | 100 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) |
100 | { | 101 | { |
@@ -167,9 +168,6 @@ static int rsnd_ssi_irq(struct rsnd_mod *mod, | |||
167 | u32 rsnd_ssi_multi_slaves(struct rsnd_dai_stream *io) | 168 | u32 rsnd_ssi_multi_slaves(struct rsnd_dai_stream *io) |
168 | { | 169 | { |
169 | struct rsnd_mod *mod; | 170 | struct rsnd_mod *mod; |
170 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); | ||
171 | struct rsnd_priv *priv = rsnd_io_to_priv(io); | ||
172 | struct device *dev = rsnd_priv_to_dev(priv); | ||
173 | enum rsnd_mod_type types[] = { | 171 | enum rsnd_mod_type types[] = { |
174 | RSND_MOD_SSIM1, | 172 | RSND_MOD_SSIM1, |
175 | RSND_MOD_SSIM2, | 173 | RSND_MOD_SSIM2, |
@@ -177,16 +175,6 @@ u32 rsnd_ssi_multi_slaves(struct rsnd_dai_stream *io) | |||
177 | }; | 175 | }; |
178 | int i, mask; | 176 | int i, mask; |
179 | 177 | ||
180 | switch (runtime->channels) { | ||
181 | case 2: /* Multi channel is not needed for Stereo */ | ||
182 | return 0; | ||
183 | case 6: | ||
184 | break; | ||
185 | default: | ||
186 | dev_err(dev, "unsupported channel\n"); | ||
187 | return 0; | ||
188 | } | ||
189 | |||
190 | mask = 0; | 178 | mask = 0; |
191 | for (i = 0; i < ARRAY_SIZE(types); i++) { | 179 | for (i = 0; i < ARRAY_SIZE(types); i++) { |
192 | mod = rsnd_io_to_mod(io, types[i]); | 180 | mod = rsnd_io_to_mod(io, types[i]); |