[PORT FROM R2] [AUDIO] worker thread not canceled on close function call
authorFrancois Gaffie <francoisx.gaffie@intel.com>
Wed, 4 Jan 2012 16:08:31 +0000 (17:08 +0100)
committerbuildbot <buildbot@intel.com>
Fri, 6 Jan 2012 11:59:15 +0000 (03:59 -0800)
commit98d993a57909ed184dda57363ace568fad7e9c07
treed9a570664731dbc676923a76637187d8a4127efc
parent523932a54d94d76b87eac6621ea1d37e69bbfcdf
[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>
sound/pci/intel_mid_i2s/intel_alsa_ifx_snd_card.c
sound/pci/intel_mid_i2s/intel_alsa_ssp_snd_card.c