diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-11 13:00:19 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-18 06:52:25 -0400 |
commit | 780e2806986f9cc980808687da95160c65baa78a (patch) | |
tree | 85530f13f1b2cf6fabb3622eef016bf06700e05d /sound/soc/codecs | |
parent | b1a56b331aec59be04f25ac99694d855d591c539 (diff) |
ASoC: Treat WM8958 revision A as WM8994 revision D
The first WM8958 revision requires similar treatment.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 3dc64c8b6a5c..9458289bb563 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3327,14 +3327,23 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3327 | case WM8958: | 3327 | case WM8958: |
3328 | snd_soc_add_controls(codec, wm8958_snd_controls, | 3328 | snd_soc_add_controls(codec, wm8958_snd_controls, |
3329 | ARRAY_SIZE(wm8958_snd_controls)); | 3329 | ARRAY_SIZE(wm8958_snd_controls)); |
3330 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, | ||
3331 | ARRAY_SIZE(wm8994_lateclk_widgets)); | ||
3332 | snd_soc_dapm_new_controls(dapm, wm8994_adc_widgets, | ||
3333 | ARRAY_SIZE(wm8994_adc_widgets)); | ||
3334 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, | ||
3335 | ARRAY_SIZE(wm8994_dac_widgets)); | ||
3336 | snd_soc_dapm_new_controls(dapm, wm8958_dapm_widgets, | 3330 | snd_soc_dapm_new_controls(dapm, wm8958_dapm_widgets, |
3337 | ARRAY_SIZE(wm8958_dapm_widgets)); | 3331 | ARRAY_SIZE(wm8958_dapm_widgets)); |
3332 | if (wm8994->revision < 1) { | ||
3333 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_revd_widgets, | ||
3334 | ARRAY_SIZE(wm8994_lateclk_revd_widgets)); | ||
3335 | snd_soc_dapm_new_controls(dapm, wm8994_adc_revd_widgets, | ||
3336 | ARRAY_SIZE(wm8994_adc_revd_widgets)); | ||
3337 | snd_soc_dapm_new_controls(dapm, wm8994_dac_revd_widgets, | ||
3338 | ARRAY_SIZE(wm8994_dac_revd_widgets)); | ||
3339 | } else { | ||
3340 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, | ||
3341 | ARRAY_SIZE(wm8994_lateclk_widgets)); | ||
3342 | snd_soc_dapm_new_controls(dapm, wm8994_adc_widgets, | ||
3343 | ARRAY_SIZE(wm8994_adc_widgets)); | ||
3344 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, | ||
3345 | ARRAY_SIZE(wm8994_dac_widgets)); | ||
3346 | } | ||
3338 | break; | 3347 | break; |
3339 | } | 3348 | } |
3340 | 3349 | ||
@@ -3358,10 +3367,17 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3358 | } | 3367 | } |
3359 | break; | 3368 | break; |
3360 | case WM8958: | 3369 | case WM8958: |
3361 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_intercon, | 3370 | if (wm8994->revision < 1) { |
3362 | ARRAY_SIZE(wm8994_lateclk_intercon)); | 3371 | snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, |
3363 | snd_soc_dapm_add_routes(dapm, wm8958_intercon, | 3372 | ARRAY_SIZE(wm8994_revd_intercon)); |
3364 | ARRAY_SIZE(wm8958_intercon)); | 3373 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, |
3374 | ARRAY_SIZE(wm8994_lateclk_revd_intercon)); | ||
3375 | } else { | ||
3376 | snd_soc_dapm_add_routes(dapm, wm8994_lateclk_intercon, | ||
3377 | ARRAY_SIZE(wm8994_lateclk_intercon)); | ||
3378 | snd_soc_dapm_add_routes(dapm, wm8958_intercon, | ||
3379 | ARRAY_SIZE(wm8958_intercon)); | ||
3380 | } | ||
3365 | break; | 3381 | break; |
3366 | } | 3382 | } |
3367 | 3383 | ||