[PORT FROM R2] [AUDIO] worker thread not canceled on close function call
BZ: 18531
ALSA SSP driver: when open is called, it initiates a worker thread
to perform the DMA configuration. (It cannot be done atomically).
If a write is called, followed by a closed before the worker thread
had time to run, once the worker thread will run, SSP will complain
that no handle is present...
The purpose of this patch is to cancel synchronously the work
during a close of the driver.
Change-Id: I1053225d4a5aff4a11c683c6250da6e70b229eba
Old-Change-Id: I8f3569a1809919a3d70b5e838f9a9bb869d87868
Signed-off-by: Francois Gaffie <francoisx.gaffie@intel.com>
Reviewed-on: http://android.intel.com:8080/31024
Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>