ASoC: Intel: Skylake: Fix DSP resource de-allocation
authorJeeja KP <jeeja.kp@intel.com>
Mon, 28 Mar 2016 16:41:31 +0000 (22:11 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 28 Mar 2016 09:38:00 +0000 (10:38 +0100)
commit4f329d9fbab630af44db2f787eb79ca52e6ba22e
tree88b0dc6e499f501ba2a69760d28536293ba69ebc
parentd643678b9a4e432a574b2ec601216afd720c69b6
ASoC: Intel: Skylake: Fix DSP resource de-allocation

In PRE PMD of widget handler DSP resources are allocated after
the creation of DSP pipe and modules and in POST PMD DSP
resources are destroyed.

If there is any failure in pipe or module creation in PRE PMD,
pcm trigger fails and finally POST PMD gets called and DSP
resources are freed, without getting allocated.

Fixes the DSP resource de-allocation by allocating the resource
before creation of pipe and module in PRE PMD and in POST PMD,
free the resources.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c