mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
parent
09265e116e
commit
a8937413e6
2 changed files with 17 additions and 2 deletions
|
|
@ -910,6 +910,10 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
if (info) {
|
||||
if ((str = spa_dict_lookup(info, SPA_KEY_API_ALSA_PATH)) != NULL)
|
||||
snprintf(this->props.device, sizeof(this->props.device)-1, "%s", str);
|
||||
if ((str = spa_dict_lookup(info, "api.acp.auto-port")) != NULL)
|
||||
this->props.auto_port = strcmp(str, "true") == 0 || atoi(str) != 0;
|
||||
if ((str = spa_dict_lookup(info, "api.acp.auto-profile")) != NULL)
|
||||
this->props.auto_profile = strcmp(str, "true") == 0 || atoi(str) != 0;
|
||||
|
||||
items = alloca((info->n_items) * sizeof(*items));
|
||||
spa_dict_for_each(it, info)
|
||||
|
|
|
|||
|
|
@ -826,12 +826,23 @@ static struct device *alsa_create_device(struct impl *impl, uint32_t id,
|
|||
device->pending_profile = 1;
|
||||
spa_list_append(&impl->device_list, &device->link);
|
||||
|
||||
name = pw_properties_get(device->props, "device.name");
|
||||
|
||||
if ((str = pw_properties_get(impl->session->props, "alsa.soft-mixer")) != NULL &&
|
||||
(strcmp(str, "*") == 0 ||
|
||||
((name = pw_properties_get(device->props, "device.name")) != NULL &&
|
||||
strstr(str, name) != NULL))) {
|
||||
(name != NULL && strstr(str, name) != NULL))) {
|
||||
pw_properties_set(device->props, "api.alsa.soft-mixer", "true");
|
||||
}
|
||||
if ((str = pw_properties_get(impl->session->props, "alsa.auto-port")) != NULL &&
|
||||
(strcmp(str, "*") == 0 ||
|
||||
(name != NULL && strstr(str, name) != NULL))) {
|
||||
pw_properties_set(device->props, "api.acp.auto-port", "true");
|
||||
}
|
||||
if ((str = pw_properties_get(impl->session->props, "alsa.auto-profile")) != NULL &&
|
||||
(strcmp(str, "*") == 0 ||
|
||||
(name != NULL && strstr(str, name) != NULL))) {
|
||||
pw_properties_set(device->props, "api.acp.auto-profile", "true");
|
||||
}
|
||||
|
||||
if (impl->conn &&
|
||||
(card = spa_dict_lookup(info->props, SPA_KEY_API_ALSA_CARD)) != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue