]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Fix block is enabled multiple times issue
authorJie Yang <yang.jie@intel.com>
Thu, 30 Oct 2014 13:21:52 +0000 (21:21 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 30 Oct 2014 13:41:22 +0000 (13:41 +0000)
commit7d0a251d35a35d21d6c87e721b94f0e4883a2abd
treeed180b036ce62e8a783d1faa59b26050cba4d1ac
parent97b947466ceaea9583f2703bf302271460a9b3cc
ASoC: Intel: Fix block is enabled multiple times issue

During FW parsing and loading, block_list_prepare() may
be called for each raw data block copying and this may
made the hsw_block_enable() called mutiple times, which
increase block->users many times. The result of this is
hsw_block_disable() can't power gated the related block
when trying to free the blocks during suspend, and the
power gating status also confused.

Here check the block user status, only calling enable()
for those blocks who has no user yet. Remember that
this works correctlly on current case, where there are
enough SRAM memory so different module won't share a
memory block. For further usage, we may need restructure
the struct sst_mem_block to save the module list who is
using it.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst-firmware.c