mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
port: ignore not implemented mixer methods
This commit is contained in:
parent
a680f434d2
commit
428cb5de75
2 changed files with 14 additions and 14 deletions
|
|
@ -141,22 +141,19 @@ void pw_control_add_listener(struct pw_control *control,
|
||||||
|
|
||||||
static int port_set_io(struct pw_port *port, uint32_t mix, uint32_t id, void *data, uint32_t size)
|
static int port_set_io(struct pw_port *port, uint32_t mix, uint32_t id, void *data, uint32_t size)
|
||||||
{
|
{
|
||||||
struct spa_node *n;
|
|
||||||
uint32_t p;
|
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (port->mix) {
|
if (port->mix) {
|
||||||
n = port->mix;
|
res = spa_node_port_set_io(port->mix, port->direction, mix, id, data, size);
|
||||||
p = mix;
|
if (res == 0)
|
||||||
} else {
|
return res;
|
||||||
n = port->node->node;
|
|
||||||
p = port->port_id;
|
|
||||||
}
|
}
|
||||||
if ((res = spa_node_port_set_io(n,
|
|
||||||
port->direction, p,
|
if ((res = spa_node_port_set_io(port->node->node,
|
||||||
|
port->direction, port->port_id,
|
||||||
id, data, size)) < 0) {
|
id, data, size)) < 0) {
|
||||||
pw_log_warn("port %p: set io failed %d %s", port,
|
pw_log_warn("port %p: set io failed %d %s", port,
|
||||||
res, spa_strerror(res));
|
res, spa_strerror(res));
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ int pw_port_init_mix(struct pw_port *port, struct pw_port_mix *mix)
|
||||||
res = pw_port_call_init_mix(port, mix);
|
res = pw_port_call_init_mix(port, mix);
|
||||||
|
|
||||||
/* set the same format on the mixer as on the port if any */
|
/* set the same format on the mixer as on the port if any */
|
||||||
if (1) {
|
{
|
||||||
uint32_t idx = 0;
|
uint32_t idx = 0;
|
||||||
uint8_t buffer[1024];
|
uint8_t buffer[1024];
|
||||||
struct spa_pod_builder b;
|
struct spa_pod_builder b;
|
||||||
|
|
@ -412,7 +412,7 @@ int pw_port_set_mix(struct pw_port *port, struct spa_node *node, uint32_t flags)
|
||||||
struct impl *impl = SPA_CONTAINER_OF(port, struct impl, this);
|
struct impl *impl = SPA_CONTAINER_OF(port, struct impl, this);
|
||||||
|
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
node = (struct spa_node *)&impl->mix_node;
|
node = &impl->mix_node;
|
||||||
flags = 0;
|
flags = 0;
|
||||||
}
|
}
|
||||||
pw_log_debug("port %p: mix node %p->%p", port, port->mix, node);
|
pw_log_debug("port %p: mix node %p->%p", port, port->mix, node);
|
||||||
|
|
@ -959,7 +959,7 @@ int pw_port_set_param(struct pw_port *port, uint32_t id, uint32_t flags,
|
||||||
pw_log_debug("port %p: %d set param %d %p", port, port->state, id, param);
|
pw_log_debug("port %p: %d set param %d %p", port, port->state, id, param);
|
||||||
|
|
||||||
/* set the parameters on all ports of the mixer node if possible */
|
/* set the parameters on all ports of the mixer node if possible */
|
||||||
if (1) {
|
{
|
||||||
struct pw_port_mix *mix;
|
struct pw_port_mix *mix;
|
||||||
|
|
||||||
spa_list_for_each(mix, &port->mix_list, link) {
|
spa_list_for_each(mix, &port->mix_list, link) {
|
||||||
|
|
@ -1017,10 +1017,13 @@ int pw_port_use_buffers(struct pw_port *port, uint32_t mix_id,
|
||||||
if ((mix = pw_map_lookup(&port->mix_port_map, mix_id)) == NULL)
|
if ((mix = pw_map_lookup(&port->mix_port_map, mix_id)) == NULL)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
if (1) {
|
{
|
||||||
res = spa_node_port_use_buffers(port->mix,
|
res = spa_node_port_use_buffers(port->mix,
|
||||||
mix->port.direction, mix->port.port_id,
|
mix->port.direction, mix->port.port_id,
|
||||||
buffers, n_buffers);
|
buffers, n_buffers);
|
||||||
|
if (res == -ENOTSUP)
|
||||||
|
res = 0;
|
||||||
|
|
||||||
pw_log_debug("port %p: use buffers on mix: %p %d (%s)",
|
pw_log_debug("port %p: use buffers on mix: %p %d (%s)",
|
||||||
port, port->mix, res, spa_strerror(res));
|
port, port->mix, res, spa_strerror(res));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue