[alsa-devel] [PATCH] ASoC: wm8978: SND_SOC_DAIFMT_NB_NF become default clock inversion

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Jan 16 01:18:30 CET 2013


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 at 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);
-- 
1.7.9.5



More information about the Alsa-devel mailing list