diff options
-rw-r--r-- | sound/soc/sh/rcar/core.c | 19 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 1 |
2 files changed, 4 insertions, 16 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index e59dc8a461bb..7f3a7edba096 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -196,21 +196,10 @@ int rsnd_get_slot_rdai(struct rsnd_dai *rdai) | |||
196 | return rdai->slots; | 196 | return rdai->slots; |
197 | } | 197 | } |
198 | 198 | ||
199 | int rsnd_get_slot_runtime(struct rsnd_dai_stream *io) | ||
200 | { | ||
201 | struct rsnd_dai *rdai = rsnd_io_to_rdai(io); | ||
202 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); | ||
203 | int chan = rsnd_get_slot_rdai(rdai); | ||
204 | |||
205 | if (runtime->channels < chan) | ||
206 | chan = runtime->channels; | ||
207 | |||
208 | return chan; | ||
209 | } | ||
210 | |||
211 | int rsnd_get_slot_extend(struct rsnd_dai_stream *io) | 199 | int rsnd_get_slot_extend(struct rsnd_dai_stream *io) |
212 | { | 200 | { |
213 | int chan = rsnd_get_slot_runtime(io); | 201 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); |
202 | int chan = runtime->channels; | ||
214 | 203 | ||
215 | /* TDM Extend Mode needs 8ch */ | 204 | /* TDM Extend Mode needs 8ch */ |
216 | if (chan == 6) | 205 | if (chan == 6) |
@@ -243,9 +232,9 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io) | |||
243 | u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io) | 232 | u32 rsnd_get_adinr_chan(struct rsnd_mod *mod, struct rsnd_dai_stream *io) |
244 | { | 233 | { |
245 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | 234 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
235 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); | ||
246 | struct device *dev = rsnd_priv_to_dev(priv); | 236 | struct device *dev = rsnd_priv_to_dev(priv); |
247 | struct rsnd_dai *rdai = rsnd_io_to_rdai(io); | 237 | u32 chan = runtime->channels; |
248 | u32 chan = rsnd_get_slot_rdai(rdai); | ||
249 | 238 | ||
250 | switch (chan) { | 239 | switch (chan) { |
251 | case 1: | 240 | case 1: |
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 4b677e074c7a..e9909a4ce754 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h | |||
@@ -294,7 +294,6 @@ void rsnd_mod_interrupt(struct rsnd_mod *mod, | |||
294 | struct rsnd_dai_stream *io)); | 294 | struct rsnd_dai_stream *io)); |
295 | 295 | ||
296 | int rsnd_get_slot_rdai(struct rsnd_dai *rdai); | 296 | int rsnd_get_slot_rdai(struct rsnd_dai *rdai); |
297 | int rsnd_get_slot_runtime(struct rsnd_dai_stream *io); | ||
298 | int rsnd_get_slot_extend(struct rsnd_dai_stream *io); | 297 | int rsnd_get_slot_extend(struct rsnd_dai_stream *io); |
299 | 298 | ||
300 | /* | 299 | /* |