-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pipewire] 1.0.0-2: fix/update patch from libudev issue
- Loading branch information
1 parent
1c1e584
commit 46585ed
Showing
2 changed files
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
--- pipewire/spa/plugins/alsa/alsa-udev.c | ||
+++ pipewire/spa/plugins/alsa/alsa-udev.c | ||
@@ -162,9 +162,6 @@ | ||
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c | ||
index 58ff5032d..b0b7a945d 100644 | ||
--- a/spa/plugins/alsa/alsa-udev.c | ||
+++ b/spa/plugins/alsa/alsa-udev.c | ||
@@ -162,8 +162,6 @@ static unsigned int get_card_nr(struct impl *this, struct udev_device *udev_devi | ||
if ((str = udev_device_get_property_value(udev_device, "SOUND_CLASS")) && spa_streq(str, "modem")) | ||
return SPA_ID_INVALID; | ||
|
||
- if (udev_device_get_property_value(udev_device, "SOUND_INITIALIZED") == NULL) | ||
- return SPA_ID_INVALID; | ||
- | ||
if ((str = udev_device_get_property_value(udev_device, "DEVPATH")) == NULL) | ||
return SPA_ID_INVALID; | ||
|
||
@@ -958,7 +955,7 @@ | ||
@@ -982,7 +982,7 @@ static int enum_cards(struct impl *this) | ||
|
||
for (udev_devices = udev_enumerate_get_list_entry(enumerate); udev_devices; | ||
udev_devices = udev_list_entry_get_next(udev_devices)) { | ||
- struct udev_device *udev_device; | ||
+ struct udev_device *udev_device, *pdev_device; | ||
+ struct udev_device *udev_device, *pdev; | ||
|
||
udev_device = udev_device_new_from_syspath(this->udev, | ||
udev_list_entry_get_name(udev_devices)); | ||
@@ -967,6 +964,14 @@ | ||
@@ -991,6 +991,8 @@ static int enum_cards(struct impl *this) | ||
|
||
process_card(this, ACTION_ADD, udev_device); | ||
|
||
+ pdev_device = udev_device_get_parent(udev_device); | ||
+ if (pdev_device) { | ||
+ process_card(this, ACTION_ADD, pdev_device); | ||
+ } | ||
+ | ||
+ /* no need to call udev_device_unref(pdev) here. | ||
+ udev_device_unref() will free parent device implicitly */ | ||
+ | ||
+ if ((pdev = udev_device_get_parent(udev_device))) | ||
+ process_card(this, ACTION_ADD, pdev); | ||
udev_device_unref(udev_device); | ||
} | ||
udev_enumerate_unref(enumerate); |