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.
Should this be sent as a fix?
Ah yes, good point. I thought it was a SoundWire-only patch but no it
also applies to the TDM configuration.
These should be a tag:
Fixes: 94d2d08974746 ('ASoC: Intel: Boards: tgl_max98373: add
dai_trigger function')
Do you want me to resend with the tag, or can you apply it directly?