diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-23 10:50:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-23 11:01:48 -0400 |
commit | 52ca1138fa55bf6f46a5e02a2c1088756a5c8f2e (patch) | |
tree | 3294727afc6378ed51606b3f24a34c0be4c916af /sound/soc/codecs/wm8994.c | |
parent | 7ccf6124fa3d71872626e352bded0802cc13e7c2 (diff) |
ASoC: wm8994: Update for new WM1811 variants
There are some new WM1811 variants distinguished by both revision and
cust_id which need slightly different handling.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index b74df52d2820..890b582b40f3 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3823,14 +3823,17 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3823 | wm8994->hubs.no_cache_dac_hp_direct = true; | 3823 | wm8994->hubs.no_cache_dac_hp_direct = true; |
3824 | wm8994->fll_byp = true; | 3824 | wm8994->fll_byp = true; |
3825 | 3825 | ||
3826 | switch (wm8994->revision) { | 3826 | switch (control->cust_id) { |
3827 | case 0: | 3827 | case 0: |
3828 | case 1: | ||
3829 | case 2: | 3828 | case 2: |
3830 | case 3: | ||
3831 | wm8994->hubs.dcs_codes_l = -9; | 3829 | wm8994->hubs.dcs_codes_l = -9; |
3832 | wm8994->hubs.dcs_codes_r = -7; | 3830 | wm8994->hubs.dcs_codes_r = -7; |
3833 | break; | 3831 | break; |
3832 | case 1: | ||
3833 | case 3: | ||
3834 | wm8994->hubs.dcs_codes_l = -8; | ||
3835 | wm8994->hubs.dcs_codes_r = -7; | ||
3836 | break; | ||
3834 | default: | 3837 | default: |
3835 | break; | 3838 | break; |
3836 | } | 3839 | } |
@@ -3919,7 +3922,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3919 | 3922 | ||
3920 | switch (control->type) { | 3923 | switch (control->type) { |
3921 | case WM1811: | 3924 | case WM1811: |
3922 | if (wm8994->revision > 1) { | 3925 | if (control->cust_id > 1 || wm8994->revision > 1) { |
3923 | ret = wm8994_request_irq(wm8994->wm8994, | 3926 | ret = wm8994_request_irq(wm8994->wm8994, |
3924 | WM8994_IRQ_GPIO(6), | 3927 | WM8994_IRQ_GPIO(6), |
3925 | wm1811_jackdet_irq, "JACKDET", | 3928 | wm1811_jackdet_irq, "JACKDET", |