diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-01 13:44:25 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-01 14:22:01 +0000 |
commit | cd1707a99a2cb43cd8ab0c1952b455b218f15884 (patch) | |
tree | bff5dbc48acb806834ce224f5e09c52ee4ca70e6 /sound | |
parent | 52ac7ab2475da2b577e4a4616c98b5d1fa3a3cfd (diff) |
ASoC: Add platform data for WM8958/WM1811 microphone detection rates
Allow systems to override the default microphone detection rates using
platform data in case the settings are not suitable (eg, due to an
unusually noisy jack).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 91f3638ab33f..6bdf8137c7e8 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -60,13 +60,6 @@ static int wm8994_retune_mobile_base[] = { static void wm8958_default_micdet(u16 status, void *data); -struct wm8958_micd_rate { - int sysclk; - bool idle; - int start; - int rate; -}; - static const struct wm8958_micd_rate micdet_rates[] = { { 32768, true, 1, 4 }, { 32768, false, 1, 1 }, @@ -100,7 +93,10 @@ static void wm8958_micd_set_rate(struct snd_soc_codec *codec) else sysclk = wm8994->aifclk[0]; - if (wm8994->jackdet) { + if (wm8994->pdata && wm8994->pdata->micd_rates) { + rates = wm8994->pdata->micd_rates; + num_rates = wm8994->pdata->num_micd_rates; + } else if (wm8994->jackdet) { rates = jackdet_rates; num_rates = ARRAY_SIZE(jackdet_rates); } else { |