Skip to content

Commit

Permalink
ASoC: wm8994: Update for new WM1811 variants
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
broonie committed Aug 23, 2012
1 parent 7ccf612 commit 52ca113
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sound/soc/codecs/wm8994.c
Expand Up @@ -3823,14 +3823,17 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
wm8994->hubs.no_cache_dac_hp_direct = true;
wm8994->fll_byp = true;

switch (wm8994->revision) {
switch (control->cust_id) {
case 0:
case 1:
case 2:
case 3:
wm8994->hubs.dcs_codes_l = -9;
wm8994->hubs.dcs_codes_r = -7;
break;
case 1:
case 3:
wm8994->hubs.dcs_codes_l = -8;
wm8994->hubs.dcs_codes_r = -7;
break;
default:
break;
}
Expand Down Expand Up @@ -3919,7 +3922,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)

switch (control->type) {
case WM1811:
if (wm8994->revision > 1) {
if (control->cust_id > 1 || wm8994->revision > 1) {
ret = wm8994_request_irq(wm8994->wm8994,
WM8994_IRQ_GPIO(6),
wm1811_jackdet_irq, "JACKDET",
Expand Down

0 comments on commit 52ca113

Please sign in to comment.