]> Gentwo Git Trees - linux/.git/commit
ASoC: SOF: Intel: hda-pcm: Place the constraint on period time instead of buffer...
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 2 Oct 2025 13:57:52 +0000 (16:57 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 2 Oct 2025 14:03:32 +0000 (15:03 +0100)
commit45ad27d9a6f7c620d8bbc80be3bab1faf37dfa0a
tree7a8259d86065b4642fbccb65b000e927e1bcab0a
parent3dcf683bf1062d69014fe81b90d285c7eb85ca8a
ASoC: SOF: Intel: hda-pcm: Place the constraint on period time instead of buffer time

Instead of constraining the ALSA buffer time to be double of the firmware
host buffer size, it is better to set it for the period time.
This will implicitly constrain the buffer time to a safe value
(num_periods is at least 2) and prohibits applications to set smaller
period size than what will be covered by the initial DMA burst.

Fixes: fe76d2e75a6d ("ASoC: SOF: Intel: hda-pcm: Use dsp_max_burst_size_in_ms to place constraint")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20251002135752.2430-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-pcm.c