Current wm8978 driver return -EINVAL if it doesn't have SND_SOC_DAIFMT_INV_MASK flags on snd_soc_dai_ops :: set_fmt. But default settings should be treated as SND_SOC_DAIFMT_NB_NF (= no clock inversion).
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/codecs/wm8978.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index f347af3..ba01981 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -692,8 +692,6 @@ static int wm8978_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
/* clock inversion */ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { - case SND_SOC_DAIFMT_NB_NF: - break; case SND_SOC_DAIFMT_IB_IF: iface |= 0x180; break; @@ -703,8 +701,9 @@ static int wm8978_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) case SND_SOC_DAIFMT_NB_IF: iface |= 0x80; break; + case SND_SOC_DAIFMT_NB_NF: default: - return -EINVAL; + break; }
snd_soc_write(codec, WM8978_AUDIO_INTERFACE, iface);