From: Mark Brown Date: Thu, 27 Sep 2012 17:35:24 +0000 (+0100) Subject: ASoC: wm_hubs: Ensure volume updates are handled during class W startup X-Git-Tag: v3.5.7~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f912f2331931e69b585e6e74f88cb50a5e02fcb8;p=thirdparty%2Fkernel%2Fstable.git ASoC: wm_hubs: Ensure volume updates are handled during class W startup commit eb4d5fc1f0ce89e3d5b072c594a1e213a0e05881 upstream. In some circumstances we may need to flush volume updates to the device after switching to class W mode. Do this unconditionally to ensure that these situations are handled. Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index dfe957a47f29b..932a535183eff 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -634,6 +634,11 @@ void wm_hubs_update_class_w(struct snd_soc_codec *codec) snd_soc_update_bits(codec, WM8993_CLASS_W_0, WM8993_CP_DYN_V | WM8993_CP_DYN_FREQ, enable); + + snd_soc_write(codec, WM8993_LEFT_OUTPUT_VOLUME, + snd_soc_read(codec, WM8993_LEFT_OUTPUT_VOLUME)); + snd_soc_write(codec, WM8993_RIGHT_OUTPUT_VOLUME, + snd_soc_read(codec, WM8993_RIGHT_OUTPUT_VOLUME)); } EXPORT_SYMBOL_GPL(wm_hubs_update_class_w);