1. Field of the Invention
The present invention relates to data communication and, more particularly, to the synchronization of clocks in a media data source device and an end device for displaying the media data.
2. Description of the Related Art
Wireless networking can now advantageously provide the wireless distribution of entertainment streaming media to consumers. For example, the Sharp model LC-15L1U-S television can receive streaming audio/video streams from a DVD player using an IEEE 802.11b-based wireless network.
When media traffic is transferred over a wireless network, two different transport models can be used. In a first transport model, called a “pull” model, a receiver coupled to the end device (e.g. the television) requests data when it is needed from the source device (e.g. the DVD player). In this model, the receiver must predict when to request data from the source device such that the data will arrive, even in the event of transient transport failures and latency, in time for display. In a second transport model, called a “push” model, the transmitter coupled to the source device transmits data at a constant rate to the receiver (and thus the end device) for display.
In the push model, the rate at which the data enters the transmitter from the source device (i.e. the transmission rate) should match the rate that the data leaves the receiver to the end device (i.e. the consumption rate), with a fixed latency. Ensuring that the consumption rate substantially equals the transmission rate over a long period of time requires that the clocks of the transmitter and the receiver be synchronized. For example, in MPEG-2 based video stream transport, maintaining time synchronization between the transmitter and the receiver on the order of ±500 nanoseconds (ns) is desirable.
Problematically, drift between similarly specified system clocks could be on the order of 40 parts-per-million (ppm). For example, when a transmitter clock operating at 40 MHz is 20 ppm slow, a receiver clock also operating at 40 MHz could be 20 ppm fast. Although the IEEE 802.11 family of wireless networking standards provides a time synchronization function (TSF), the granularity of the synchronization promulgated is at best 1 microsecond (μs). Specifically, the IEEE 802.11 family of wireless networking standards calls for time synchronization to take place during beacon transmissions, which typically occur with a 100 millisecond period. As a result, using worst-case relative clock rate offsets, a 4 is timing error between transmitter and the receiver could accumulate between beacons.
Therefore, a need arises for a method and system for more closely synchronizing the transmitter and the receiver in a digital media transport system.
To transport real-time digital media data with low jitter over a wireless network, clocks in a cycle master and a cycle slave need to be accurately synchronized. In accordance with one aspect of the invention, a synchronization packet can be sent from the cycle master to the cycle slave, thereby providing a highly accurate time synchronization function. Specifically, this synchronization packet provides an end-to-end solution in which the media data entering the cycle master can leave the cycle slave with very low jitter (e.g. on the order of ±500 ns). Media data may include several media data types. For example, one media data type may be video media data. Another media data type may be center channel audio.
Media data may be transmitted from the cycle master to multiple cycle slaves. In one embodiment, clocks may be synchronized within the cycle master and the multiple cycle slaves. The media data may be output by the multiple cycle slave devices based upon the state of a clock within the cycle slave devices. In one embodiment, the cycle master may transmit media data to a cycle slave based upon a target address. The target address may be determined by the media data type.
A system for determining a destination for media data may include a cycle master, multiple cycle slaves and a media inspector. Clocks may be synchronized within the cycle master and the multiple cycle slaves. In one embodiment, the media inspector may examine the media data and determine a target address based upon the media data type. The cycle master may transmit media data to cycle slaves based upon the target address. In one embodiment, the cycle master may associate the target address with a MAC address of a cycle slave. In one embodiment, the output of the cycle slave may be based upon the state of the clock in the cycle slave.
A packet type filter 354 determines whether packets 303 are media packets 305 or synchronization packets 306. Media packets 305 can be sent to a media packet separator 307, which extracts its associated timestamp 319A (which indicates a desired delivery time for the packet), and then forwards remaining media data 319B to a media gate 308. Note that media packet 305 can conform to the format discussed in U.S. patent application Ser. No. 10/934,869, entitled “Efficient Data Transmission By Data Aggregation”, filed on Sep. 3, 2004 by Atheros Communications, Inc., and incorporated by reference herein.
In one embodiment, media gate 308 can include a first-in-first-out (FIFO). Based on a gate control signal 309 (described in reference to
Timestamp 312, extracted from a synchronization packet (as shown in
In one embodiment, for packet type filter 354 (
The actual synchronization information can be provided in frame body 502. This synchronization information can include a timestamp 511 and a sequence number 512. Sequence number 512 can be compared to the sequence number of the last synchronization packet, thereby allowing a determination as to whether synchronization packets are sequentially received. Note that the values for sequence numbers are arbitrary, although consecutive sequence numbers typically vary by “1”.
In one embodiment, timestamp 511 can be 4 octets in length, i.e. 32 bits (or, in one embodiment, 31 bits with 1 bit reserved), whereas sequence 512 can be 2 octets in length, i.e. 16 bits. Note that the IEEE 802.11 standard provides for the processing of data in octets. Therefore, exemplary octets for timestamp 511 (i.e. sync timestamp 0, sync timestamp 1, sync timestamp 2, and sync timestamp 3) and sequence 512 (i.e. sync sequence 0 and sync sequence 1) are shown. In one embodiment, sequence 512 can include a running, 16-bit binary count of the synchronization packets sent by the cycle master (discussed in further detail in reference to
A timestamp offset [7:0] register 315 (
Hardware detects a synchronization packet 500 when the received address 1 (i.e. the network address to which the packet is being sent) matches a synchronization multicast address [47:0] value and the Basic Service Set ID (BSSID) also matches. Note that BSSID usage is consistent with that described in the IEEE-802.11-1997 specification, §7.2.2. In one embodiment, the synchronization multicast address can also be set in a register controlled by software.
Referring to
Therefore, in general, the beacon packets can provide a first relatively coarse synchronization, whereas the synchronization packets can provide a second synchronization, wherein the second synchronization can be significantly more accurate than the first synchronization. This accurate synchronization is particularly useful for applications that wirelessly transmit streaming media data.
Advantageously, a baseband data formatter can indicate with accuracy the rising edge of a TRP event. As noted previously, TRP events can be generated after both synchronization and media packets. Therefore, in one embodiment shown in
Specifically, in accordance with one aspect of the invention, the count can include the number of cycles between the end of one synchronization packet (e.g. sync (a), the first synchronization packet) and the end of the next synchronization packet (e.g. sync (b)). Notably, time synchronization relies on a synchronization packet that includes the timestamp at the rising edge of a TRP event for a previous synchronization packet that was sent. For example, sync (b) cannot include its own timestamp because the rising edge of a TRP event occurs after sync(b) has completed transmission. Therefore, sync(b) can include the timestamp Tm(a), which is associated with sync(a). For this reason, sync(a) has a “don't care” timestamp Tm(?), which is not used (i.e. ignored).
When the cycle slave receives a synchronization packet, a summing block (e.g. summing block 325 in
Notably, synchronization hardware 200 (
As indicated above and referring back to
In one embodiment, a summing block 331 can add a constant offset 330 to the value stored in timestamp timer 322 before it is used by media gate 308, thereby advantageously forming a fixed output delay for media stream 310. This delay effectively creates a buffer, which may be sized such that stream interruptions, for example, a retransmission of a packet incorrectly received, does not cause a stall in the flow of media stream 310.
In one embodiment, a digital delta trim block 327 can alter the increments used by timestamp timer 322. Specifically, digital delta trim block 327 may “tune” the increment based on a difference between the counts (as computed by timestamp delta counter 323) and timestamps 312. (Note that if both 40 MHz clocks in the cycle master and the cycle slave were running with exactly the same frequency, then the count and the difference in timestamps at the cycle slave would be the same.)
In a typical embodiment, time stamp counter 322 can increment by “1” on every cycle. However, in another embodiment, quicker agreement of cycle master and cycle slave clocks may be achieved by occasionally incrementing the value stored in timestamp timer 322 by 2 when the cycle slave clock is too slow. In yet another embodiment, quicker agreement of cycle master and cycle slave clocks may be achieved by occasionally incrementing the value stored in timestamp timer 322 by 0 when the cycle slave clock is too fast. Increment values other than +1 are referred to as “tuning” events and can occur every I samples apart (“span”).
Table 1 provides exemplary values illustrating the input data for a calculation of a span between a choice of a timestamp timer increment other than +1 and the choice of increment. Table 2 indicates the calculated tuning parameters using the exemplary values of Table 1. Note that the cycle slave timestamps (e.g. Ts(a) and Ts(b), generically shown as timestamp 332 in
In this example, the time interval between sync(a) and sync(b) at the cycle slave (Ds) is 1005 cycles. That is, 1005 cycles have been measured between synchronization packets at the cycle slave. In contrast, the time interval between sync(a) and sync(b) at the cycle master (Dm) is 1000 cycles. That is, 1000 cycles have been measured between synchronization packets at the cycle master. The difference between Ds and Dm, i.e. the error (E), is 5 cycles. The previously determined number of tuning events (S), as determined by dividing Ds by the current span value (I), is 10 cycles. Therefore, the number of cycle slave clock cycles between synchronization packets should be reduced by 5. This value corresponds to the next version of S (S′). The next version of I (I′), which is determined by dividing Ds by S′, is 201 cycles.
Because the number of cycles measured between synchronization packets at the cycle slave exceeds the corresponding number of cycles at the cycle master, the increment value chosen for a tuning event is +0. In this example, the desired reduction in cycle slave clock cycles can be accomplished by performing 5 tuning events in which increments are +0 instead of +1. In one embodiment, if the number of cycles measured between synchronization packets at the cycle master exceeds the corresponding number of cycles at the cycle slave, the increment value chosen for a tuning event could be set instead to +2.
In some embodiments, the rate at which synchronization packets are transmitted can be varied. By initially sending more frequent synchronization packets, digital delta trim block 327 may receive more frequent updates and thus more quickly adapt the slave clock rate to the master clock rate. This adjustment advantageously accommodates a quick clock adjustment with a subsequent reduction in synchronization packet rate, thereby conserving shared bandwidth.
In one embodiment, the rate of synchronization packets can be adjusted by digital delta trim block 327 sending a feedback value 333 to the cycle master, wherein feedback value 333 indicates a measure of change in tuning values. For example, greater variation in digital delta trim block tuning values would trigger an increase in the synchronization packet rate. This rate adjustment technique can advantageously dynamically allocate synchronization packet bandwidth concomitant with need.
For example, if, in a synchronization packet, multiple timestamps representing the current timestamp associated with a sequence number n, {TSn, TSn-1 . . . TSn-m}, the difference in received, non-sequential sequence numbers can be used to select, for m skipped sync packets, a TSn-m for processing, because the previously received synchronization packet and currently received, non-sequential synchronization packet include sufficient information (assuming less than m synchronization packets have been lost) to treat the previously received synchronization packet and the currently received, non-sequential synchronization packet as though they were, effectively sequential. Advantageously, these additional timestamps (and associated synchronization packets) represent a small overhead (4 bytes per additional timestamp) over a single synchronization packet. In one embodiment, a timestamp value is not updated until sequential packets are received.
For example, in one embodiment, a timestamp represents a time delta as measured by a TRP event (e.g. “medium_free” event). Compiled timestamp 511′ could include a compilation of synchronization timestamps, e.g. the current timestamp and from the last three previously sent timestamps. By comparing the received compiled timestamps 511′, the redundant information provided in timestamps 511A-511D can advantageously facilitate a reconstruction of probable timestamps that are missing. That is, assuming that four timestamps are provided in compiled timestamp 511′, then sequential packets should have three identical timestamps. If only two timestamps are identical, then one packet has not been received. However, by using the two identical timestamps and the current timestamp, a pseudo timestamp for the missing packet can be calculated.
The cycle slave transceivers 820, 825, and 830 are configured to receive media data from the cycle master. Cycle slave 820 may be coupled to the television 108 and may receive video media data. Cycle slaves 825 and 830 may be configured to receive audio media data for reproduction on speakers 850 and 851, which may be coupled to the cycle slaves 825 and 830 respectively.
A dvd player 805 may be coupled to a media inspector 810 and may provide media data, such as audio and video signals, to the media inspector 810. In one embodiment, multiple audio signals may be provided (such as left front, right front, center, left surround and right surround). Alternative embodiments may replace the dvd player 805 with other media data sources such as, but not limited to, VCRs and media-enabled personal computers.
The media inspector 810 examines the media data from the dvd player 805 and determines a target address associated with the media data. In one embodiment, the target address may correspond to a media data type. For example, one media data type may be video media data. Another media data type may be center channel audio. Thus, a particular media data type may be associated with an output location (e.g., center channel audio media data may be associated with a center channel speaker). A cycle slave may be associated with an output location. In one embodiment, the target addresses may be encoded with four data bits. The target address 811 and the related media data 812 are coupled to a port 817 included in the cycle master 815. In one embodiment, the port 817 may include multiple pins to receive the target address 811 and the media data 812. In one embodiment, the media inspector 810 may be external to the cycle master 815 as shown. For example, the media inspector 810 may be implemented by a field-programmable gate array (FPGA) or a state machine. In another embodiment, the media inspector 810 may be incorporated into the cycle master 815 or the dvd player 805.
The cycle master 815 may examine the target address 811 and determine to which client slave to transmit the related media data 812. In one embodiment, each client slave may have a related MAC (media access control) address. The cycle master 815 may use a table to associate a target address 811 to a MAC address and thus to a cycle slave. Table 3 below is an exemplary table mapping target addresses to MAC address.
The media synchronization techniques described in conjunction with
The wireless streaming media system 800 advantageously transmits media data to multiple targets by transmitting media data to individual cycle slaves and enables relatively synchronous output of media data. For example, if media data is multicast, the cycle slaves may not be required to acknowledge the reception of the media data. Thus, the cycle master may not be alerted if a collision or other event that may corrupt the transmitted data may occur. In contrast, since media data is unicast (i.e., transmitted from one transceiver to another transceiver), cycle slaves may acknowledge reception of media data. Thus, the cycle master may retry sending dropped packets including media data.
Although illustrative embodiments of the invention have been described in detail herein with reference to the accompanying figures, it is to be understood that the invention is not limited to those precise embodiments. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed. As such, many modifications and variations will be apparent.
For example, the IEEE-802.11-1999 specification provides a Frame Check Sequence (FCS) mechanism for detecting corrupted data packets. In one embodiment, software can perform a further validation of timestamp data by using the value stored in the FCS field of synchronization packet 500 (
In one embodiment, both the beacon and the synchronization packets can provide synchronization functions. For example, referring to
Accordingly, it is intended that the scope of the invention be defined by the following Claims and their equivalents.
This application is a continuation-in-part of co-pending U.S. patent application Ser. No. 11/197,773, entitled “Media Streaming Synchronization” filed Aug. 3, 2005 which claims priority of U.S. Provisional Patent Application 60/602,723, entitled “Media Streaming Synchronization” filed Aug. 18, 2004.
Number | Name | Date | Kind |
---|---|---|---|
4622665 | Jonsson et al. | Nov 1986 | A |
5583854 | Beesley | Dec 1996 | A |
5878234 | Dutkiewicz et al. | Mar 1999 | A |
5949794 | Chiodini | Sep 1999 | A |
5966387 | Cloutier | Oct 1999 | A |
6078930 | Lee et al. | Jun 2000 | A |
6347084 | Hulyalkar et al. | Feb 2002 | B1 |
6452908 | Yamada et al. | Sep 2002 | B1 |
6510150 | Ngo | Jan 2003 | B1 |
6539489 | Reinert | Mar 2003 | B1 |
6778493 | Ishii | Aug 2004 | B1 |
6785261 | Schuster et al. | Aug 2004 | B1 |
6816510 | Banerjee | Nov 2004 | B1 |
6839339 | Chuah | Jan 2005 | B1 |
6868094 | Bordonaro et al. | Mar 2005 | B1 |
6934760 | Westbrook et al. | Aug 2005 | B1 |
6944188 | Sinha et al. | Sep 2005 | B2 |
6975655 | Fischer et al. | Dec 2005 | B2 |
7035246 | Taylor | Apr 2006 | B2 |
7051246 | Benesty | May 2006 | B2 |
7092410 | Bordonaro et al. | Aug 2006 | B2 |
7206327 | Lorek et al. | Apr 2007 | B2 |
7301966 | Metcalf | Nov 2007 | B2 |
7315546 | Repko et al. | Jan 2008 | B2 |
7333517 | Madhavapeddi et al. | Feb 2008 | B2 |
7359406 | Holloway et al. | Apr 2008 | B2 |
7366204 | Kang et al. | Apr 2008 | B2 |
7397877 | Miao | Jul 2008 | B2 |
7448061 | Richards et al. | Nov 2008 | B2 |
7512069 | Hedayat et al. | Mar 2009 | B2 |
7545794 | Loukianov | Jun 2009 | B2 |
7567815 | Nishikawa et al. | Jul 2009 | B2 |
7583705 | Sinha et al. | Sep 2009 | B2 |
20020027928 | Fang | Mar 2002 | A1 |
20020141451 | Gates et al. | Oct 2002 | A1 |
20040008661 | Myles et al. | Jan 2004 | A1 |
20040066801 | Fujishiro | Apr 2004 | A1 |
20040208201 | Otake | Oct 2004 | A1 |
20040228367 | Mosig | Nov 2004 | A1 |
20040233923 | Fally et al. | Nov 2004 | A1 |
20050152330 | Stephens et al. | Jul 2005 | A1 |
20050259754 | Ho et al. | Nov 2005 | A1 |
20050286564 | Hatley et al. | Dec 2005 | A1 |
20060251124 | Colmant et al. | Nov 2006 | A1 |
20070014315 | Zumsteg | Jan 2007 | A1 |
20070140154 | Chun | Jun 2007 | A1 |
20080075121 | Fourcand | Mar 2008 | A1 |
20080279173 | Zhang et al. | Nov 2008 | A1 |
20090135854 | Bettin et al. | May 2009 | A1 |
20090225790 | Shay et al. | Sep 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
60602723 | Aug 2004 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11197773 | Aug 2005 | US |
Child | 11969829 | US |