mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
jack: always unmap old io area
This commit is contained in:
parent
44b7eb4630
commit
2c25b8c216
2 changed files with 15 additions and 14 deletions
|
|
@ -862,9 +862,10 @@ static int client_node_set_io(void *object,
|
||||||
void *ptr;
|
void *ptr;
|
||||||
uint32_t tag[5] = { c->node_id, id, };
|
uint32_t tag[5] = { c->node_id, id, };
|
||||||
|
|
||||||
|
if ((mm = pw_mempool_find_tag(c->remote->pool, tag, sizeof(tag))) != NULL)
|
||||||
|
pw_memmap_free(mm);
|
||||||
|
|
||||||
if (mem_id == SPA_ID_INVALID) {
|
if (mem_id == SPA_ID_INVALID) {
|
||||||
if ((mm = pw_mempool_find_tag(c->remote->pool, tag, sizeof(tag))) != NULL)
|
|
||||||
pw_memmap_free(mm);
|
|
||||||
mm = ptr = NULL;
|
mm = ptr = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1306,9 +1307,10 @@ static int client_node_port_set_io(void *object,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mm = pw_mempool_find_tag(c->remote->pool, tag, sizeof(tag))) != NULL)
|
||||||
|
pw_memmap_free(mm);
|
||||||
|
|
||||||
if (mem_id == SPA_ID_INVALID) {
|
if (mem_id == SPA_ID_INVALID) {
|
||||||
if ((mm = pw_mempool_find_tag(c->remote->pool, tag, sizeof(tag))) != NULL)
|
|
||||||
pw_memmap_free(mm);
|
|
||||||
|
|
||||||
mm = ptr = NULL;
|
mm = ptr = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
@ -1362,6 +1364,13 @@ static int client_node_set_activation(void *object,
|
||||||
void *ptr;
|
void *ptr;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
|
if (c->node_id == node_id) {
|
||||||
|
pw_log_debug(NAME" %p: our activation %u: %u %u %u", c, node_id,
|
||||||
|
mem_id, offset, size);
|
||||||
|
close(signalfd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (mem_id == SPA_ID_INVALID) {
|
if (mem_id == SPA_ID_INVALID) {
|
||||||
mm = ptr = NULL;
|
mm = ptr = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
@ -1380,22 +1389,12 @@ static int client_node_set_activation(void *object,
|
||||||
pw_log_debug(NAME" %p: set activation %u: %u %u %u %p", c, node_id,
|
pw_log_debug(NAME" %p: set activation %u: %u %u %u %p", c, node_id,
|
||||||
mem_id, offset, size, ptr);
|
mem_id, offset, size, ptr);
|
||||||
|
|
||||||
if (c->node_id == node_id) {
|
|
||||||
pw_log_debug(NAME" %p: our activation %u: %u %u %u %p", c, node_id,
|
|
||||||
mem_id, offset, size, ptr);
|
|
||||||
if (mm)
|
|
||||||
pw_memmap_free(mm);
|
|
||||||
close(signalfd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
link = pw_array_add(&c->links, sizeof(struct link));
|
link = pw_array_add(&c->links, sizeof(struct link));
|
||||||
if (link == NULL) {
|
if (link == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
link->node_id = SPA_ID_INVALID;
|
|
||||||
link->node_id = node_id;
|
link->node_id = node_id;
|
||||||
link->mem = mm;
|
link->mem = mm;
|
||||||
link->activation = ptr;
|
link->activation = ptr;
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ jack_uuid_t jack_client_uuid_generate ()
|
||||||
static uint32_t uuid_cnt = 0;
|
static uint32_t uuid_cnt = 0;
|
||||||
jack_uuid_t uuid = 0x2; /* JackUUIDClient */;
|
jack_uuid_t uuid = 0x2; /* JackUUIDClient */;
|
||||||
uuid = (uuid << 32) | ++uuid_cnt;
|
uuid = (uuid << 32) | ++uuid_cnt;
|
||||||
|
pw_log_debug("uuid %"PRIu64, uuid);
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,6 +44,7 @@ jack_uuid_t jack_port_uuid_generate (uint32_t port_id)
|
||||||
{
|
{
|
||||||
jack_uuid_t uuid = 0x1; /* JackUUIDPort */
|
jack_uuid_t uuid = 0x1; /* JackUUIDPort */
|
||||||
uuid = (uuid << 32) | (port_id + 1);
|
uuid = (uuid << 32) | (port_id + 1);
|
||||||
|
pw_log_debug("uuid %d -> %"PRIu64, port_id, uuid);
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue