Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232556
b: refs/heads/master
c: 20a4e7f
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 21, 2011
1 parent a20f1da commit 573bf84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc5a460a1bfa44273653700e33d4e7051194cbfd
refs/heads/master: 20a4e7fc7e213365ea3771d7bf1e10a6bab853be
15 changes: 7 additions & 8 deletions trunk/sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op)
static void calibrate_dc_servo(struct snd_soc_codec *codec)
{
struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
s8 offset;
u16 reg, reg_l, reg_r, dcs_cfg;

/* If we're using a digital only path and have a previously
Expand Down Expand Up @@ -149,16 +150,14 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
hubs->dcs_codes);

/* HPOUT1L */
if (reg_l + hubs->dcs_codes > 0 &&
reg_l + hubs->dcs_codes < 0xff)
reg_l += hubs->dcs_codes;
dcs_cfg = reg_l << WM8993_DCS_DAC_WR_VAL_1_SHIFT;
offset = reg_l;
offset += hubs->dcs_codes;
dcs_cfg = (u8)offset << WM8993_DCS_DAC_WR_VAL_1_SHIFT;

/* HPOUT1R */
if (reg_r + hubs->dcs_codes > 0 &&
reg_r + hubs->dcs_codes < 0xff)
reg_r += hubs->dcs_codes;
dcs_cfg |= reg_r;
offset = reg_r;
offset += hubs->dcs_codes;
dcs_cfg |= (u8)offset;

dev_dbg(codec->dev, "DCS result: %x\n", dcs_cfg);

Expand Down

0 comments on commit 573bf84

Please sign in to comment.