]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: wm_hubs: Ensure volume updates are handled during class W startup
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 27 Sep 2012 17:35:24 +0000 (18:35 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 28 Sep 2012 11:06:31 +0000 (12:06 +0100)
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 <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
sound/soc/codecs/wm_hubs.c

index 7a773a835b8ea08aaa7fa61b09880010e81ac072..867ae97ddcec1b495ec061cd373410bc80272d0b 100644 (file)
@@ -681,6 +681,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);