[pulseaudio-discuss] Controlling where module-rtp-send sends multicast packets?

Jon Smirl jonsmirl at gmail.com
Thu Feb 21 20:23:57 PST 2008


On 2/21/08, Paul Fox <pgf at foxharp.boston.ma.us> wrote:
> jon wrote:
>   > ... You just have to keep the clocks tightly synchronized and all
>
>  > of the zones will stay synchronized by starting the play of each song
>   > at a synchronized instant. The clock drift that occurs while a song is
>   > playing never exceeds a audio sample period.
>
>
> is that due to design, or is that just how it works out, because the
>  hardware is uniform?  (i.e., would a really really long song be more
>  vulnerable to long-term drift?)

The clock in the MPC5200 is unusable for this type of audio work. We
really tried to make it work and then gave up. We are using an
external MAX9485 ($0.90) for clock generation with a 20ppm crystal.
The MAX9285 has a VCO. PTPD is used to keep the network in sync and
provide feedback to the VCO.  PTPD works by measuring the clock error
over a long period of time, we then use this error information to
tweak the VCO and eliminate the error. We can keep a dozen nodes
synchronized to a few nanoseconds which is way more that audio needs.

RTP just streams away forever so clock error between nodes
accumulates. After 2-3 days the accumlated error is obvious in most
cases. With cheap audio hardware 44.1Khz can be off 2-3% - in that
case the error accumulates very quickly. You can minimize this by
using NTP to keep the nodes more closely synchronized and buffering
some of the RTP data before playing it. Depending on the clock drift
you need to duplicate or eliminate a sample occasionally.

We have 64KB of RAM in each node. The node with the song in flash
multicasts it at 80Mb until all the nodes have it. It then gets
scheduled into the play list. Since the nodes have a lot of RAM we can
stay ten songs ahead.  All nodes start playing it at a synchronized
time. This model is very different than RTP. You never get drop outs
in this model.

Our media center node has external inputs. These are digitized and
sent into the net at 192/24 sampling or whatever they were recorded at
if digitally sourced. Channels from this source are sent into the net
using RTP. An example use of this is broadcasting a baseball game from
TV around the house. The nodes can also pick up sources from your
computer.


>
>
>   > Digispeaker has far better THD number than traditional multiroom
>   > systems since the 500ft cable runs are eliminated. The speakers are
>   > digitally bi-amped and the DSP compensates for their flaws. It an open
>   > source project, we should have the first round of hardware ready in a
>   > couple of months.
>
>
> it's a slick project.  we use the mpc5200 in one of our designs
>  at work -- it's a good processor.  i've certainly thought that
>  there must be a better way to do music distribution than
>  dedicating an entire linux workstation to the task. :-)  i didn't
>  get a sense from the website -- how many people are working on
>  it?

Right now there are two but we have both been in the computer industry
more than 20 years each. Tyler is the hardware engineer and I'm doing
the software. We've built things like this before and we know that we
can make this work.  When the first round of hardware is finished we
expect to pick up other contributors at a user space level. We have a
couple of prototype systems and Tyler is doing board layout for the
first batch of a few hundred. We'll sell the hobbyist version close to
cost. You'll even be able to buy blank PCBs if you are insane enough
to want to solder surface mount BGA parts at home (good luck and I
really don't recommend trying to do that).

MPC5200 is not really and optimal choice for this project. But we
evaluated six other CPUs and the MPC5200 was the best of the bunch.
Second place is the MX31L. A better choice would be locating a SOC
with Intel HD Audio support but they don't exist yet. We might use an
FPGA to build one in round 2 of the hardware.


>
>  paul
>  =---------------------
>
>  paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 18.5 degrees)
>
> _______________________________________________
>  pulseaudio-discuss mailing list
>  pulseaudio-discuss at mail.0pointer.de
>  https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>


-- 
Jon Smirl
jonsmirl at gmail.com



More information about the pulseaudio-discuss mailing list