pod: add HARDWARE flag to spa_pod_prop

Add HARDWARE flag to mark a property that does some hardware control.
Mark the device volume/mute property as HARDWARE or not.
Use the HARDWARE property in pulse to set the right flags.
This commit is contained in:
Wim Taymans 2020-07-06 17:46:32 +02:00
parent 8e6b276d51
commit cf8db93cd4
5 changed files with 25 additions and 11 deletions

View file

@ -450,7 +450,7 @@ static int set_volume(pa_context *c, struct global *g, const pa_cvolume *volume,
pw_log_info("card:%u global:%u flags:%08x", card_id, g->id, g->node_info.flags);
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_VOLUME | NODE_FLAG_HW_MUTE) &&
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_DEVICE_VOLUME | NODE_FLAG_DEVICE_MUTE) &&
(cg = pa_context_find_global(c, card_id)) != NULL) {
if (mask & PA_SUBSCRIPTION_MASK_SINK)
id = cg->card_info.active_port_output;