]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case
authorRander Wang <rander.wang@intel.com>
Fri, 21 Aug 2020 19:55:53 +0000 (14:55 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 24 Aug 2020 19:15:14 +0000 (20:15 +0100)
commit072f9b8ac09f49654dabcc1871356d5efc2796e4
tree084d190df7e526152552e7a33489826c71b4b6d1
parent3d027756fb269cd1e39841cc9df57410bb154375
ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case

When the playback & capture streams are stopped simultaneously, the
SOF PCI device will remain pm_runtime active. The root-cause is a race
condition with two threads reaching the trigger function at the same
time. They see another stream is active so the dapm pin is not
disabled, so the codec remains active as well as the parent PCI
device.

For max98373, the capture stream provides feedback when playback is
working and it is unused when playback is stopped. So the dapm pin
should be set only when playback is active.

Fixes: 07d0935657ad5 ('ASoC: Intel: Boards: tgl_max98373: add dai_trigger function')
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200821195603.215535-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_maxim_common.c