Summary: | module zeroconf-discover doesn't detect all sinks on the remote / fails to construct the name for remote sink | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | mastier <mistrzipan> |
Component: | modules | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
mastier
2016-03-29 12:55:17 UTC
I think I nailed the reason: Mar 29 15:02:33 slice pulseaudio[17502]: [pulseaudio] module-zeroconf-discover.c: Cannot construct valid device name from credentials of service 'tunnel.raspberrypi.local.alsa_input.usb-C-Media_Electronics_Inc._SB_Easy_Record_SB_Connect_Hi-Fi_090804000001-00-HiFi.analog-stereo'. I confirm the issue persists on the version 8.0, both client & server. do the length exceed PA_NAME_MAX ? #define PA_NAME_MAX 128 static bool is_valid_char(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '.' || c == '-' || c == '_'; } bool pa_namereg_is_valid_name(const char *name) { const char *c; pa_assert(name); if (*name == 0) return false; for (c = name; *c && (c-name < PA_NAME_MAX); c++) if (!is_valid_char(*c)) return false; if (*c) return false; return true; } (In reply to Raymond from comment #3) > do the length exceed PA_NAME_MAX ? > > #define PA_NAME_MAX 128 > ... as matter fact, it does ;-] $ echo -n 'tunnel.raspberrypi.local.alsa_input.usb-C-Media_Electronics_Inc._SB_Easy_Record_SB_Connect_Hi-Fi_090804000001-00-HiFi.analog-stereo' |wc -c 131 the question is where is the origin of this limitation ? by PA, as I pressume, because Zeroconf doesn't seem to have such limitation. So there are two possible solution, to truncate the string on the server side (complicated, because AvahiString is multipart, which one to choose to cut ?) or ... increase PA_NAME_MAX :-D I checked the RFC and the suggested size is 255 octets, then I checked the AVAHI/Zeroconf string creation code and it has 'char' (so 1byte) type array set to 128bytes. http://tools.ietf.org/html/rfc6762#page-62 So I pressume that value can be increased. src/modules/module-zeroconf-publish.c: char s[128]; The same goes for bonjour: src/modules/macosx/module-bonjour-publish.c: char s[128]; 090804000001-00 is this serial number of your usb audio ? it need a unique way to identify the card when user have two same usb audio cards .alsa_input.usb why pulseaudio not use alsa card number instead of serial number -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/12. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.