Method and device for time synchronization of bluetooth media devices
A decentralized network chain using BT media devices with local and network clocks synchronizes audio across multiple devices with microsecond precision, addressing BT's synchronization limitations and reducing power consumption.
Patent Information
- Application Number
- CN202211128277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-09-06
- Filing Date
- 2018-09-06
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2038-09-06
AI Technical Summary
Bluetooth (BT) devices lack inherent mechanisms for synchronizing audio between multiple devices, requiring complex and power-intensive host processor-level synchronization, and existing solutions are limited to two-device configurations.
A decentralized network chain configuration using BT media devices with local and network clocks, where each device adjusts playback timing based on received synchronization information, including a modified BT packet with timing data to ensure synchronized playback across multiple devices.
Provides synchronized playback of audio across multiple BT devices with microsecond resolution and reduced power consumption, supporting up to six devices with accurate timing adjustments.
Smart Images

Figure CN115551068B_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese patent application 201880057718.0 (PCT / US2018 / 049752) filed on September 6, 2018 and entitled “Bluetooth Media Device Time Synchronization”. Technical Field
[0002] The present disclosure relates generally to wireless communications, and more particularly to wireless device communication of media data (video or audio data) using Bluetooth. Background Art
[0003] Bluetooth (BT) is an example of an ad hoc networking technology, which is a wireless communication standard commonly used when transferring information between two or more devices in close proximity to each other where speed is not an issue, including phones, printers, modems, and headsets. BT is well suited for low-bandwidth applications, including transferring voice data using a phone (e.g., using a BT headset) or transferring byte data from a keyboard or mouse using a handheld computer (transferring files). The BT Special Interest Group (SIG) specifications can be used for these communications.
[0004] BT devices enable high-quality audio distribution. A traditional use case is streaming music content from a stereo music player to headphones or speakers. The audio data is compressed in an appropriate format to efficiently utilize limited bandwidth. Another use case is, for example, synchronizing picture and voice in a movie.
[0005] The BT profile is a specification for one aspect of BT-based wireless communications between devices. The BT profile is based on the BT core specification and optional additional protocols. The Audio / Video Distribution Transport Protocol (AVDTP) includes a signaling entity for negotiating audio stream parameters and a transport entity for handling the stream itself. The Advanced Audio Distribution Profile uses AVDTP to stream music to stereo headphones through a Logical Link Control and Adaptation Layer Protocol (L2CAP) channel intended for use with the Video Distribution Profile in BT transport.
[0006] The Advanced Audio Distribution Profile (A2DP), sometimes referred to as BT audio streaming, mandates the use of AVDTP. Most smartphones today are capable of connecting to A2DP devices and streaming audio. A2DP defines the BT protocol and procedures that enable the distribution of audio content with high-quality audio in mono or stereo over an asynchronous connectionless (ACL) channel. A2DP effectively transforms a BT connection into an invisible auxiliary audio cable. For example, using A2DP music can be streamed from a mobile phone to wireless headphones, hearing aid / cochlear implant streaming, car audio, or from a laptop / desktop to wireless headphones. Voice can be streamed from a microphone device to a recorder.
[0007] BT does not have any inherent way to synchronize audio between various BT devices (such as speakers). In the BT SIG specification, a synchronization code is embedded in the preamble of each BT packet to assist the timing synchronization process performed by the receiving device for each received packet. Unlike WiFi, BT has very limited broadcast capabilities due to the relatively low power used for BT transmissions. In addition, since the receiving device does not provide a baseband acknowledgment (ACK) frame, it is not guaranteed that the broadcast in BT will be received. Synchronization can be performed at the host processor level of the device, which requires a lot of additional power and is relatively complex to implement. Currently known audio synchronization solutions typically only support two audio devices configured in a micro-net topology, where the master device is usually the audio transmitter and the slave device is the only audio receiver. Summary of the invention
[0008] In the described examples of user media applications (such as audio applications, including surround sound, social music playback, jukebox applications, and ad-hoc addition of speakers to a BT speaker network), separate (non-electrically connected) BT speakers connect to the same audio stream and play from the same audio stream through the same BT connection. In order for these audio applications to provide good sound quality, accurate time synchronization needs to be provided for all BT speakers so that (when playing) the user hears them all playing at the same time, such as through standard BT A2DP. Although the described embodiments distribute streaming audio from a standard A2DP source, the described embodiments can generally be used for any group of BT devices that implement A2DP, such as for synchronizing pictures and voice in a movie.
[0009] By configuring BT media devices in a decentralized network chain and thus in a device chain and using time synchronization information from the local clock and the network clock of each BT controller in a new BT packet, the BT controller of the BT device can receive media (e.g., audio) streams from an external output / source device (e.g., an A2DP source such as a mobile phone) via BT and time synchronize other BT devices (e.g., speakers) in the chain. The described packet may include a modified BT SIGAVDTP packet including added timing information including the playback start time of the packet (including a delay time) and the accumulated drift calculated so far in the device chain (the drift is the time difference between the local clock of each device and its network clock). The delay time is selected so that all BT speakers have enough time to store the packet in their memory before starting playback.
[0010] The first BT media device in a BT speaker chain sends a description packet with timing information to a second BT media device, and the first BT media device is the media device to which all other BT media devices in the chain are time synchronized. The first BT media device is the device to which the A2DP source is directly connected, which can be the media device that is physically farthest, closest, or at any chain position in between the A2DP source. The stream originator (A2DP source) can be part of the synchronization network of BT media devices (if sent by the described BT media device) or it can be a source external to the synchronization network. In the case of audio, the described solution allows distribution of streaming audio from a standard A2DP source, which can be any A2DP compatible device, typically within <30μs time synchronization.
[0011] A described embodiment includes a method for BT synchronized media streaming. BT media devices are configured in a scatternet chain, the scatternet chain includes a first, a second and at least a third BT media device, each BT media device includes a BT controller, the BT controller includes a processor that runs a stored description time synchronization algorithm and has a local clock and a network clock. A scatternet is an ad hoc computer network including two or more micro-nets. In a scatternet, a slave device can communicate with more than one micro-net. In conjunction with the operation of the scatternet, a BT master device can relay the identification of a mobile slave device within its respective micro-net to its host processor to track the location of the mobile slave device or the location of a person carrying the mobile device.
[0012] The first BT media device formats a first BT media packet, the first BT media packet includes the received media data, the second device address, and synchronization information, the synchronization information includes the start time of the packet including the delay time value and the accumulated clock drift calculated so far in the chain. The second BT media device receives the first packet and formats a second packet, the second packet includes the media data, the address of the third BT media device, and the updated synchronization information of the third BT media device, the updated synchronization information of the third BT media device includes the play start time of the second packet, the local clock time of the second BT controller, the clock drift of the second BT controller, the delay time, and the accumulated clock drift calculated so far. The second BT media device transmits the second packet to the third BT media device. The synchronization algorithms each start to play the media data synchronously, including playing the first BT media device after the delay time is reached, playing the second BT media device after the play start time of the first packet is reached, and playing the third BT media device after the play start time of the second packet is reached. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1An example audio network is shown including BT speakers configured in a chain, the BT speakers comprising a first BT speaker, a second BT speaker, and at least a third BT speaker, all of which are within BT range of at least one of the BT speakers, wherein the first BT speaker receives an encoded audio data stream from a BT digital audio stream sending device, which is shown as an A2DP source.
[0014] Figure 2 The described example media packet is shown with a preamble configured such that a synchronization source (SSRC) field contains the play start time of the packet and the accumulated drift calculated so far, and a media payload field.
[0015] Figure 3A Shown in the buffer state Figure 1 The described synchronization signaling is used in the illustrated audio network to enable BT speakers to start playing at substantially the same time by using packets that include the play start time of the packet (including the local clock from the peer (master) device) and a delay time to enable all BT speakers to store the packet in their memory before starting to speak, as well as accumulated clock drift.
[0016] Figure 3B The described synchronization signaling includes sending a packet including control data for adjusting the timing of the playback in the playback state by tracking the drift between the network clocks. Figure 1 The audio network shown uses BT speakers to drift between each other and compensate for this drift-based error. Figure 3A , each packet includes a play start for the packet to indicate when it should be played.
[0017] Figure 4A is a block diagram of an example BT media device that implements the described BT media device time synchronization.
[0018] Figure 4B is a block diagram of the described BT media device according to an example embodiment, the BT media device comprising a separate host processor and a BT controller coupled to each other via a host controller interface (HCI), wherein the BT controller comprises firmware (FW) for implementing the described speaker chain time synchronization.
[0019] Figure 5 is a flow chart of an example method for BT synchronized media streaming for a media network including BT media devices according to an example embodiment.
[0020] Figure 6 An exemplary simplified example is shown illustrating the described BT media device synchronization for a 3 speaker example. DETAILED DESCRIPTION
[0021] The accompanying drawings are not necessarily drawn to scale. In the accompanying drawings, similar reference numerals represent similar or equivalent elements. The order of actions or events shown is not restrictive, as certain actions or events can occur in different orders and / or simultaneously with other actions or events. In addition, some of the actions or events shown may be optional to implement methods according to this specification.
[0022] In this specification, as used herein, without further qualification, the terms "coupled to" or "coupled with..." (etc.) describe either an indirect or direct electrical connection. Thus, if a first device is "coupled" to a second device, the connection may be through a direct electrical connection that is merely parasitic in the path, or through an indirect electrical connection that includes intermediary items of other devices and connections. For indirect coupling, the intermediary items generally do not modify the information of the signal, but may adjust its current level, voltage level, and / or power level.
[0023] Figure 1 An example media network is shown, shown as an audio network 100, which includes BT speakers configured in a chain, the BT speakers including a first BT speaker shown as speaker 1, a second BT speaker shown as speaker 2, and at least a third BT speaker shown as speaker 3, all of which are within BT range of their BT speaker neighbors. The first BT speaker receives an encoded audio data stream from a BT digital audio stream sending device shown as an A2DP source 120. The BT speaker chain establishes a master-slave relationship between adjacent BT speakers. The BT speakers are first wirelessly connected to each other to create a speaker network chain (scatternet), and each packet will be processed by the BT device like any other audio packet that would be processed, except that each packet is sent along the downstream direction of the chain to the next BT speaker along with an updated timestamp to time synchronize the BT speakers. In the case where the BT media devices include BT speakers, such as Figure 1 As shown, the BT speaker can be a mono or stereo speaker.
[0024] The BT speaker does nothing with the received stream. The stream is processed, its header is changed to contain time synchronization information, and the stream is then sent to the next BT device in the chain to perform the same operation. For the speakers, the arrangement can be thought of as a speaker chain, where one of the speakers is connected to an A2DP audio source, and the same audio stream flows through the speaker devices in the network.
[0025] Clock domains are shown between adjacent BT speakers in a speaker chain, where clock domains 1, 2, and 3 are configured as master-slave pairs, respectively, where clock domain 1 is shown between speaker 1 and speaker 2, clock domain 2 is shown between speaker 2 and speaker 3, and clock domain 3 is shown between speaker 3 and speaker 4 (not shown). The respective clock domains are set by the master speaker device in each pair, which sets the network clock and the local clock of its slave speaker device, with the local clock being used as the packet play time information of the described packets (e.g., in the SSRC field, see Figure 2 SSRC field 210 in the example media packet 200 shown, the depicted packet also includes media data as its payload.
[0026] As the first loudspeaker in the chain, loudspeaker 1 is simply a master in clock domain 1, which is shared with loudspeaker 2, which is a slave in clock domain 1. The network clock of loudspeaker 2 is set to the local clock of loudspeaker 1 (= its network clock), which is the first loudspeaker. Loudspeaker 2 is a master in clock domain 2, which is shown together with loudspeaker 3, which is a slave in clock domain 2, so that the local clock of loudspeaker 2 (which is the master) is used as the network clock of loudspeaker 3. Loudspeaker 3 is a master in clock domain 3, which is shown together with loudspeaker 4 (not shown), which is a slave in clock domain 3. As described in more detail below, clock domains are implemented by packet transmission from a master to a slave, whereby packets sent from a master to a slave (see the description below) are transmitted. Figure 2 The media packet 200 shown in FIG. 2 includes the start of playback of the packet and the accumulated clock drift (difference) calculated so far. The BT clock may include a crystal oscillator, a ceramic resonator, an RC (resistor, capacitor) feedback oscillator, or a silicon oscillator.
[0027] Figure 2 An example media packet 200 is shown as described. The media packet 200 is shown using the existing SSRC field 210 in the preamble of the BT packet, where the BT controller reads the received BT clock from its peer BT media device and converts it to the local time of the BT media device and then stores it in the SSRC field 210 before sending it to the next BT media device in the chain. The timestamp field 220 is used to store the accumulated speaker drift. There is also a media (e.g., audio) payload field 230.
[0028] Although described using a preamble, time synchronization information may be stored elsewhere in the packet, such as at the beginning of the media payload field 230. Both the SSRC field 210 and the timestamp field 220 are shown as 32 bits by way of example. The csrc list shown is an array of 16 (binary 0 to 15) contributing source (CSRC) elements that identify the contributing sources of the payload contained in the packet. The media packet 200 illustrates how the SSRC field 210 in a conventional BT A2DP packet is used to reflect that the received BT clock is read from a peer (previous speaker device in the chain (as master)) BT speaker and converted to the speaker's local time and stored again in the SSRC field 210 of the packet before the packet is sent to the next BT speaker in the chain. The timestamp field 220 is used to store the accumulated speaker drift.
[0029] The BT clock includes two fields, namely the BT clock that is timed at a frame resolution and the packet timer (PT) that is timed at a microsecond rate. For example, 1 frame passes every 1250 microseconds, which is a BT clock beat. The information element is stored in the SSRC field 210, which includes the BT clock and PT, which can together include 27 bits, and the remaining 5 bits (for a 32-bit field) are used to store the address identification of the intended receiving media device (such as a speaker) to identify to whom this packet should be sent via a physical bus (for example, a pulse code modulation (PCM) bus). The packet media payload 230 typically contains PCM encoded audio samples. Since the drift between the clocks of the BT speakers is taken into account in the packet 200, the physical bus is not just an air physical bus.
[0030] Figure 3A Shown in the buffer state Figure 1 The described synchronization signaling used in the illustrated audio network 100. The buffered state stores packets in a memory 422 (e.g., a data buffer) of each BT speaker and enables each BT speaker to start playing audio at substantially the same time by sending (using packets illustrated as P4, P3, P2, and P1) time synchronization data including a delay time ahead of playback (e.g., about 100 ms into the future (delay time)) between the BT speakers before starting music playback and time synchronizing each speaker using its local BT clock (which is clocked differently).
[0031] As shown, P4, P3, P2 are transmitted from the master speaker device in each pair to the slave speaker devices, as described, i.e., each BT speaker uses a packet including a packet play time (including delay time) to enable all BT speakers to start talking at the same time, the packet play time reflecting reading the BT clock received from the peer (master) BT speaker, converting it to the local clock time of the BT speaker, and then storing it in the SSRC field 210 along with the timestamp field 220 with the accumulated speaker drift before sending it to the next BT speaker in the chain. Once the marker (packet play time) is reached, all corresponding BT speakers will start playing the same audio data at substantially the same time. This means that each BT device will wait for the exact BT clock and PT clock (where the BT clock is calculated in time slots, each time slot is, for example, 1,250 μs, and the PT clock is calculated in μs), and therefore starts playing when the exact BT clock correction μs value within that time slot is reached. For each BT speaker, the BT clock and PT clock times received from the master device are given according to the network clock 409 of the slave device, and the BT clock and PT clock times are forwarded according to the local clock 408 (see description below) Figure 4A At this point, the status of all BT speakers is changed to Play to enable the playback of audio samples.
[0032] Figure 3B The described synchronization signaling includes sending control data to adjust the synchronization signaling in the play state. Figure 1 The audio network 100 shown is used to allow the BT speakers to track the drift between the network clocks and compensate for the timing errors based on the drift. Figure 3A As with the depicted buffering state, each packet includes a play start time for the packet including a delay time indicating when it should be played.
[0033] Figure 4A A system block diagram representation of an example BT media device 400 that generally complies with the BT communication standard is shown. The BT media device 400 is generally formed on at least one integrated circuit (IC) as shown, which is formed on a substrate 405a having a semiconductor surface for a BT controller 425b and another substrate 405b having a semiconductor surface for a main processor 425a. The BT media device 400 can be any device that can participate in BT communication. Such a BT media device can be, can include, or can be a part of a mobile phone (such as a smartphone, a tablet computer, a computer, a personal digital assistant, a camera, and household items with communication capabilities, such as blinds and motion sensors). The BT media device 400 communicates with other BT media devices in a BT network configured as a scatternet and therefore in a chain of devices.
[0034] BT media device 400 includes a host processor 425a and a BT controller 425b that communicate with each other via HCI 430. Host processor 425a includes a memory 432 that stores HCI FW including HCI command codes. BT controller 425b includes a processor 423, a memory 422 including software 422a, and a transceiver 424 including an RF driver 424a, the software 422a including source code for parsing, understanding and executing commands from host processor 425a, and RF driver 424a is suitable for coupling to an antenna 418 that is usually outside the chip. The processor may include a digital signal processor (DSP) or a microcontroller. The processor jointly implements a BT protocol stack for BT media operations. BT media device 400 also includes a local clock 408 and a network clock 409.
[0035] Also shown is a transceiver 424 including hardware including digital logic 424b that can be used as an alternative to the software 422a that implements the synchronization described. The transceiver 424 includes a transmitter and a receiver. The transmitter typically includes a media access control (MAC) module, an encoder, a modulator, an inverse fast Fourier transform (IFFT) unit, a digital-to-analog conversion (DAC) / filter module, and an RF / antenna module. The receiver typically includes an RF / antenna unit, an analog-to-digital conversion (ADC) / filter unit, an FFT unit, a demodulator, a decoder, and a MAC module.
[0036] More generally, memory 422 is configured to store information including data, instructions, or both. Memory 422 may be any storage medium accessible to processor 423, such as read-only memory (ROM), random access memory (RAM), registers, cache memory, or magnetic media devices, such as internal hard disks and removable disks. A phase-locked loop (PLL) 432 is also provided for purposes including mixing and frequency synthesis.
[0037] Processor 423 is coupled to memory 422 and transceiver 424. In some embodiments, transceiver 424 includes a baseband unit ( Figure 4A Not shown, but see Figure 4B ) and an analog unit (not shown) for transmitting and receiving RF signals. The baseband unit may include hardware for performing baseband signal processing, including digital signal processing, encoding and decoding, modulation and demodulation. The analog unit may include hardware for performing analog-to-digital conversion (ADC), digital-to-analog conversion (DAC), filtering, gain adjustment, up-conversion, and down-conversion.
[0038] The analog unit can receive an RF signal from an access point and down-convert the received RF signal to a baseband signal to be processed by the baseband unit, or can receive a baseband signal from a baseband unit and up-convert the received baseband signal to an RF wireless signal for uplink transmission. The analog unit includes a mixer for up-converting the baseband signal and down-converting the RF signal by a carrier signal oscillating at the radio frequency of the BT network. The data rate used by the BT media device 400 can be in the current BT band of 2.472 GHz to 2.479 GHz, or in any future BT band used.
[0039] Figure 4B yes Figure 4A 400 ′, which shows a host processor 425a including an application layer 440 with a BT application and a logical link control and adaptation layer protocol (L2CAP) layer 448. The BT protocol RFCOMM block 441 is a set of simple transport protocols made on top of the L2CAP layer 448. The Telephone Control Protocol Specification (TCS) 442 defines how audio calls are sent between BT devices. The Service Discovery Protocol (SDP) 443 is a specification that defines a way to represent UUTD ranges (nominal 128 bits) in a shorter form. The Point-to-Point Protocol (PPP 444) is a data link (layer 2) protocol used to establish a direct connection between two nodes. Transmission Control Protocol / Internet Protocol (TCP / IP) 445 enables BT devices to carry TCP / IP traffic, OBEX 446 is a communication protocol that facilitates the exchange of binary objects between BT devices, and AT Command Interface (AT) 447 is a command interface that includes a series of machine instructions for activating functions on the analog modem.
[0040] 4 shows a BT controller 425b, which includes a link manager protocol (LMP) 426, a baseband part, and an RF part, which are Figure 4A A portion of a transceiver 424 is shown. Also shown is a BT controller 425b, which includes baseband circuitry 427 and RF circuitry 428. The LMP 426 controls and negotiates all aspects of the operation of a BT connection between two adjacent BT media devices.
[0041] The described time synchronization can be performed entirely by the BT controller, so no host processor is needed to synchronize the BT media device, saving power. The synchronization level at the start of playback is typically around 30μs, which is the uncalculated time between the software executing the command on the physical bus (such as a PCM line) and the hardware output data of the BT media device. The drift level is around 4ms per hour, which is the accumulated error of the time synchronization algorithm active over a relatively long period of time. The audiophile ear can detect drifts of around 20ms, which means that the audio synchronization performance level between BT speakers in the network is already sufficient.
[0042] By scheduling the start of audio or audio with associated video (e.g., as described above, synchronization between output (source) and input (sink) devices can also be used to synchronize pictures and voice in a movie) to start playing after a delay time of about 100ms (into the future) so that other BT speakers in the chain have time to buffer a large number of samples before starting playback. This 100ms parameter has been tested and works with up to 6 BT speakers. However, this delay time is generally configurable by the user. By sending a packet with the audio and the delay time to the speakers in advance and synchronizing the speakers using the BT clock, the speakers can synchronize and start playing audio at essentially the same time (about 30μs difference).
[0043] The described embodiments can support 6 or more speakers, whereas other solutions as described above only support 2 BT media devices (master and 1 slave). In general, there is no limit to the number of speakers in the chain. In practice, the described network is limited to 6 BT devices due to internal device memory limitations only. With more memory, more speakers can be added to the network. Other BT speaker solutions use a piconet star topology, whereas the described embodiments use a scatternet topology.
[0044] The described solution also enables packet retries to send data and sufficient time to recover if any packet must be retransmitted. Advantages of the described embodiments over known synchronization solutions include: While all other synchronization solutions provide synchronization with millisecond resolution, the described embodiments provide microsecond resolution. Furthermore, as mentioned above, the described synchronization can be used for 6 or more synchronized BT speakers, while other solutions are limited to only 2 synchronized BT speakers.
[0045] Figure 5is a flow chart of an example method 500 for BT synchronized media streaming according to an example embodiment. Step 501 includes configuring BT media devices in a decentralized network chain, the decentralized network chain including first, second and third BT media devices, each BT media device including a BT controller, the BT controller including a processor running a stored time synchronization algorithm and having local and network clocks. Step 502 includes the first BT media device receiving an encoded media data stream from a BT digital media stream sending device. Step 503 includes the time synchronization algorithm of the first device formatting at least a first BT media packet, the first BT media packet including the encoded media data, the address of the second BT media device and the time synchronization information of the second BT media device, the time synchronization information including the playback start time of the first BT media packet including a delay time and the accumulated clock drift calculated so far in the chain.
[0046] Step 504 includes the first BT media device sending the first BT media packet to the second BT media device. Step 505 includes the time synchronization algorithm of the second BT media device formatting at least the second BT media packet, the second BT media packet including the encoded media data, the address of the third BT media device, and the updated time synchronization information of the third BT media device, the updated time synchronization information of the third BT media device including the playback start time of the second BT media packet and the accumulated clock drift calculated so far in the device chain, the playback start time of the second BT media packet including the local clock time of the second BT controller, the drift of the second BT controller clock, and the delay time value. Step 506 includes the second BT media device transmitting the second BT media packet to the third BT media device. Step 507 includes the time synchronization algorithm starting to synchronize the playback of the encoded media data stream, including playing the first BT media device after reaching the delay time, playing the second BT device after reaching the playback start time of the first BT media packet, and playing the third BT media device after reaching the playback start time of the second BT media packet.
[0047] The delay time is typically at least 50ms and is selected so that all BT media devices have enough time to store a predetermined number of BT media packets in their memory before playback begins. When BT media devices include BT A2DP speakers, they can span different rooms within BT range by calling an application programming interface (API) to enable multi-room speaker operation. BT media devices typically provide a synchronization level of <50μs at the start of synchronized playback and maintain this synchronization level during playback.
[0048] Example
[0049] The described embodiments are further illustrated by the following examples, which are not intended to limit the scope or content of this specification in any way.
[0050] The described time synchronization for a BT media scatternet chain of 6 BT speakers is used with BT audio packets with audio samples and time synchronization information using a latency of about 100ms (into the future) so that all other BT speakers in the chain have enough time to buffer a large number of packet samples before starting playback. The BT speakers all start playing the same audio sample at essentially the same time (within 30μs difference). After starting playback, the first BT speaker sends an updated BT audio packet (including the drift value between its local clock and the network clock) to the second BT speaker, and the second BT speaker sends an updated BT audio packet (including the drift value between its clocks) to the third BT speaker, etc., where the clock drift value is used to change the time of "speaking" to compensate for the clock drift.
[0051] Figure 6 A simplified audio example is shown, which shows audio packets 1 and 2 (shown as AVDTP packets 1 and 2) that have described the time synchronization information of a chain of 3 BT speaker devices. The BT speaker devices as described above each include a BT controller running a stored synchronization algorithm in FW, and both devices have a local clock and a network clock. The BT controller 1 of the speaker device 1 receives an encoded audio data stream from a BT digital audio stream sending device (such as an A2DP source).
[0052] BT controller 1 is shown, its local clock also used as its network clock, since it is the first device in the chain it only has a single (identical) clock, which is shown as having a time of 200 μs, so there is no clock difference. BT controller 1 is based on Figure 2 The example media packet 200 is shown to format an AVDTP packet shown as AVDTP packet 1. Figure 2 In FIG. 2 , the SSRC field 210 indicates a 200 μs time value from its local clock and a delay time value (Delay) such as 100 ms.
[0053] The timestamp field 220 stores the accumulated speaker drift which is zero at that point in the chain being the first speaker device in the chain. Figure 6The "X" shown is the drift between the local clock of the audio source (not shown) and the local clock of the BT controller 1. The packet ID shown provides a unique identification (ID) for each packet, thereby ensuring that the packets are received in order and knowing that the packets have not been lost along the way. In addition, the same difference is calculated for each packet. Although not shown, the AVDTP packet 1 has a media payload including pulse code modulation (PCM) encoded audio samples and is addressed to identify the speaker device 2 including the BT controller 2, for which the AVDTP packet 1 sent over a physical bus (such as a PCM bus) is addressed.
[0054] A speaker 2 device including a BT controller 2 is shown, which receives an AVDTP packet 1. The BT controller 2 is shown, whose local clock time is 625 μs and whose network clock time is 200 μs (network clock time received from BT controller 1 = local clock time of BT controller 1), so the clock difference (or clock drift) of BT controller 2 is 425 μs. BT controller 2 is again based on Figure 2 The example media packet 200 shown formats the AVDTP packet, shown as AVDTP packet 2, the same as AVDTP packet 1, where the SSRC field 210 provides the packet 2 play start time, which reflects the local clock of BT controller 2 (625μs) minus (minus) its clock drift (425μs) and the delay time value.
[0055] BT controller 2 thus converts the 200 μs BT clock time received from BT speaker device 1 to the local time of speaker 2 and stores this time synchronization information in SSRC field 210 of AVDTP packet 2. In addition, AVDTP packet 2 is formatted to include the updated cumulative clock drift in the chain so far in timestamp field 220, which includes X (from AVDTP packet 1) and Y (which is the drift between the local clock of BT controller 1 and the local clock of BT controller 2), and shows a cumulative clock drift of 425 μs (value 0 from BT controller 1 and value 425 μs from BT controller 2). Although not shown, AVDTP packet 2 has a payload containing the same PCM encoded audio samples and is addressed to identify speaker device 3 for which AVDTP packet 2 sent over a physical bus (such as a PCM bus) is addressed.
[0056] A speaker 3 device including a BT controller 3 is shown receiving an AVDTP packet 2. The BT controller 3 is shown with a local clock time of 150 μs and a network clock time of 625 μs (the local clock time of the BT controller 2), so the clock difference of the BT controller 3 is 475 μs. The BT controller 3 calculates the playback start time of the AVDTP packet 2, which reflects the local clock of the BT controller 3 (150 μs) minus (minus) its clock drift (475 μs) and the delay time value.
[0057] The respective time synchronization algorithms begin synchronously playing the same PCM encoded audio samples, including playing the first BT speaker after the delay time is reached, starting playing the second BT device after reaching the play start time of AVDTP packet 1, and starting playing the third BT media device after reaching the play start time of AVDTP packet 2. AVDTP packet 1 and AVDTP packet 2 have the same packet ID and the same audio data, and only have different packet timing data on the packets. Each speaker starts playing within <30μs time synchronization when playback starts, so the BT speakers start playing the same audio data at substantially the same time. In addition, as described above, as with the buffered state described above, during playback, each packet is timestamped to indicate when the packet is played, and after playback starts, time synchronization between speakers is maintained by tracking drift between network clocks and compensating for this source of time synchronization error.
[0058] Although the described solutions are described for distributing streaming audio from a standard A2DP source, they may be used more generally for any set of devices that implement A2DP, such as for synchronizing picture and voice in a movie.
[0059] The described embodiments may be modified and other embodiments are possible within the scope of the claims.
Claims
1. A method for Bluetooth communication, comprising: receiving, by a first Bluetooth media device configured in the chain, the encoded media data; as well as A Bluetooth media packet is transmitted by the first Bluetooth media device to a second Bluetooth media device configured in the chain, the Bluetooth media packet including the encoded media data, the address of the second Bluetooth media device and time synchronization information, wherein the time synchronization information includes a playback start time of the Bluetooth media packet including a delay time, and an accumulated clock drift calculated so far in the chain, wherein the delay time is selected so that all Bluetooth media devices in the chain have sufficient time to store the corresponding Bluetooth media packet in their memory before starting playback. 2 . The method according to claim 1 , further comprising playing the encoded media data after the delay time. The method according to claim 1 , wherein the delay time is at least 50 ms.
4. The method according to claim 1, wherein: The first Bluetooth media device is a Bluetooth Advanced Audio Distribution Profile speaker, ie, a Bluetooth A2DP speaker, and the encoded media data includes A2DP audio data. The method of claim 1 , wherein a preamble of the Bluetooth media packet includes the time synchronization information.
6. A method for Bluetooth communication, comprising: receiving, by a first Bluetooth media device configured in a chain, a first Bluetooth media packet from a second Bluetooth media device configured in the chain, the first Bluetooth media packet comprising encoded media data, an address of the first Bluetooth media device, and first time synchronization information, wherein the first time synchronization information comprises a playback start time of the first Bluetooth media packet including a delay time, and an accumulated clock drift calculated so far in the chain, wherein the delay time is selected such that all Bluetooth media devices in the chain have sufficient time to store the corresponding Bluetooth media packet in their memory before starting playback; as well as The first Bluetooth media device transmits a second Bluetooth media packet to a third Bluetooth media device configured in the chain, the second Bluetooth media packet including the encoded media data, the address of the third Bluetooth media device and updated second time synchronization information of the third Bluetooth media device, the updated second time synchronization information including a playback start time of the second Bluetooth media packet and a cumulative clock drift calculated so far in the chain, the playback start time of the second Bluetooth media packet including the time of a local clock of the first Bluetooth media device, the drift of the local clock of the first Bluetooth media device, and the delay time. The method of claim 6 , further comprising playing the encoded media data after the playback start time. The method according to claim 6 , wherein the delay time is at least 50 ms.
9. The method according to claim 6, wherein: The first Bluetooth media device is a Bluetooth Advanced Audio Distribution Profile speaker, ie, a Bluetooth A2DP speaker, and the encoded media data is a source of A2DP audio data.
10. The method of claim 6, wherein a preamble of the first Bluetooth media packet includes the first time synchronization information, and a preamble of the second Bluetooth media packet includes the updated second time synchronization information.
11. A device for Bluetooth communication, comprising: processor; as well as A non-transitory computer-readable storage medium storing a program executed by the processor, the program comprising instructions to: receiving a first Bluetooth media packet from a second Bluetooth media device configured in the same chain as the device for Bluetooth communication, the first Bluetooth media packet comprising encoded media data, an address of the device for Bluetooth communication, and first time synchronization information, wherein the first time synchronization information comprises a playback start time of the first Bluetooth media packet including a delay time, and an accumulated clock drift calculated so far in the chain, wherein the delay time is selected so that all Bluetooth media devices in the chain have sufficient time to store the corresponding Bluetooth media packet in their memories before starting playback; as well as A second Bluetooth media packet is transmitted to a third Bluetooth media device, wherein the second Bluetooth media packet includes the encoded media data, the address of the third Bluetooth media device and updated second time synchronization information of the third Bluetooth media device, the updated second time synchronization information includes a playback start time of the second Bluetooth media packet and an accumulated clock drift calculated so far in the chain, the playback start time of the second Bluetooth media packet includes the time of a local clock of the device for Bluetooth communication, the drift of the local clock of the device for Bluetooth communication, and the delay time.
12. The apparatus of claim 11, wherein the instructions further comprise instructions to play the encoded media data after the play start time.
13. The apparatus of claim 11, wherein the delay time is at least 50 ms. 14 . The device of claim 11 , wherein the device for Bluetooth communication is a Bluetooth Advanced Audio Distribution Profile (A2DP) speaker, and the encoded media data is a source of A2DP audio data. 15 . The apparatus of claim 11 , wherein a preamble of the first Bluetooth media packet includes the first time synchronization information, and a preamble of the second Bluetooth media packet includes the updated second time synchronization information.
Citation Information
Patent Citations
Synchronized audio play method simultaneously using various kinds of play modules of equipment and apparatus thereof
CN106341719A
System for maintaining synchronization between multiple asynchronous communication links
US20020136198A1
