Skip to content
Commit b80d19c1 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown
Browse files

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: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: default avatarBorun Fu <borun.fu@intel.com>
Cc: yang fang <yang.a.fang@intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 9246539b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment