ASoC: davinvi-mcasp: Proper suspend/resume support while audio is active
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 1 Oct 2014 13:02:12 +0000 (16:02 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 1 Oct 2014 16:02:09 +0000 (17:02 +0100)
commitf114ce605daa1fb9d4efa253ea6d5bd4802902af
tree9f688ab28ccc755e99ceda4a4ad432a0c2b1144d
parent1cc0c054f380c1c477642b5d9d9d9f697f641dbc
ASoC: davinvi-mcasp: Proper suspend/resume support while audio is active

If the board is sent to suspend (deep sleep) the McASP context will be lost.
In case when suspend happens during active audio we need to save and restore
more registers, which was configured during hw_param times as well.
We need to add more config registers, AFIFO control registers and we also
need to save and restore the serializer configuration as well.
Since the number of serializers depends on the SoC we need to allocate the
memory for it based on the num_serializer for the given McASP instance.

With this patch the ongoing stream will resume after resuming from deep
sleep.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c