Synchronization method for synchronizing clocks of a bluetooth device
A Bluetooth device with a host system and a controller is disclosed. The host system supports a host stack of a Bluetooth protocol, and the controller supports a controller stack of the Bluetooth protocol. The device includes an interface for receiving, at the controller, a piconet-synchronized signal. The device also includes an interface for providing, by the controller to the host system, a derivative of the piconet-synchronized signal. The device also includes a circuit for determining a latency of the providing. The device also includes a circuit for synchronizing, at the host system of the Bluetooth device, a host clock with a timing reference of a master device of the Bluetooth piconet using said latency and the derivative of the piconet-synchronized signal.
1. A method, performed by a Bluetooth device comprising a host system supporting a host stack of a Bluetooth protocol and a controller supporting a controller stack of the Bluetooth protocol, for wirelessly transmitting audio data to a plurality of Bluetooth audio sink devices, the method comprising:
creating a point-to-multipoint link from a Bluetooth chip of the Bluetooth device to the plurality of Bluetooth audio sink devices;
receiving a main audio stream part;
synchronizing a host clock of the Bluetooth device with a master timing reference by:
(i) receiving, at the controller, a piconet-synchronized signal;
(ii) providing, by the controller to the host system, a derivative of the piconet-synchronized signal;
(iii) determining a latency of the providing; and
(iv) synchronizing, at the host system of the Bluetooth device, the host clock with the master timing reference using said latency and the derivative of the piconet-synchronized signal;
creating a plurality of packet sets based on said main audio stream part, each packet set comprising at least one packet, each packet set being directed to a respective Bluetooth audio sink device among the plurality of Bluetooth audio sink devices;
timestamping the at least one packet of each packet set based on the synchronized host clock; and
transmitting the at least one timestamped packet of each packet set to the respective Bluetooth audio sink device via a respective wireless link of the point-to-multipoint link, said respective wireless link connecting the Bluetooth device and the respective Bluetooth audio sink device.
2. The method of claim 1 , wherein the main audio stream is an audio stream with multiple channels, and wherein the at least one transmitted timestamped packet contains mono audio data relative to a channel among the multiple channels.
3. A Bluetooth device for wirelessly transmitting audio data to a plurality of Bluetooth audio sink devices, the Bluetooth device comprising a host system supporting a host stack of a Bluetooth protocol and a controller supporting a controller stack of the Bluetooth protocol, the Bluetooth device comprising:
a Bluetooth chip configured to create a point-to-multipoint link from said Bluetooth device to the plurality of Bluetooth audio sink devices;
an interface for receiving a main audio stream part;
a circuit for synchronizing a host clock of the Bluetooth device with a master timing reference by:
(i) receiving, at the controller, a piconet-synchronized signal;
(ii) providing, by the controller to the host system, a derivative of the piconet-synchronized signal;
(iii) determining a latency of the providing; and
(iv) synchronizing, at the host system of the Bluetooth device, the host clock with the master timing reference using said latency and the derivative of the piconet-synchronized signal;
a circuit for creating a plurality of packet sets based on said main audio stream part, each packet set comprising at least one packet, each packet set being directed to a respective Bluetooth audio sink device among the plurality of Bluetooth audio sink devices;
a circuit for timestamping the at least one packet of each packet set based on the synchronized host clock; and
a circuit for transmitting the at least one timestamped packet of each packet set to the respective Bluetooth audio sink device via a respective wireless link of the point-to-multipoint link, said respective wireless link connecting the Bluetooth device and the respective Bluetooth audio sink device.
4. A non-transitory computer readable storage medium, having stored thereon a computer program comprising program instructions, the computer program being loadable into a data-processing unit and adapted to cause the data-processing unit to carry out a method, performed by a Bluetooth device comprising a host system supporting a host stack of a Bluetooth protocol and a controller supporting a controller stack of the Bluetooth protocol, for wirelessly transmitting audio data to a plurality of Bluetooth audio sink devices, when the computer program is run by the data-processing unit, the method comprising:
creating a point-to-multipoint link from a Bluetooth chip of the Bluetooth device to the plurality of Bluetooth audio sink devices;
receiving a main audio stream part;
synchronizing a host clock of the Bluetooth device with a master timing reference by:
(i) receiving, at the controller, a piconet-synchronized signal;
(ii) providing, by the controller to the host system, a derivative of the piconet-synchronized signal;
(iii) determining a latency of the providing; and
(iv) synchronizing, at the host system of the Bluetooth device, the host clock with the master timing reference using said latency and the derivative of the piconet-synchronized signal;
creating a plurality of packet sets based on said main audio stream part, each packet set comprising at least one packet, each packet set being directed to a respective Bluetooth audio sink device among the plurality of Bluetooth audio sink devices;
timestamping the at least one packet of each packet set based on the synchronized host clock; and
transmitting the at least one timestamped packet of each packet set to the respective Bluetooth audio sink device via a respective wireless link of the point-to-multipoint link, said respective wireless link connecting the Bluetooth device and the respective Bluetooth audio sink device.
5. A wireless audio system for wirelessly transmitting audio data from a Bluetooth master device to a plurality of Bluetooth audio sink devices, wherein the Bluetooth master device comprises a host system supporting a host stack of a Bluetooth protocol and a controller supporting a controller stack of the Bluetooth protocol, wherein the Bluetooth master device further comprises:
a Bluetooth chip configured to create a point-to-multipoint link from said Bluetooth master device to the plurality of Bluetooth audio sink devices;
an interface for receiving a main audio stream part;
a circuit for creating a plurality of packet sets based on said main audio stream part, each packet set comprising at least one packet, each packet set being directed to a respective Bluetooth audio sink device among the plurality of Bluetooth audio sink devices;
a circuit for timestamping the at least one packet of each packet set based on a synchronized host clock; and
a circuit for transmitting the at least one timestamped packet of each packet set to the respective Bluetooth audio sink device via a respective wireless link of the point-to-multipoint link, said respective wireless link connecting the Bluetooth master device and the respective Bluetooth audio sink device;
wherein each Bluetooth audio sink device among the plurality of Bluetooth audio sink devices comprises a respective host system supporting a host stack of a Bluetooth protocol and a respective controller supporting a controller stack of the Bluetooth protocol,
wherein each Bluetooth audio sink device among the plurality of Bluetooth audio sink devices further comprises:
a circuit for being wirelessly connected to the Bluetooth master device;
a circuit for synchronizing a host clock of the each Bluetooth audio sink device by:
(i) receiving, at the controller, a piconet-synchronized signal;
(ii) providing, by the controller to the host system, a derivative of the piconet-synchronized signal;
(iii) determining a latency of the providing; and
(iv) synchronizing, at the host system of the each Bluetooth audio sink device, the host clock with a master timing reference using said latency and the derivative of the piconet-synchronized signal;
an interface for receiving at least one timestamped packet on a dedicated link established between the each Bluetooth audio sink device and the Bluetooth master device; and
an output for rendering an audio signal based on the at least one timestamped packet and on the synchronized host clock of the each Bluetooth audio sink device.