mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa: remove device properties when closed
When the device has not configured a format, remove the properties that depend on the format so that they don't limit what we can configure the device with next. See #3613
This commit is contained in:
parent
2ff62641b9
commit
9cdb3607e1
2 changed files with 10 additions and 0 deletions
|
|
@ -55,6 +55,11 @@ static void emit_node_info(struct state *this, bool full)
|
|||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-num", nperiods);
|
||||
snprintf(headroom, sizeof(headroom), "%u", this->headroom);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.headroom", headroom);
|
||||
} else {
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-size", NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-num", NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.headroom", NULL);
|
||||
}
|
||||
this->info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ static void emit_node_info(struct state *this, bool full)
|
|||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-num", nperiods);
|
||||
snprintf(headroom, sizeof(headroom), "%u", this->headroom);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.headroom", headroom);
|
||||
} else {
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-size", NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.period-num", NULL);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT("api.alsa.headroom", NULL);
|
||||
}
|
||||
this->info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue