Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305605
b: refs/heads/master
c: 20dc24a
h: refs/heads/master
i:
  305603: 365723b
v: v3
  • Loading branch information
Mark Brown committed Apr 10, 2012
1 parent 09a7834 commit e464db4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34ff0f95b1d7afc707f121ea3ae6b211fc176fbd
refs/heads/master: 20dc24a951f4792070803d8f1838c8ed3f4e5d57
19 changes: 19 additions & 0 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,14 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset,
WM8994_FLL1_ENA, 0);

if (wm8994->fll_byp && src == WM8994_FLL_SRC_BCLK &&
freq_in == freq_out) {
dev_dbg(codec->dev, "Bypassing FLL%d\n", id + 1);
snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_5 + reg_offset,
WM8958_FLL1_BYP, WM8958_FLL1_BYP);
goto out;
}

reg = (fll.outdiv << WM8994_FLL1_OUTDIV_SHIFT) |
(fll.fll_fratio << WM8994_FLL1_FRATIO_SHIFT);
snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_2 + reg_offset,
Expand All @@ -1991,6 +1999,7 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
fll.n << WM8994_FLL1_N_SHIFT);

snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_5 + reg_offset,
WM8958_FLL1_BYP |
WM8994_FLL1_REFCLK_DIV_MASK |
WM8994_FLL1_REFCLK_SRC_MASK,
(fll.clk_ref_div << WM8994_FLL1_REFCLK_DIV_SHIFT) |
Expand Down Expand Up @@ -2053,6 +2062,7 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
}
}

out:
wm8994->fll[id].in = freq_in;
wm8994->fll[id].out = freq_out;
wm8994->fll[id].src = src;
Expand Down Expand Up @@ -3579,13 +3589,22 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
case WM8958:
wm8994->hubs.dcs_readback_mode = 1;
wm8994->hubs.hp_startup_mode = 1;

switch (wm8994->revision) {
case 0:
break;
default:
wm8994->fll_byp = true;
break;
}
break;

case WM1811:
wm8994->hubs.dcs_readback_mode = 2;
wm8994->hubs.no_series_update = 1;
wm8994->hubs.hp_startup_mode = 1;
wm8994->hubs.no_cache_class_w = true;
wm8994->fll_byp = true;

switch (wm8994->revision) {
case 0:
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/wm8994.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct wm8994_priv {
struct wm8994_fll_config fll[2], fll_suspend[2];
struct completion fll_locked[2];
bool fll_locked_irq;
bool fll_byp;

int vmid_refcount;
int active_refcount;
Expand Down

0 comments on commit e464db4

Please sign in to comment.