[pulseaudio-tickets] [Bug 42804] raop module does not work with shairport

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Aug 3 05:01:36 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=42804

--- Comment #19 from Matthias <pulseaudio at niafc.de> ---
(In reply to comment #14)
> I got raop_play to work with shairport (running raop_play via CLI, don't
> know if the entire app is working) through a Wifi network. I posted a small
> patch in the SourceForge traker a while ago :
> http://sourceforge.net/tracker/
> ?func=detail&aid=3577877&group_id=119473&atid=684238
> More or less the same fix as Fernando Herrera (comment #9) proposed btw, but
> different solution.
> 
> I also started to implement the UDP stuffs in a pulseaudio sink, based on
> Christophe Fergeau initial work :
> http://git.zx2c4.com/pulseaudio-raop2/ (Christophe code)
> http://repo.or.cz/w/pulseaudio-raopUDP.git/shortlog/refs/heads/raop (Mine)
> 
> I'm not working on it anymore : as far as I remember, I was stuck because of
> a stupid UDP socket connection problem...

In the first place, please accept my apologies for posting this here - I did
not find a better way to contact you.

Hi Martin,

thank you for your work on
http://repo.or.cz/w/pulseaudio-raopUDP.git/shortlog/refs/heads/raop. I followed
this bug report for about two weeks and started messing around with your
version of Christophe's code.

I also ran into the UDP socket problem: pulseaudio would connect to my
Cambridge Audio Minx Air 200 (further on: remote device) just fine and starting
to RECORD. However, as soon as the remote device sends timing packets it would
end up in an infinite loop as pulseaudio would not react on the packets sent by
the remote device. Tcpdump showed packets coming from $REMOTE_TIMING_PORT to
local ip on $DEFAULT_TIMING_PORT and IGMP port unavaible messages bouncing
back.

Digging through man pages of bind() and connect() I finally found the bug in
raop_client.c. In rtsp_cb(), lines 667 and 668 open_udp_socket() is called with
c->control_port and c->timing_port respectively. open_udp_socket() binds the
socket with port c->control_port or c->timing_port (read from MDNS) - however,
c->timing_port is the _sending_ port on the remote device. Local timing_port
should be DEFAULT_TIMING_PORT. I renamed the parameter should_bind to
local_port in the definition of open_udp_socket() and used this to bind().

With this modification, the timing packets are received correctly, timing
responses are sent and my host starts sending audio packets. There are some
errors regarding "invalid control packets" which i plan to have a look at later
on.

I attached a patch with my changes in raop_client.c. I had to reconstruct it
from my sources using vi as my IDE (Eclipse CDT) seems to have changed every
single line in the file...

Please forgive any errors in the patch as this is my first time programming in
C - I code ABAP for a living. Besides that, I am happy to help out with testing
and will report back if I see any progress.

At last, could any of you tell me how to get shairplay (or any other software)
to work (to the point mentioned above) with pulseaudio? pulseaudio does not
seem to find the MDNS entry of my local copy of shairplay. avahi_discover
reports a similar entry as that by my remote device; however, it just does not
show up in the list of available devices in the pulseaudio device list.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20130803/a4d7afe2/attachment.html>


More information about the pulseaudio-bugs mailing list