I wanted to add some clarifying notes.
First, with regard to telling which span is the “selected timing span”, it is possible to look in /proc/dahdi/ to determine if a span is the “MASTER” span or not. The master span in DAHDI is the span that controls mixing audio for all the other spans / pseudo channels, and there is only 0 or one MASTER span in the system.
For example, on a system that I have in the lab here with two single span cards:
# head -1 /proc/dahdi/1
Span 1: WCT13x/0 "Wildcard TE133 Card 0" ESFB8ZS/ RED ClockSource
# head -1 /proc/dahdi/2
Span 2: WCT1/0 "Wildcard TE121 Card 0" (MASTER) ESFB8ZS/ RED ClockSource
I can see that span 2 is the master span and is performing all audio mixing. As an aside, the “ClockSource” string is only significant on multiport cards and is used to indicate which span is the clocksource for the other ports on the card. This is different than the global “MASTER” span.
Early versions of DAHDI dummy could result in audio problems since it was expected that the kernel timer would fire regularly. If the kernel ever missed a timer tick audio would not be mixed properly. Newer versions of DAHDI (certainly 2.4+ perhaps earlier versions) updated DAHDI dummy to use the system clock and keep track of how much audio it needed to mix at every interval, therefore minor jitter in timer interrupt service times would not result in audio problems.
All the features of dahdi dummy were moved directly into the core of DAHDI so that dahdi would always be able to mix audio for pseudo channels regardless of the hardware configuration. DAHDI will now use a hardware timing source if one is available, or use the system clock on the system if one is not available. This means though that the host computer needs to have a good system clock.
In DAHDI 2.7.0+ the core timer in DAHDI supports the “monotonic” clock. This means that DAHDI is immune to system environments where ntpdate is run regularly to update the system clock. Previously this could cause problems because if DAHDI sees the wall clock jump by several seconds it would potentially drop audio.
Finally, when using core timer the dahdi_test results, depending on how the kernel is configured, can appear worse for each individual sample, but will be correct overall.
For example on a system with 10 ms timeslices (CONFIG_HZ=100):
# dahdi_test -c 5 -vv
Opened pseudo dahdi interface, measuring accuracy...
8192 samples in 8159.488 system clock sample intervals (99.603%)
8192 samples in 8159.376 system clock sample intervals (99.602%)
8192 samples in 8239.601 system clock sample intervals (99.419%)
8192 samples in 8159.640 system clock sample intervals (99.605%)
8192 samples in 8239.624 system clock sample intervals (99.419%)
--- Results after 5 passes ---
Best: 99.605% -- Worst: 99.419% -- Average: 99.529490%
Cummulative Accuracy (not per pass): 99.994
And on a system with 1ms timeslice (CONFIG_HZ=1000):
# dahdi_test -c 5 -vv
Opened pseudo dahdi interface, measuring accuracy...
8192 samples in 8191.952 system clock sample intervals (99.999%)
8192 samples in 8191.768 system clock sample intervals (99.997%)
8192 samples in 8191.928 system clock sample intervals (99.999%)
8192 samples in 8191.953 system clock sample intervals (99.999%)
8192 samples in 8191.904 system clock sample intervals (99.999%)
--- Results after 5 passes ---
Best: 99.999% -- Worst: 99.997% -- Average: 99.998789%
Cummulative Accuracy (not per pass): 99.999
In both cases the Cummulative Accuracy is better than 99.99%. This is the number that you’re most interested in since it accounts for jitter on the host.
Probably more information than you wanted, but the point of all this is that for recent versions of DAHDI with a properly configured system clock I do not see a need to purchase hardware just for timing.