diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index 21e55ce44..1b52253ed 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -105,7 +105,8 @@ struct port { #define IDX_IO 2 #define IDX_Format 3 #define IDX_Buffers 4 -#define N_PORT_PARAMS 5 +#define IDX_Latency 5 +#define N_PORT_PARAMS 6 struct spa_param_info params[N_PORT_PARAMS]; struct spa_io_buffers *io; @@ -188,6 +189,8 @@ static int get_port_param_index(uint32_t id) return IDX_Format; case SPA_PARAM_Buffers: return IDX_Buffers; + case SPA_PARAM_Latency: + return IDX_Latency; default: return -1; } @@ -1493,6 +1496,7 @@ void *pw_filter_add_port(struct pw_filter *filter, p->params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0); p->params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE); p->params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0); + p->params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Buffers, SPA_PARAM_INFO_WRITE); p->info.params = p->params; p->info.n_params = N_PORT_PARAMS; diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index a875f14d0..c86aafe6e 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1657,7 +1657,7 @@ pw_stream_connect(struct pw_stream *stream, impl->port_params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0); impl->port_params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE); impl->port_params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0); - impl->port_params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Latency, 0); + impl->port_params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Latency, SPA_PARAM_INFO_WRITE); impl->port_info.props = &impl->port_props->dict; impl->port_info.params = impl->port_params; impl->port_info.n_params = N_PORT_PARAMS;