mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 04:30:04 +01:00
alsa: add firewire latency before we scale with rate
We first add all the latency in the rate of the pcm device and then convert it to the rate of the graph. See #4977
This commit is contained in:
parent
52f2137397
commit
4152c5d292
1 changed files with 2 additions and 2 deletions
|
|
@ -2063,8 +2063,6 @@ static void recalc_headroom(struct state *state)
|
|||
state->headroom = 0;
|
||||
|
||||
latency = SPA_MAX(state->min_delay, SPA_MIN(state->max_delay, state->headroom));
|
||||
if (rate != 0 && state->rate != 0)
|
||||
latency = SPA_SCALE32_UP(latency, rate, state->rate);
|
||||
|
||||
if (state->is_firewire) {
|
||||
/* XXX: For ALSA FireWire drivers, unlike for other ALSA drivers, buffer size
|
||||
|
|
@ -2072,6 +2070,8 @@ static void recalc_headroom(struct state *state)
|
|||
*/
|
||||
latency += state->buffer_frames;
|
||||
}
|
||||
if (rate != 0 && state->rate != 0)
|
||||
latency = SPA_SCALE32_UP(latency, rate, state->rate);
|
||||
|
||||
state->latency[state->port_direction].min_rate =
|
||||
state->latency[state->port_direction].max_rate = latency;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue