aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-12-16 21:55:51 -0500
committerMark Brown <broonie@kernel.org>2015-12-18 07:10:56 -0500
commit5e7b9edd928d22ffd4936fc61c80532ed6df5077 (patch)
treedba1ddc74d507ae27104c8530ce8903075d82191
parentcdf310ce119989353bb6848ca8327814ae1012e2 (diff)
ASoC: rsnd: tidyup return value of rsnd_get_adinr_bit()
Renesas sound driver has rsnd_get_adinr_bit/chan() functions. It is assuming _bit() returns ADINR :: OTBL, and _chan() returns ADINR :: CHNUM. Current _bit() returns both OTBL and CHNUM. This patch fixup 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.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 849c1ad93df2..44f32c1db05d 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -227,21 +227,17 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
227 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); 227 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
228 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); 228 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
229 struct device *dev = rsnd_priv_to_dev(priv); 229 struct device *dev = rsnd_priv_to_dev(priv);
230 u32 adinr = runtime->channels;
231 230
232 switch (runtime->sample_bits) { 231 switch (runtime->sample_bits) {
233 case 16: 232 case 16:
234 adinr |= (8 << 16); 233 return 8 << 16;
235 break;
236 case 32: 234 case 32:
237 adinr |= (0 << 16); 235 return 0 << 16;
238 break;
239 default:
240 dev_warn(dev, "not supported sample bits\n");
241 return 0;
242 } 236 }
243 237
244 return adinr; 238 dev_warn(dev, "not supported sample bits\n");
239
240 return 0;
245} 241}
246 242
247u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io) 243u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io)