ASoC: Intel: avs: Update stream status in a separate thread
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tue, 8 Oct 2024 08:37:58 +0000 (10:37 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 8 Oct 2024 09:49:11 +0000 (10:49 +0100)
commit0dbb186c3510cad4e9f443e801bf2e6ab5770c00
tree02b037207fec1c2b116b7f26feb82eeb53125afb
parent8380dbf1b9ef66e3ce6c1d660fd7259637c2a929
ASoC: Intel: avs: Update stream status in a separate thread

Function snd_pcm_period_elapsed() is part of sequence servicing HDAudio
stream IRQs. It's called under Global Interrupt Enable (GIE) disabled -
no HDAudio interrupts will be raised. At the same time, the function may
end up calling __snd_pcm_xrun() or snd_pcm_drain_done(). On the
avs-driver side, this translates to IPCs and as GIE is disabled, these
will never complete successfully.

Improve system stability by scheduling stream-IRQ handling in a separate
thread.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20241008083758.756578-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/core.c
sound/soc/intel/avs/pcm.c
sound/soc/intel/avs/pcm.h [new file with mode: 0644]