Skip to content

Commit cfca163

Browse files
crojewsk-intelbroonie
authored andcommitted
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: 9114700 ("ASoC: Intel: avs: Generic PCM FE operations") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3293d3d commit cfca163

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sound/soc/intel/avs/pcm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
754754
data = snd_soc_dai_get_dma_data(dai, substream);
755755
host_stream = data->host_stream;
756756

757+
if (runtime->state == SNDRV_PCM_STATE_XRUN)
758+
hdac_stream(host_stream)->prepared = false;
757759
if (hdac_stream(host_stream)->prepared)
758760
return 0;
759761

0 commit comments

Comments
 (0)