aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-24 11:16:43 +0000
committerMark Brown <broonie@linaro.org>2014-03-24 11:16:43 +0000
commit002ccbb09c63a0df75382c9ace078b7cc4aee4e9 (patch)
treed740d4e4b22485fc8430fe9b9b443c1b49727a6e /sound/soc
parentMerge tag 'asoc-v3.15-3' into asoc-next (diff)
parentASoC: rcar: bugfix: it cares about the non-src case (diff)
downloadlinux-dev-002ccbb09c63a0df75382c9ace078b7cc4aee4e9.tar.xz
linux-dev-002ccbb09c63a0df75382c9ace078b7cc4aee4e9.zip
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sh/rcar/src.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index eee75ebf961c..6232b7d307aa 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -182,16 +182,20 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
struct rsnd_dai_stream *io,
struct snd_pcm_runtime *runtime)
{
+ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
struct rsnd_src *src;
- unsigned int rate;
+ unsigned int rate = 0;
- src = rsnd_mod_to_src(rsnd_io_to_mod_src(io));
+ if (src_mod) {
+ src = rsnd_mod_to_src(src_mod);
+
+ /*
+ * return convert rate if SRC is used,
+ * otherwise, return runtime->rate as usual
+ */
+ rate = rsnd_src_convert_rate(src);
+ }
- /*
- * return convert rate if SRC is used,
- * otherwise, return runtime->rate as usual
- */
- rate = rsnd_src_convert_rate(src);
if (!rate)
rate = runtime->rate;