From: Mark Brown Date: Thu, 26 Apr 2012 15:35:46 +0000 (+0100) Subject: ASoC: wm8994: Allow rate configuration with custom mic callback X-Git-Tag: firefly_0821_release~3680^2~2691^2~9^2~64 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fcdc4de7ad5037f38fe113b49496601f61e5ac9a;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index e10d46a56815..ca6d822eb112 100644 --- a/sound/soc/codecs/wm8994.c +++ b/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;