mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
ASoC: Intel: avs: Unprepare a stream when XRUN occurs
The pcm->prepare() function may be called multiple times in a row by the
userspace, as mentioned in the documentation. The driver shall take that
into account and prevent redundancy. However, the exact same function is
called during XRUNs and in such case, the particular stream shall be
reset and setup anew.
Fixes: 9114700b49 ("ASoC: Intel: avs: Generic PCM FE operations")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251023092348.3119313-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3293d3d7b0
commit
cfca1637bc
|
|
@ -754,6 +754,8 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
|
|||
data = snd_soc_dai_get_dma_data(dai, substream);
|
||||
host_stream = data->host_stream;
|
||||
|
||||
if (runtime->state == SNDRV_PCM_STATE_XRUN)
|
||||
hdac_stream(host_stream)->prepared = false;
|
||||
if (hdac_stream(host_stream)->prepared)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user