Merge tag 'asoc-v3.15-rcar' into asoc-next
authorMark Brown <broonie@linaro.org>
Tue, 25 Mar 2014 21:22:09 +0000 (21:22 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 25 Mar 2014 21:22:09 +0000 (21:22 +0000)
ASoC: A few more fixes for rcar

Since Linus hasn't done the release yet and Morimoto-san here are some
additional bug fixes for rcar which Morimoto-san sent overnight.

# gpg: Signature made Mon 24 Mar 2014 11:21:18 GMT using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"

sound/soc/sh/rcar/src.c

index eee75eb..6232b7d 100644 (file)
@@ -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;