mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-28 05:40:21 -04:00
protocol-native: Don't signal memfd support for 9.0 clients
Although such 9.0 clients support memfd transport, they have an
iochannel bug that would break memfd audio if they're run in 32
bit mode over a 64-bit kernel. Influence them to use the POSIX
shared memory model instead.
Also bump the protocol version to exclusively mark such v9.0
libraries. Check commit 451d1d6762 for further details.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=97769
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
451d1d6762
commit
f665b2b10d
3 changed files with 21 additions and 3 deletions
12
PROTOCOL
12
PROTOCOL
|
|
@ -408,6 +408,18 @@ By doing so, there's need to reference the pool's memfd file descriptor any
|
||||||
further -- just its ID. Thus both endpoints can then quickly and safely
|
further -- just its ID. Thus both endpoints can then quickly and safely
|
||||||
close their memfd file descriptors.
|
close their memfd file descriptors.
|
||||||
|
|
||||||
|
## v32, implemented by >= 10.0
|
||||||
|
|
||||||
|
Enable memfd transport by default.
|
||||||
|
|
||||||
|
This protocol bump was only created to mark 9.0 clients. Although they
|
||||||
|
support memfd transport, such older clients has an iochannel bug that would
|
||||||
|
break memfd audio if they're run in 32-bit mode over a 64-bit kernel. Thus
|
||||||
|
influence these buggy libraries to use POSIX shared memory, by signalling
|
||||||
|
memfd support only to 10.0+ clients.
|
||||||
|
|
||||||
|
Check commit 451d1d676237c81 for further details.
|
||||||
|
|
||||||
#### If you just changed the protocol, read this
|
#### If you just changed the protocol, read this
|
||||||
## module-tunnel depends on the sink/source/sink-input/source-input protocol
|
## module-tunnel depends on the sink/source/sink-input/source-input protocol
|
||||||
## internals, so if you changed these, you might have broken module-tunnel.
|
## internals, so if you changed these, you might have broken module-tunnel.
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ AC_SUBST(PA_MINOR, pa_minor)
|
||||||
AC_SUBST(PA_MAJORMINOR, pa_major.pa_minor)
|
AC_SUBST(PA_MAJORMINOR, pa_major.pa_minor)
|
||||||
|
|
||||||
AC_SUBST(PA_API_VERSION, 12)
|
AC_SUBST(PA_API_VERSION, 12)
|
||||||
AC_SUBST(PA_PROTOCOL_VERSION, 31)
|
AC_SUBST(PA_PROTOCOL_VERSION, 32)
|
||||||
|
|
||||||
# The stable ABI for client applications, for the version info x:y:z
|
# The stable ABI for client applications, for the version info x:y:z
|
||||||
# always will hold y=z
|
# always will hold y=z
|
||||||
|
|
|
||||||
|
|
@ -2658,12 +2658,18 @@ static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
|
||||||
pa_log_debug("Negotiated SHM: %s", pa_yes_no(do_shm));
|
pa_log_debug("Negotiated SHM: %s", pa_yes_no(do_shm));
|
||||||
pa_pstream_enable_shm(c->pstream, do_shm);
|
pa_pstream_enable_shm(c->pstream, do_shm);
|
||||||
|
|
||||||
|
/* Do not declare memfd support for 9.0 client libraries (protocol v31).
|
||||||
|
*
|
||||||
|
* Although they support memfd transport, such 9.0 clients has an iochannel
|
||||||
|
* bug that would break memfd audio if they're run in 32-bit mode over a
|
||||||
|
* 64-bit kernel. Thus influence them to use the POSIX shared memory model
|
||||||
|
* instead. Check commit 451d1d676237c81 for further details. */
|
||||||
do_memfd =
|
do_memfd =
|
||||||
do_shm && pa_mempool_is_memfd_backed(c->protocol->core->mempool);
|
c->version >= 32 && do_shm && pa_mempool_is_memfd_backed(c->protocol->core->mempool);
|
||||||
|
|
||||||
shm_type = PA_MEM_TYPE_PRIVATE;
|
shm_type = PA_MEM_TYPE_PRIVATE;
|
||||||
if (do_shm) {
|
if (do_shm) {
|
||||||
if (c->version >= 31 && memfd_on_remote && do_memfd) {
|
if (do_memfd && memfd_on_remote) {
|
||||||
pa_pstream_enable_memfd(c->pstream);
|
pa_pstream_enable_memfd(c->pstream);
|
||||||
shm_type = PA_MEM_TYPE_SHARED_MEMFD;
|
shm_type = PA_MEM_TYPE_SHARED_MEMFD;
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue