]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Mon, 11 Aug 2014 11:15:38 +0000 (14:15 +0300)
committerMark Brown <broonie@linaro.org>
Mon, 11 Aug 2014 12:40:24 +0000 (13:40 +0100)
commit469dfe70daf8d3cf85d14a51a7f2f44ed338c2b7
tree357891403022f6088c9a3ca3a7b78d800ccc1626
parent6c9f0287b2a501e63e64d1937e3e4729401bb070
ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset

There is no need to restore and restart PCM streams in case ADSP didn't
reach reset and power off state during system suspend/resume cycle. In that
case stream is still active but paused and firmware doesn't allow allocating
a new stream before paused stream is freed.

ADSP remains active in case suspend sequence didn't go to suspend_late
stage. This can happen when either suspend sequence is aborted by a wakeup
or by letting only devices suspend by "echo devices >/sys/power/pm_test".

Currently stream restoring fails in these suspend cases. Fix this by adding
a flag that indicates is complete stream reinitialization needed or is it
enough to resume paused stream. Flag is set when we know that ADSP reached
suspend_late.

Initial fix to this issue came from Fang Yang. I modified it a little and
forward ported it to top of two other suspend/resume patches from me.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Cc: yang fang <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/sst-baytrail-pcm.c