All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8978: SND_SOC_DAIFMT_NB_NF become default clock inversion
@ 2013-01-16  0:18 Kuninori Morimoto
  2013-01-16  1:04 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Kuninori Morimoto @ 2013-01-16  0:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-16 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  0:18 [PATCH] ASoC: wm8978: SND_SOC_DAIFMT_NB_NF become default clock inversion Kuninori Morimoto
2013-01-16  1:04 ` Mark Brown
2013-01-16  4:18   ` [PATCH] ASoC: SND_SOC_DAIFMT_NB_NF become 0 as default settings Kuninori Morimoto
2013-01-16 11:28     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.