Skip to content

Commit e244bb9

Browse files
morimotobroonie
authored andcommitted
ASoC: simple-card: un-implemented set_fmt is not error
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 61e6cfa commit e244bb9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sound/soc/generic/simple-card.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
2727
if (!ret && daifmt)
2828
ret = snd_soc_dai_set_fmt(dai, daifmt);
2929

30+
if (ret == -ENOTSUPP) {
31+
dev_dbg(dai->dev, "ASoC: set_fmt is not supported\n");
32+
ret = 0;
33+
}
34+
3035
if (!ret && set->sysclk)
3136
ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0);
3237

0 commit comments

Comments
 (0)