audio:sst: Flush message reply wq before allowing runtime suspend to exit
authorSamu Onkalo <samu.onkalo@intel.com>
Thu, 17 May 2012 10:34:08 +0000 (13:34 +0300)
committerbuildbot <buildbot@intel.com>
Mon, 21 May 2012 10:56:38 +0000 (03:56 -0700)
commit71c04afab5fdbafc6af3b1802cdcdbba7634434a
treee9c00dcb83f59917e732a380f8d2f14f8d5adf99
parente669f0fd2aeb0ae5b7a524ad05e3a5c977eeb4ce
audio:sst: Flush message reply wq before allowing runtime suspend to exit

BZ: 32221

Audio IPC message processing happens in a workqueue while the runtime
suspend in running in different context. There is a race condition
between those. Sometimes runtime suspend turns the audio sub system off
before the message workqueue is finished. At the end of the
message handling there are writes to audio sub system registers.

Flush the message handling workqueues before leaving the runtime_suspend
call. This guarantees that the other activity is properly finished.

Change-Id: I1612fb3206a186b0877f0c8dc94bf0ee40c9dfe5
Signed-off-by: Samu Onkalo <samu.onkalo@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Reviewed-on: http://android.intel.com:8080/49229
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Koul, Vinod <vinod.koul@intel.com>
Reviewed-by: Gupta, ArvindX K <arvindx.k.gupta@intel.com>
Reviewed-by: Hibare, PramodX <pramodx.hibare@intel.com>
Tested-by: Hibare, PramodX <pramodx.hibare@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
sound/soc/mid-x86/sst/intel_sst.c