Btw, these values have been unconditionnaly returned by udev for a while.<br><br><div class="gmail_quote">On 17 May 2012 22:50, Marc-Antoine Perennou <span dir="ltr"><<a href="mailto:Marc-Antoine@perennou.com" target="_blank">Marc-Antoine@perennou.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com><br>
---<br>
src/modules/module-udev-detect.c | 9 +++------<br>
src/modules/udev-util.c | 4 ++--<br>
2 files changed, 5 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c<br>
index 1192194..31416bd 100644<br>
--- a/src/modules/module-udev-detect.c<br>
+++ b/src/modules/module-udev-detect.c<br>
@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char *card_idx, const char *name) {<br>
goto finish;<br>
}<br>
<br>
- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx);<br>
+ t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx);<br>
card = udev_device_new_from_syspath(udev, t);<br>
pa_xfree(t);<br>
<br>
@@ -282,7 +282,7 @@ static void verify_access(struct userdata *u, struct device *d) {<br>
pa_assert(u);<br>
pa_assert(d);<br>
<br>
- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path));<br>
+ cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d->path));<br>
accessible = access(cd, R_OK|W_OK) >= 0;<br>
pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible));<br>
<br>
@@ -621,7 +621,6 @@ fail:<br>
}<br>
<br>
static int setup_inotify(struct userdata *u) {<br>
- char *dev_snd;<br>
int r;<br>
<br>
if (u->inotify_fd >= 0)<br>
@@ -632,9 +631,7 @@ static int setup_inotify(struct userdata *u) {<br>
return -1;<br>
}<br>
<br>
- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev));<br>
- r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);<br>
- pa_xfree(dev_snd);<br>
+ r = inotify_add_watch(u->inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);<br>
<br>
if (r < 0) {<br>
int saved_errno = errno;<br>
diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c<br>
index 2f18bc4..b0bb17d 100644<br>
--- a/src/modules/udev-util.c<br>
+++ b/src/modules/udev-util.c<br>
@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) {<br>
goto finish;<br>
}<br>
<br>
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);<br>
+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);<br>
card = udev_device_new_from_syspath(udev, t);<br>
pa_xfree(t);<br>
<br>
@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx, const char *name) {<br>
goto finish;<br>
}<br>
<br>
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);<br>
+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);<br>
card = udev_device_new_from_syspath(udev, t);<br>
pa_xfree(t);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.7.10.2<br>
<br>
</font></span></blockquote></div><br>