On Tue, 13 Jun 2023 11:55:16 +0200, Takashi Iwai wrote:
On Tue, 13 Jun 2023 11:34:53 +0200, Jon Hunter wrote:
Commit 3ed2b549b39f ("ALSA: pcm: fix wait_time calculations") corrected the PCM wait_time calculations and in doing so reduced the calculated wait_time. This exposed an issue with the Tegra Master Volume Control (MVC) device where the reduced wait_time caused the MVC to fail. For now fix this by setting the default wait_time for Tegra to be 500ms.
Fixes: 3ed2b549b39f ("ALSA: pcm: fix wait_time calculations") Signed-off-by: Jon Hunter jonathanh@nvidia.com
Hm, it's still not clear why it fails. The commit above changes the timeout of wait_for_avail() to the full-buffer + 10% margin. In thoery, the loop should abort after the full buffer read, and that must be enough. If there were a large FIFO behind, it might be overflow, but the fifo_size of Tegra driver seems 4, so it's negligible.
If extending the timeout "fixes" the problem, it might indicate that the period update IRQ is triggered too late. Could you measure the timing of each snd_pcm_period_elapsed() and wait_for_avail() call?
OTOH, it's already at a pretty late stage for 6.4, and we need an urgent regression fix. So it's better to paper over it now, while hunting further for the real culprit.
Takashi