ASoC: Intel: Get correct usage_count value to load firmware
authorShilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Wed, 15 Jul 2015 14:58:09 +0000 (07:58 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 15 Jul 2015 16:03:36 +0000 (17:03 +0100)
commit412efa73dcd3bd03c1838c91e094533a95529039
tree05dc201cbb00da9670fcf07e32224a43beb0e402
parent8bc76c8bf6e5d96985eb05afe1b94699d580eb68
ASoC: Intel: Get correct usage_count value to load firmware

The usage_count variable was read before it was set to the correct
value, due to which the firmware load was failing. Because of this
IPC messages sent to the firmware were timing out causing a delay
of about 1 second while playing audio from the internal speakers.

With this patch the usage_count is read after the function call
pm_runtime_get_sync which will increment the usage_count variable
and the firmware load is successful and all the IPC messages are
processed correctly.

Signed-off-by: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
sound/soc/intel/atom/sst/sst_drv_interface.c