alsa,bluez5: handle SPA_PARAM_Latency in port_set_param

Simply return 0 instead of -ENOENT.

Fixes #1262
This commit is contained in:
Huang-Huang Bao 2021-06-05 02:21:10 +08:00 committed by Wim Taymans
parent d3fcc0a37a
commit 8c42e6aecb
7 changed files with 30 additions and 6 deletions

View file

@ -553,16 +553,24 @@ impl_node_port_set_param(void *object,
const struct spa_pod *param)
{
struct state *this = object;
int res;
spa_return_val_if_fail(this != NULL, -EINVAL);
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_PARAM_Format) {
return port_set_format(this, direction, port_id, flags, param);
switch (id) {
case SPA_PARAM_Format:
res = port_set_format(this, direction, port_id, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;
}
else
return -ENOENT;
return res;
}
static int

View file

@ -560,7 +560,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, direction, port_id, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;

View file

@ -677,7 +677,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, port, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;

View file

@ -1208,6 +1208,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, port, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;

View file

@ -1072,6 +1072,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, port, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;

View file

@ -998,6 +998,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, port, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;

View file

@ -1034,6 +1034,9 @@ impl_node_port_set_param(void *object,
case SPA_PARAM_Format:
res = port_set_format(this, port, flags, param);
break;
case SPA_PARAM_Latency:
res = 0;
break;
default:
res = -ENOENT;
break;