mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: add hw-mute and hw-volume as properties
This commit is contained in:
parent
e857856be7
commit
4c64afc4ff
1 changed files with 13 additions and 1 deletions
|
|
@ -393,13 +393,25 @@ static struct spa_pod *build_route(struct spa_pod_builder *b, uint32_t id,
|
|||
0);
|
||||
spa_pod_builder_prop(b, SPA_PARAM_ROUTE_info, SPA_POD_PROP_FLAG_HINT_DICT);
|
||||
spa_pod_builder_push_struct(b, &f[1]);
|
||||
spa_pod_builder_int(b, p->props.n_items);
|
||||
spa_pod_builder_int(b, p->props.n_items + (dev ? 2 : 0));
|
||||
acp_dict_for_each(item, &p->props) {
|
||||
spa_pod_builder_add(b,
|
||||
SPA_POD_String(item->key),
|
||||
SPA_POD_String(item->value),
|
||||
NULL);
|
||||
}
|
||||
if (dev != NULL) {
|
||||
const char *str;
|
||||
str = SPA_FLAG_IS_SET(dev->flags, ACP_DEVICE_HW_MUTE) ? "true" : "false";
|
||||
spa_pod_builder_add(b,
|
||||
SPA_POD_String("route.hw-mute"),
|
||||
SPA_POD_String(str), NULL);
|
||||
|
||||
str = SPA_FLAG_IS_SET(dev->flags, ACP_DEVICE_HW_VOLUME) ? "true" : "false";
|
||||
spa_pod_builder_add(b,
|
||||
SPA_POD_String("route.hw-volume"),
|
||||
SPA_POD_String(str), NULL);
|
||||
}
|
||||
spa_pod_builder_pop(b, &f[1]);
|
||||
spa_pod_builder_prop(b, SPA_PARAM_ROUTE_profiles, 0);
|
||||
spa_pod_builder_push_array(b, &f[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue