Skip to content

Commit 11cef5f

Browse files
committed
ASoC: Use DC servo startup mode when not doing DCS correction
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>
1 parent 4b66672 commit 11cef5f

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎sound/soc/codecs/wm_hubs.c‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,20 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
105105
return;
106106
}
107107

108-
/* Set for 32 series updates */
109-
snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
110-
WM8993_DCS_SERIES_NO_01_MASK,
111-
32 << WM8993_DCS_SERIES_NO_01_SHIFT);
112-
wait_for_dc_servo(codec,
113-
WM8993_DCS_TRIG_SERIES_0 | WM8993_DCS_TRIG_SERIES_1);
108+
/* Devices not using a DCS code correction have startup mode */
109+
if (hubs->dcs_codes) {
110+
/* Set for 32 series updates */
111+
snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
112+
WM8993_DCS_SERIES_NO_01_MASK,
113+
32 << WM8993_DCS_SERIES_NO_01_SHIFT);
114+
wait_for_dc_servo(codec,
115+
WM8993_DCS_TRIG_SERIES_0 |
116+
WM8993_DCS_TRIG_SERIES_1);
117+
} else {
118+
wait_for_dc_servo(codec,
119+
WM8993_DCS_TRIG_STARTUP_0 |
120+
WM8993_DCS_TRIG_STARTUP_1);
121+
}
114122

115123
/* Different chips in the family support different readback
116124
* methods.

0 commit comments

Comments
 (0)