Skip to content

Commit

Permalink
ASoC: Use DC servo startup mode when not doing DCS correction
Browse files Browse the repository at this point in the history
Devices which do not have a DCS correction applied can use the explicit
DC servo startup mode for optimal startup performance. This most
immediately affects the WM8958.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Nov 27, 2010
1 parent 4b66672 commit 11cef5f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
return;
}

/* Set for 32 series updates */
snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
WM8993_DCS_SERIES_NO_01_MASK,
32 << WM8993_DCS_SERIES_NO_01_SHIFT);
wait_for_dc_servo(codec,
WM8993_DCS_TRIG_SERIES_0 | WM8993_DCS_TRIG_SERIES_1);
/* Devices not using a DCS code correction have startup mode */
if (hubs->dcs_codes) {
/* Set for 32 series updates */
snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
WM8993_DCS_SERIES_NO_01_MASK,
32 << WM8993_DCS_SERIES_NO_01_SHIFT);
wait_for_dc_servo(codec,
WM8993_DCS_TRIG_SERIES_0 |
WM8993_DCS_TRIG_SERIES_1);
} else {
wait_for_dc_servo(codec,
WM8993_DCS_TRIG_STARTUP_0 |
WM8993_DCS_TRIG_STARTUP_1);
}

/* Different chips in the family support different readback
* methods.
Expand Down

0 comments on commit 11cef5f

Please sign in to comment.