瀏覽代碼

ASoC: wm8994: Allow rate configuration with custom mic callback

If a driver using a custom mic detection callback has provided a table
of mic detection rates via platform data then use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown 13 年之前
父節點
當前提交
fcdc4de7ad
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      sound/soc/codecs/wm8994.c

+ 2 - 1
sound/soc/codecs/wm8994.c

@@ -82,7 +82,8 @@ static void wm8958_micd_set_rate(struct snd_soc_codec *codec)
 	const struct wm8958_micd_rate *rates;
 	int num_rates;
 
-	if (wm8994->jack_cb != wm8958_default_micdet)
+	if (!(wm8994->pdata && wm8994->pdata->micd_rates) &&
+	    wm8994->jack_cb != wm8958_default_micdet)
 		return;
 
 	idle = !wm8994->jack_mic;