spa: Implement latency reporting

Implement latency reporting in alsa
Implement latency reporting on audioconf by passing on the latency
from the follower to outside of the adapter.
This commit is contained in:
Wim Taymans 2021-05-21 10:01:37 +02:00
parent 1a8f274a80
commit 1cd6d7b01d
8 changed files with 212 additions and 4 deletions

View file

@ -630,6 +630,8 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
state->headroom = SPA_MIN(state->headroom, state->buffer_frames);
state->start_delay = state->default_start_delay;
state->latency = state->headroom;
state->period_frames = period_size;
periods = state->buffer_frames / state->period_frames;