[alsa-devel] [RFC PATCH v2 1/2] ASoC: wm8994: default master clock selection

olivier moysan olivier.moysan at st.com
Fri Mar 17 16:41:50 CET 2017


This patch allows the wm8994 codec driver to be used
with simple card when mclk fs is provided in dai link.

Signed-off-by: olivier moysan <olivier.moysan at st.com>
---
 sound/soc/codecs/wm8994.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 3896523..ccf640a 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2389,6 +2389,7 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai,
 
 	switch (clk_id) {
 	case WM8994_SYSCLK_MCLK1:
+	default:
 		wm8994->sysclk[dai->id - 1] = WM8994_SYSCLK_MCLK1;
 		wm8994->mclk[0] = freq;
 		dev_dbg(dai->dev, "AIF%d using MCLK1 at %uHz\n",
@@ -2431,9 +2432,6 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai,
 			snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_2,
 					    WM8994_OPCLK_ENA, 0);
 		}
-
-	default:
-		return -EINVAL;
 	}
 
 	configure_clock(codec);
-- 
1.9.1



More information about the Alsa-devel mailing list