mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-06 06:46:29 -04:00
Create a new device for each BIS transport, and add id to the address to have different names for the node name.
This commit is contained in:
parent
e1fd73da66
commit
4263500d81
1 changed files with 14 additions and 2 deletions
|
|
@ -1022,6 +1022,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)
|
||||
{
|
||||
|
|
@ -2520,7 +2532,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;
|
||||
|
|
@ -2537,7 +2549,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