mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-06 06:46:29 -04:00
Merge branch 'Set_state_linked_transport' into 'master'
Draft: Fix set state not seated on linked transport See merge request pipewire/pipewire!1760
This commit is contained in:
commit
1c6b85d2f1
1 changed files with 14 additions and 2 deletions
|
|
@ -1093,6 +1093,18 @@ static struct spa_bt_adapter *adapter_find(struct spa_bt_monitor *monitor, const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static struct spa_bt_adapter *adapter_find_bcast_source(struct spa_bt_monitor *monitor, const char *path)
|
||||
{
|
||||
struct spa_bt_adapter *d;
|
||||
char *found_string;
|
||||
spa_list_for_each(d, &monitor->adapter_list, link) {
|
||||
found_string = strstr(path, d->path);
|
||||
if(found_string != NULL)
|
||||
return d;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int parse_modalias(const char *modalias, uint16_t *source, uint16_t *vendor,
|
||||
uint16_t *product, uint16_t *version)
|
||||
{
|
||||
|
|
@ -2617,7 +2629,7 @@ static struct spa_bt_device *create_bcast_device(struct spa_bt_monitor *monitor,
|
|||
struct spa_bt_device *d;
|
||||
struct spa_bt_adapter *adapter;
|
||||
|
||||
adapter = adapter_find(monitor, object_path);
|
||||
adapter = adapter_find_bcast_source(monitor, object_path);
|
||||
if (adapter == NULL) {
|
||||
spa_log_warn(monitor->log, "unknown adapter %s", object_path);
|
||||
return NULL;
|
||||
|
|
@ -2634,7 +2646,7 @@ static struct spa_bt_device *create_bcast_device(struct spa_bt_monitor *monitor,
|
|||
d->adapter_path = strdup(adapter->path);
|
||||
d->alias = strdup(adapter->alias);
|
||||
d->name = strdup(adapter->name);
|
||||
d->address = strdup("00:00:00:00:00:00");
|
||||
asprintf(&d->address, "00:00:00:00:00:00.%d", d->id);
|
||||
d->reconnect_state = BT_DEVICE_RECONNECT_STOP;
|
||||
|
||||
device_update_hw_volume_profiles(d);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue