Skip to content

Commit b6190c4

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: SOF: imx: Add SNDRV_PCM_INFO_BATCH flag
The sof imx pcm device is a device which should support double buffering. Found this issue with pipewire. When there is no SNDRV_PCM_INFO_BATCH flag in driver, the pipewire will set headroom to be zero, and because sof pcm device don't support residue report, when the latency setting is small, the "delay" always larger than "target" in alsa-pcm.c, that reading next period data is not scheduled on time. With SNDRV_PCM_INFO_BATCH flag in driver, the pipewire will select a smaller period size for device, then the task of reading next period data will be scheduled on time. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1703669263-13832-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent f87b440 commit b6190c4

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/sof/imx/imx8.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ static struct snd_sof_dsp_ops sof_imx8x_ops = {
603603
SNDRV_PCM_INFO_MMAP_VALID |
604604
SNDRV_PCM_INFO_INTERLEAVED |
605605
SNDRV_PCM_INFO_PAUSE |
606+
SNDRV_PCM_INFO_BATCH |
606607
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP
607608
};
608609

sound/soc/sof/imx/imx8m.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ static struct snd_sof_dsp_ops sof_imx8m_ops = {
472472
SNDRV_PCM_INFO_MMAP_VALID |
473473
SNDRV_PCM_INFO_INTERLEAVED |
474474
SNDRV_PCM_INFO_PAUSE |
475+
SNDRV_PCM_INFO_BATCH |
475476
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
476477
};
477478

sound/soc/sof/imx/imx8ulp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ static struct snd_sof_dsp_ops sof_imx8ulp_ops = {
463463
SNDRV_PCM_INFO_MMAP_VALID |
464464
SNDRV_PCM_INFO_INTERLEAVED |
465465
SNDRV_PCM_INFO_PAUSE |
466+
SNDRV_PCM_INFO_BATCH |
466467
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
467468

468469
/* PM */

0 commit comments

Comments
 (0)