ASoC: simple-card: un-implemented set_fmt is not error
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 18 Oct 2013 05:46:49 +0000 (22:46 -0700)
committerMark Brown <broonie@linaro.org>
Sun, 20 Oct 2013 16:28:02 +0000 (17:28 +0100)
Current simple-card returns error if DAI doesn't
support .set_fmt callback.
But the error is -ENOTSUPP (= not supported),
and it is not error.
This patch avoids such case

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/generic/simple-card.c

index 8c49147..b2fbb70 100644 (file)
@@ -27,6 +27,11 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
        if (!ret && daifmt)
                ret = snd_soc_dai_set_fmt(dai, daifmt);
 
+       if (ret == -ENOTSUPP) {
+               dev_dbg(dai->dev, "ASoC: set_fmt is not supported\n");
+               ret = 0;
+       }
+
        if (!ret && set->sysclk)
                ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0);