alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()
authorGeorg Chini <georg@chini.tk>
Fri, 4 May 2018 19:10:46 +0000 (21:10 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 11 May 2018 08:11:38 +0000 (11:11 +0300)
commitb32705a5d48e9fd022d406c5a803f5bf1585ce51
tree5a80bf1bb884621850d26b4b4c83f9fd5a3ca648
parent3b04539d5ee3c8a67c5a10c1b8ac87544ed58180
alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()

The current code does not call snd_pcm_status_set_audio_htstamp_config()
to configure the way timestamps are updated in ALSA. In kernel 4.14 and
above a bug in ALSA has been fixed which changes timmestamp behavior.
This leads to inconsistencies in the delay reporting because the time
stamp no longer reflects the time when the delay was updated if the
ALSA report_delay flag is not set. Therefore latencies are not calculated
correctly.

This patch uses snd_pcm_status_set_audio_htstamp_config() to set the
ALSA report_delay flag to 1 before the call to snd_pcm_status(). With
this, time stamps are updated as expected.
src/modules/alsa/alsa-util.c