mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse: use device.api property to mark HARDWARE
Check if there is a device.api property on the sink/source and if there is, mark the sink/source as a hardware device.
This commit is contained in:
parent
21e7c77e5e
commit
fa66bf8187
1 changed files with 5 additions and 3 deletions
|
|
@ -135,9 +135,10 @@ static int sink_callback(pa_context *c, struct global *g, struct sink_data *d)
|
||||||
i.monitor_source_name = pa_context_find_global_name(c, i.monitor_source);
|
i.monitor_source_name = pa_context_find_global_name(c, i.monitor_source);
|
||||||
i.latency = 0;
|
i.latency = 0;
|
||||||
i.driver = "PipeWire";
|
i.driver = "PipeWire";
|
||||||
i.flags = PA_SINK_HARDWARE |
|
i.flags = PA_SINK_LATENCY | PA_SINK_DYNAMIC_LATENCY |
|
||||||
PA_SINK_LATENCY | PA_SINK_DYNAMIC_LATENCY |
|
|
||||||
PA_SINK_DECIBEL_VOLUME;
|
PA_SINK_DECIBEL_VOLUME;
|
||||||
|
if (info->props && (str = spa_dict_lookup(info->props, PW_KEY_DEVICE_API)))
|
||||||
|
i.flags |= PA_SINK_HARDWARE;
|
||||||
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_VOLUME))
|
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_VOLUME))
|
||||||
i.flags |= PA_SINK_HW_VOLUME_CTRL;
|
i.flags |= PA_SINK_HW_VOLUME_CTRL;
|
||||||
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_MUTE))
|
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_MUTE))
|
||||||
|
|
@ -859,7 +860,8 @@ static int source_callback(pa_context *c, struct global *g, struct source_data *
|
||||||
} else {
|
} else {
|
||||||
i.monitor_of_sink = PA_INVALID_INDEX;
|
i.monitor_of_sink = PA_INVALID_INDEX;
|
||||||
i.monitor_of_sink_name = NULL;
|
i.monitor_of_sink_name = NULL;
|
||||||
flags |= PA_SOURCE_HARDWARE;
|
if (info->props && (str = spa_dict_lookup(info->props, PW_KEY_DEVICE_API)))
|
||||||
|
flags |= PA_SOURCE_HARDWARE;
|
||||||
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_VOLUME))
|
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_VOLUME))
|
||||||
flags |= PA_SINK_HW_VOLUME_CTRL;
|
flags |= PA_SINK_HW_VOLUME_CTRL;
|
||||||
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_MUTE))
|
if (SPA_FLAG_IS_SET(g->node_info.flags, NODE_FLAG_HW_MUTE))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue