aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-26 11:35:46 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-26 13:08:45 -0400
commitfcdc4de7ad5037f38fe113b49496601f61e5ac9a (patch)
tree1d6da2f64b92690dabb23b9b4926a4b8a3ed619c /sound/soc/codecs/wm8994.c
parente9d9a968e7f50f7ade7e2b428df6e437905b3cd2 (diff)
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>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c3
1 files changed, 2 insertions, 1 deletions
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)
82 const struct wm8958_micd_rate *rates; 82 const struct wm8958_micd_rate *rates;
83 int num_rates; 83 int num_rates;
84 84
85 if (wm8994->jack_cb != wm8958_default_micdet) 85 if (!(wm8994->pdata && wm8994->pdata->micd_rates) &&
86 wm8994->jack_cb != wm8958_default_micdet)
86 return; 87 return;
87 88
88 idle = !wm8994->jack_mic; 89 idle = !wm8994->jack_mic;