US20200059504A1 - Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices - Google Patents
Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices Download PDFInfo
- Publication number
- US20200059504A1 US20200059504A1 US16/404,746 US201916404746A US2020059504A1 US 20200059504 A1 US20200059504 A1 US 20200059504A1 US 201916404746 A US201916404746 A US 201916404746A US 2020059504 A1 US2020059504 A1 US 2020059504A1
- Authority
- US
- United States
- Prior art keywords
- audio
- wireless device
- bluetooth
- buffer
- clock frequency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
- 239000000872 buffer Substances 0.000 claims abstract description 99
- 238000000034 method Methods 0.000 claims abstract description 36
- 238000012544 monitoring process Methods 0.000 claims abstract description 28
- 238000009966 trimming Methods 0.000 claims description 17
- 230000003247 decreasing effect Effects 0.000 claims description 6
- MKGHDZIEKZPBCZ-ULQPCXBYSA-N methyl (2s,3s,4r,5r,6r)-4,5,6-trihydroxy-3-methoxyoxane-2-carboxylate Chemical compound CO[C@H]1[C@H](O)[C@@H](O)[C@H](O)O[C@@H]1C(=O)OC MKGHDZIEKZPBCZ-ULQPCXBYSA-N 0.000 description 30
- 230000008569 process Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000007774 longterm Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000007423 decrease Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 210000005069 ears Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
-
- H04B5/70—
-
- H04B5/48—
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
- H04L65/612—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1091—Details not provided for in groups H04R1/1008 - H04R1/1083
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/04—Circuits for transducers, loudspeakers or microphones for correcting frequency response
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2420/00—Details of connection covered by H04R, not provided for in its groups
- H04R2420/07—Applications of wireless loudspeakers or wireless microphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/12—Circuits for transducers, loudspeakers or microphones for distributing signals to two or more loudspeakers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
Definitions
- the invention relates to clock synchronization between wireless devices, and more particularly to native and/or audio clock synchronization between Bluetooth wireless devices.
- a slave device such as a primary headset is arranged to receive a packet from a master device such as an audio source.
- the actual packet arrival timing for the slave device may be usually different from the ideal packet arrival timing.
- a frequency offset between native clocks of master and slave devices may occur.
- the audio codec clocks for playing audio samples employed by the master and slave devices may be different. All of these result in a low or poor audio quality due to asynchronous Bluetooth clocks and asynchronous audio codec clocks for multiple Bluetooth wireless devices.
- one of the objectives of the invention is to provide a method utilized in a wireless device used to wirelessly receive and play audio information, a method utilized in a wireless device to be used as a slave device to be wirelessly connected to a master device in a piconet, and corresponding wireless devices, to solve the above-mentioned problems.
- a method utilized in a wireless device used to wirelessly receive and play audio information comprises: receiving a data packet stream transmitted from an audio source; monitoring a data amount of at least one buffer of a memory of the wireless device; and tuning an audio clock frequency dedicated for playing audio samples if the data amount of the at least one buffer deviates from a specific data amount level.
- a method utilized in a wireless device to be used as a slave device to be wirelessly connected to a master device in a piconet comprises: using a receiver circuit of the wireless device to receive a data packet stream transmitted from an audio source; and tuning a clock frequency generated from an oscillator of the wireless device according to at least one of a frequency offset generated from the receiver circuit of the wireless device and a reception time offset of the receiver circuit of the wireless device.
- a Bluetooth wireless device used to wirelessly receive and play audio information is disclosed.
- the Bluetooth wireless device is to be used as a slave device to be wirelessly connected to a master device in a piconet, and the Bluetooth wireless device comprises a receiver circuit and a controlling circuit.
- the receiver circuit is used for receiving a data packet stream transmitted from an audio source.
- the controlling circuit is coupled to the receiver circuit and is used for monitoring a data amount of at least one buffer of a memory of the Bluetooth wireless device and tuning an audio clock frequency dedicated for playing audio samples if the data amount of the at least one buffer deviates from a specific data amount level.
- a Bluetooth wireless device used as a slave device to be wirelessly connected to a master device in a piconet comprises a receiver circuit and a controlling circuit.
- the receiver circuit is used for receiving a data packet stream transmitted from an audio source.
- the controlling circuit is coupled to the receiver circuit and is used for tuning a clock frequency generated from an oscillator of the Bluetooth wireless device according to at least one of a frequency offset generated from the receiver circuit of the Bluetooth wireless device and a reception time offset of the receiver circuit of the Bluetooth wireless device.
- FIG. 1 is an overview block diagram of a wireless communication system such as a Bluetooth communication network according to an embodiment of the invention.
- FIG. 2 is a block diagram of an example of a wireless device of FIG. 1 according to an embodiment of the invention.
- FIG. 3 is a block diagram of the operation of the controller for processing Bluetooth packet (s) to generate audio PCM (pulse code modulation) samples for an audio codec according to an embodiment of the invention.
- FIG. 4 is a diagram of block diagram illustrating audio play synchronization operation and functions of the wireless device in FIG. 1 according to an embodiment of the invention.
- FIG. 1 is an overview block diagram of a wireless communication system 100 such as a Bluetooth communication network (but not limited) according to an embodiment of the invention.
- the system 100 comprises an audio source D 1 such as a mobile/wearable electronic device (e.g. a smart phone), a wireless device 101 used as a primary headset D 2 , and another wireless device 101 used as a secondary headset D 3 .
- the headsets D 2 and D 3 are for example earphones.
- the wireless device 101 is used to wirelessly receive and play audio information which is generated from the audio source D 1 .
- the audio source D 1 and the primary headset D 2 are in the same piconet P 1 in which the audio source D 1 is a master device while the primary headset D 2 is a slave device.
- the primary headset D 2 is used to receive Bluetooth packet stream for example comprising Bluetooth audio packets generated from the audio source D 1 through the piconet P 1 .
- the primary headset D 2 and the secondary headset D 3 are in the same piconet P 2 in which the primary headset D 2 is a master device while the secondary headset D 3 is a slave device.
- the number of secondary headsets in other embodiments may be two or more; this is not meant to be a limitation.
- the secondary headset D 3 can receive the audio packets via a variety ways.
- the secondary headset D 3 may join the piconet P 1 to receive the audio packets directly from the audio source D 1 .
- the secondary headset D 3 may receive the audio packets relayed by the primary headset D 2 through the piconet P 2 .
- the secondary headset D 3 may snoop the audio packets transmitted from the audio source D 1 in the piconet P 1 .
- the primary headset D 2 and secondary headset D 3 are arranged to establish communications in the piconet P 2 , and the primary headset D 2 can provide communication parameters for the secondary headset D 3 so that the secondary headset D 3 can snoop the piconet P 1 or can receive the audio packets relayed by the primary headset D 2 from the audio source D 1 .
- Each Bluetooth wireless device 101 has its native clock generated from its oscillator as its local clock.
- a master device of the wireless devices 101 is arranged to use its native clock as the Bluetooth clock in one piconet
- slave device of the wireless devices 101 is arranged to use the master device's native clock as its Bluetooth clock in the same piconet.
- Each of the slave devices is arranged to synchronize its native clock to a master wireless device's native clock, i.e. the Bluetooth clock of the piconet.
- the Bluetooth clock employed by a slave device is kept in synchronization with a master device's native Bluetooth clock by adding a clock offset into the native clock of the slave device wherein the clock offset is updated each time or periodically when a Bluetooth packet is received from the master device. That is, the slave device's Bluetooth clock is equal to the master device's native Bluetooth clock plus the clock offset.
- FIG. 2 is a block diagram of an example of a wireless device 101 of FIG. 1 according to an embodiment of the invention.
- the wireless device 101 comprises an RF circuit 205 , a baseband circuit 210 , a controlling circuit 215 , and a memory 220 .
- the controlling circuit 215 such as a controller comprising a microcontroller (MCU) 2151 and a digital signal processing circuit (DSP) 2152 .
- a receiver circuit of the wireless device 101 may comprise RF circuit 205 or a combination of RF circuit 205 and baseband circuit 210 .
- the memory 220 is divided and allocated to multiple buffers such as an audio packet buffer, a decoder buffer, and an audio codec buffer (not shown in FIG. 2 ).
- the audio packet buffer may be embedded within the MCU 2151
- the decoder buffer and audio codec buffer may be embedded in the DSP 2152 .
- this is not meant to be a limitation.
- the RF circuit 205 is an RF transceiver used for receiving a radio signal corresponding to a data packet stream from an antenna (not illustrated) of wireless device 101 to generate a digital signal comprising packets.
- the baseband circuit 210 is coupled to the RF circuit 205 and used for receiving and processing the digital packets in digital domain and then providing the processed digital packets for the controller 215 .
- a Bluetooth packet comprises a header and content information.
- the header may comprise higher layer header information and lower layer header information.
- the baseband circuit 210 may be used to parse the header (e.g. the lower layer header information) of the Bluetooth packet to determine whether such Bluetooth packet is an SCO/eSCO packet or an ACL packet.
- an SCO/eSCO packet is associated with a real-time narrow band signal which does not require retransmission.
- an SCO/eSCO packet comprises voice data in Bluetooth.
- the narrow band audio may be referred to as Bluetooth voice type.
- An ACL packet is associated with all other Bluetooth data transfer including High quality audio/video data.
- An example of an ACL packet is music playback through A2DP, and this is high bandwidth data.
- the Bluetooth packet is parsed or determined as an SCO/eSCO packet
- the SCO/eSCO type Bluetooth packet is transmitted by the baseband circuit 210 to the decoder buffer.
- the ACL type Bluetooth packet is transmitted by the baseband circuit 210 to a data packet buffer of MCU 2151 .
- the MCU 2151 is used to parse the header (e.g. the higher layer header information) of the ACL type Bluetooth packet. If the ACL type Bluetooth packet is determined as an A2DP type Bluetooth packet, the A2DP type Bluetooth packet is transmitted from the data packet buffer to the audio packet buffer.
- the header e.g. the higher layer header information
- the operation of parsing the header of a Bluetooth packet to determine whether such packet is a SCO/eSCO packet may be installed within the MCU 2151 of controller 215 . That is, in one embodiment, the above-mentioned parsing operation is included by the controller 215 and excluded from the baseband circuit 210 . However, this is not meant to be a limitation.
- FIG. 3 is a block diagram of the operation of the controller 215 for processing Bluetooth packet(s) to generate audio PCM (pulse code modulation) samples for an audio codec according to an embodiment of the invention.
- an SCO/eSCO packet indicated by block 301 is transmitted from the baseband circuit 210 , and then the SCO/eSCO packet is transmitted to the decoder buffer 310 .
- DSP 2152 is arranged to process or parse/decode the content of the SCO/eSCO packet frames by frames to generate PCM samples and store the PCM samples into the audio codec buffer 315 for the audio codec for audio playing.
- an A2DP packet is transmitted from the MCU 2151 to store the A2DP packet into the audio packet buffer 305 , and then the A2DP packet is transmitted from MCU 2151 to DSP 2152 to store the A2DP packet into the decoder buffer 310 .
- DSP 2152 is arranged to process or parse/decode the content of the A2DP packet frames by frames to generate PCM samples and store the PCM samples into the audio codec buffer 315 for the audio codec for audio playing.
- FIG. 4 is a block diagram illustrating audio play synchronization operation and functions of the wireless device 101 in FIG. 1 according to an embodiment of the invention.
- the wireless device 101 in the system 100 supports functions and operations of a clock trimming method/process and a buffer monitoring method/process.
- the clock trimming process 410 is arranged to perform a clock trimming/tuning operation upon a clock frequency generated from an oscillator 405 of the wireless device 101 based on clock trim data indicated by the block 415 to generate a system clock signal.
- the buffer monitoring process 425 is arranged to receive its native clock signal, generated from a clock generator 420 based on the system clock signal, to generate and tune an audio clock signal for audio playing based on buffer monitor data indicated by the block 430 and the system clock signal; the audio clock signal is used for playing audio PCM samples.
- the clock trimming process 410 can be employed by the secondary headset D 3 to track a clock signal of primary headset D 2
- the buffer monitoring process 425 can be employed by the primary headset D 2 to track audio signals/packets from the audio source D 1 .
- the primary headset D 2 or secondary headset D 3 can execute the clock trimming process 410 and/or the buffer monitoring process 425 .
- the operation of clock trimming process 410 and operation of buffer monitoring process 425 can be separated and to be executed individually.
- the operation of buffer monitoring process 425 can be executed without the clock trimming process 410 .
- the system clock signal as shown in FIG. 4 is generated from the clock frequency of oscillator 405 without frequency tuning of clock trimming process 410 .
- the audio clock signal can be generated from the system clock signal without tuning of the buffer monitoring process 425 .
- a wireless device 101 if used as a slave device of a piconet, e.g. the secondary headset D 3 , can track a corresponding master device's native clock in such piconet and avoid a long-term accumulated packet arrival timing offset between the secondary headset D 3 and such corresponding master device (e.g. primary headset D 2 ) due to the variation between the native clocks.
- the wireless device 101 for example is used as the secondary headset D 3 (but not limited), and MCU 2151 is used to tune a clock frequency generated from an oscillator (i.e. the clock frequency of oscillator 405 in FIG. 4 ) of RF circuit 205 of the wireless device 101 according to at least one of a frequency offset generated from the RF circuit 205 and a reception time offset of RF circuit 205 .
- the clock trim data 415 of FIG. 4 comprises at least one of the frequency offset and the reception time offset.
- the RF circuit 205 is arranged to be turned on earlier to receive the analog RF signal transmitted from the primary headset D 2 that is used as a master device in the piconet P 2 .
- the secondary headset D 3 can negotiate with the primary headset D 2 to know an ideal reception timing that is ready for receiving the analog RF signal.
- the actual reception timing starting to receive the analog RF signal may be different and may be earlier than or later than the ideal reception timing. Accordingly, the RF circuit 205 is arranged to be turned on earlier to receive the analog RF signal.
- MCU 2151 is used to read the actual reception timing and the specified/ideal reception timing from the RF circuit 205 and to generate a frequency offset by comparing the actual reception timing of the RF circuit 205 of the wireless device 101 with the specified reception timing specified by or transmitted from the master device such as primary headset D 2 . Then MCU 2151 is arranged to tune the clock frequency generated from the oscillator 405 based on the generated frequency offset so as to synchronize the native clock of secondary headset D 3 with that of primary headset D 2 .
- the MCU 2151 of the slave device is used to obtain or receive the frequency count number from the clock frequency of the oscillator in the slave device (i.e. the native clock of secondary headset D 3 ) and a specified frequency count number of the master device (i.e. the native clock of the primary headset D 2 ). Then MCU 2151 is arranged to generate a frequency offset by comparing the two frequency count numbers and to tune the clock frequency generated from the oscillator of the slave device based on the generated frequency offset so as to synchronize the native clock of the secondary headset D 3 with that of the primary headset D 2 .
- the secondary headset D 3 since the secondary headset D 3 synchronizes with the primary headset D 2 , therefore it is not necessary for secondary headset D 3 to use the buffer monitoring process to adjust its audio clock based on the received audio packet from the audio source D 1 .
- this is not intended to be a limitation.
- the reception time offset may mean a long-term total/average packet arrival time offset between the specified/ideal packet reception timing and the actual packet reception timing. That is, the MCU 2151 can be arranged to calculate a long-term accumulated/average time offset to adjust or tune its native clock.
- An advantage of the above-mentioned clock trimming process is to avoid a circumstance that audio data are played in different speed between two headsets.
- the Bluetooth clock of the secondary headset D 3 is zero ppm (parts per million) which means no offsets and the audio data such as music is played at 48 KHz (about 20.8 ⁇ s (microseconds) per sample).
- the native clock of the secondary headset D 3 may be faster than the primary headset D 2 and for example may always increase 2 ppm frequency offset each time.
- the secondary headset D 3 may play the music 2 ⁇ s ahead corresponding to the music played by the primary headset D 2 .
- the secondary headset D 3 may play the music 22 ⁇ s ahead corresponding to the music played by the primary headset D 2 .
- the secondary headset D 3 plays the audio data too fast and is consuming one extra audio sample about every 10.42 seconds.
- MCU 2151 of the secondary headset D 3 can employ the clock trimming process to trim or tune the generated native clock based on the frequency offset in the beginning to rapidly adjust the generated native clock to be synchronized with the native clock of the primary headset D 2 , i.e. the Bluetooth clock employed by the secondary headset D 3 .
- the MCU 2151 identifies the frequency offset between the received packet from the primary headset D 2 and its native clock and then trims its native clock based on the identified frequency offset.
- the MCU 2151 can gradually trim the generated native clock in several time slots to avoid too much frequency drop. For example, if the MCU 2151 determines to speed up the generated native clock 5 ppm, then MCU 2151 may speed up the clock 1 ppm in the next time slot and speed up the clock 2 ppm in a time slot after the next time slot, . . . , and so on. The MCU 2151 can trim the generated native clock so as to make the frequency offset/difference be less than 1 ppm.
- MCU 2151 of the secondary headset D 3 may employ the clock trimming process 410 to trim or tune the generated native clock based on the time reception offset (i.e. the long-term accumulated/average packet arrival time offset) to precisely adjust the native clock of secondary headset D 3 to be synchronized with the native clock of the primary headset D 2 , i.e. the Bluetooth clock employed by secondary headset D 3 .
- the time reception offset i.e. the long-term accumulated/average packet arrival time offset
- the MCU 2151 of secondary headset D 3 can accumulate or average the differences between actual packet arrival times and expected/ideal packet arrival times respectively for a sequence of packets to derive the time reception offset mentioned above.
- a wireless device 101 if used as a slave device e.g. the primary headset D 2
- a wireless device 101 if used as a primary headset D 2 in FIG. 1 can employ the result from the buffer monitoring process to adjust its audio clock frequency and pass corresponding parameter(s) to a secondary headset D 3 to adjust the audio clock frequency of headset D 3 .
- the wireless device 101 for example is used as a slave device in a piconet, e.g. the primary headset D 2 of piconet P 1 .
- the primary headset D 2 is arranged to receive audio packets from audio source D 1 and can employ the buffer monitoring process to adjust its audio clock corresponding to the reception speed of audio packets from the audio source D 1 .
- the Bluetooth clock generator 420 is used to generate a Bluetooth native clock signal based on the system clock signal.
- the buffer monitoring process 425 is used to employ a sampling rate converter (SRC) to receive the system clock signal of primary headset D 2 , the Bluetooth native clock signal, and the buffer monitor data 430 to generate and tune the audio clock.
- the SRC means a circuit capable of offering high-resolution sampling rate adjustments.
- the SRC is controlled by the controller 215 which is arranged to determine the buffer monitor data based on a monitored status of at least one buffer such as the audio packet buffer, decoder buffer, and/or audio codec buffer.
- the monitored status may be a monitored data amount of a buffer.
- the controller 215 is used to monitor the data amount of at least one buffer of the memory 220 to correspondingly tune/trim an audio clock frequency (i.e. the audio code clock) for playing audio samples. If too much data is buffered in a buffer, the wireless device 101 as primary headset D 2 is arranged to increase the audio play speed to offload and avoid buffer overflow.
- an audio clock frequency i.e. the audio code clock
- the DSP 2152 of controller 215 is arranged to read the audio codec buffer 315 to play audio and the DSP 2152 is used to move data from the decoder buffer 310 to the audio codec buffer 315 when the level of the data amount stored in the audio codec buffer 315 is lower than a first threshold.
- the DSP 2152 is used to retrieve data from the audio packet buffer 305 to the decoder buffer 310 when the level of data amount stored in the decoder buffer 310 is lower than a second threshold.
- the wireless device 101 as the primary headset D 2 is used to receive A2DP packets and store these packets into the audio packet buffer 305 .
- the MCU 2151 or DSP 2152 is used to monitor the audio packet buffer 305 to see if the audio packet buffer 305 has too much or too little audio data. If the audio packet buffer 305 stores too much data, a corresponding buffer monitor data is generated by the MCU 2151 or DSP 2152 and is sent to the SRC to slightly increase the audio clock frequency. If the audio packet buffer 305 stores too little data, a corresponding buffer monitor data is generated by the MCU 2151 or DSP 2152 and is sent to the SRC to slightly decrease the audio clock frequency.
- the audio packet buffer 305 in the memory 220 is used to buffer or temporarily store sequentially received audio packet(s) such as A2DP packets having information/content of music type data.
- the controller 215 employs the MCU 2151 to periodically or real-timely monitor the data amount of the audio packet buffer 305 in a first time period/interval, calculate a first average value of a first data amount in the first time period, monitor the data amount of the audio packet buffer to calculate a second average value of a second data amount level in a second time period later than or following the first time period, and tune the audio clock frequency by comparing the first average value with the second average value to determine whether the monitored data amount deviates from a particular data amount.
- MCU 2151 is used for deriving a difference value between the first average value and the second average value, increasing the audio clock frequency if the difference value indicates that an absolute value of the difference value is higher than a threshold value as well as the second average value is higher than the first average value, and decreasing the audio clock frequency if the difference value indicates that the absolute value of the difference value is higher than the threshold value as well as the second average value is lower than the first average value. That is, the above first average value is used as a reference data amount, and when the second average value corresponding to later monitored data amount significant varies from the first average value, the MCU 2151 determines that the monitored data amount of audio packet buffer deviates from a reference data amount. In this situation, the MCU 2151 can tune the audio clock frequency dedicated for playing audio samples so as to control such data amount difference becomes smaller than the threshold data amount.
- the wireless device 101 as the primary headset D 2 is used to receive SCO/eSCO packets and store these packets into the decoder buffer 310 .
- DSP 2152 is used to monitor at least one of the decoder buffer 310 and audio codec buffer 315 to see if at least one buffer has too much or too little audio data. If the at least one buffer stores too much data, a corresponding buffer monitor data is generated by the DSP 2152 and is sent to the SRC to slightly increase the audio clock frequency. If the at least one buffer stores too little data, a corresponding buffer monitor data is generated by the MCU 2151 or DSP 2152 and is sent to the SRC to slightly decrease the audio clock frequency.
- the audio codec buffer 315 in the memory 220 is used to buffer or temporarily store audio PCM samples of SCO/eSCO packet(s).
- the controller 215 is arranged to use the DSP 2152 to periodically monitor the data amount of the audio codec buffer 315 or may use the MCU 2151 to monitor the data amount of the audio codec buffer 315 to determine whether the data amount of audio codec samples in the audio codec buffer 315 deviates from a normal average data amount level/value.
- DSP 2152 may decode an SCO/eSCO packet at a fixed time period such as 7.5 ms, and 128 PCM (Pulse Code Modulation) samples are generated. Equivalently the audio clock frequency for playing the samples is equal to 16 KHz. Accordingly, the data amount of audio samples of audio codec buffer 315 ideally is kept at a normal data amount level. If the difference between the real-time monitored data amount and the normal data amount level becomes larger than a threshold data amount, then DSP 2152 is arranged to determine that the audio clock frequency has a frequency offset and is arranged to tune/control the audio clock frequency at a neighborhood of a target frequency.
- PCM Pulse Code Modulation
- the real-time monitored data amount may vary between 127 samples and 129 samples; that is, the average number of samples is 128.
- the DSP 2152 determines that the audio clock frequency has no frequency offsets. If the real-time monitored data amount significantly varies between 126 samples and 130 samples, then the DSP 2152 determines that the audio clock frequency has a frequency offset and correspondingly increases/decreases the audio clock frequency to control the tuned audio clock frequency at a target audio clock frequency as far as possible.
- the DSP 2152 is arranged to gradually adjust the audio clock frequency.
- the maximum capacity of the audio codec buffer 315 can be designed as two times of 128 samples, i.e. 256 samples. This is also not meant to be a limitation.
- the primary headset D 2 sends initial information (packet number, anchor, and/or SRC) to the secondary headset D 3 , and both the headsets D 2 and D 3 enable the their audio codecs at the same timing to keep the initial audio timing between the left and right ears aligned.
- the primary headset D 2 keeps monitoring the status of the at least one buffer to get tracking information and then passes to information to the secondary headset D 3 , and both headsets D 2 and D 3 apply the new setting at anchor point based on the native clock of the primary headset D 2 .
- the controller 215 is arranged to control the wireless device 101 to send audio clock trimming information from the wireless device 101 to the secondary headset D 3 to control both of the wireless device 101 and the secondary headset D 3 to adjust corresponding audio clock frequencies to the target audio clock frequency.
- both audio clock frequencies of the primary and secondary headsets D 2 and D 3 are simultaneously increased or decreased with the same adjustment amount, and the audio playing for the two devices is synchronized.
- the secondary headset D 3 may be needed to keep the secondary headset D 3 in a near perfect timing which is synchronized with the primary headset D 2 . It is proposed that the secondary headset D 3 at first uses the clock trimming method to keep its native clock to be synchronized with the native clock of the primary headset D 2 .
Abstract
Description
- This application claims priority of U.S. provisional application Ser. No. 62/719,702 filed on Aug. 19, 2018, which is entirely incorporated herein by reference.
- The invention relates to clock synchronization between wireless devices, and more particularly to native and/or audio clock synchronization between Bluetooth wireless devices. 2. Description of the Prior Art
- Generally speaking, for the slot-based Bluetooth wireless communication, a slave device such as a primary headset is arranged to receive a packet from a master device such as an audio source. However, the actual packet arrival timing for the slave device may be usually different from the ideal packet arrival timing. In addition, a frequency offset between native clocks of master and slave devices may occur. Further, the audio codec clocks for playing audio samples employed by the master and slave devices may be different. All of these result in a low or poor audio quality due to asynchronous Bluetooth clocks and asynchronous audio codec clocks for multiple Bluetooth wireless devices.
- Therefore one of the objectives of the invention is to provide a method utilized in a wireless device used to wirelessly receive and play audio information, a method utilized in a wireless device to be used as a slave device to be wirelessly connected to a master device in a piconet, and corresponding wireless devices, to solve the above-mentioned problems.
- According to embodiments of the invention, a method utilized in a wireless device used to wirelessly receive and play audio information is disclosed. The method comprises: receiving a data packet stream transmitted from an audio source; monitoring a data amount of at least one buffer of a memory of the wireless device; and tuning an audio clock frequency dedicated for playing audio samples if the data amount of the at least one buffer deviates from a specific data amount level.
- According to the embodiments, a method utilized in a wireless device to be used as a slave device to be wirelessly connected to a master device in a piconet is disclosed. The method comprises: using a receiver circuit of the wireless device to receive a data packet stream transmitted from an audio source; and tuning a clock frequency generated from an oscillator of the wireless device according to at least one of a frequency offset generated from the receiver circuit of the wireless device and a reception time offset of the receiver circuit of the wireless device.
- According to the embodiments, a Bluetooth wireless device used to wirelessly receive and play audio information is disclosed. The Bluetooth wireless device is to be used as a slave device to be wirelessly connected to a master device in a piconet, and the Bluetooth wireless device comprises a receiver circuit and a controlling circuit. The receiver circuit is used for receiving a data packet stream transmitted from an audio source. The controlling circuit is coupled to the receiver circuit and is used for monitoring a data amount of at least one buffer of a memory of the Bluetooth wireless device and tuning an audio clock frequency dedicated for playing audio samples if the data amount of the at least one buffer deviates from a specific data amount level.
- According to the embodiments, a Bluetooth wireless device used as a slave device to be wirelessly connected to a master device in a piconet is disclosed. The Bluetooth wireless device comprises a receiver circuit and a controlling circuit. The receiver circuit is used for receiving a data packet stream transmitted from an audio source. The controlling circuit is coupled to the receiver circuit and is used for tuning a clock frequency generated from an oscillator of the Bluetooth wireless device according to at least one of a frequency offset generated from the receiver circuit of the Bluetooth wireless device and a reception time offset of the receiver circuit of the Bluetooth wireless device.
- These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
-
FIG. 1 is an overview block diagram of a wireless communication system such as a Bluetooth communication network according to an embodiment of the invention. -
FIG. 2 is a block diagram of an example of a wireless device ofFIG. 1 according to an embodiment of the invention. -
FIG. 3 is a block diagram of the operation of the controller for processing Bluetooth packet (s) to generate audio PCM (pulse code modulation) samples for an audio codec according to an embodiment of the invention. -
FIG. 4 is a diagram of block diagram illustrating audio play synchronization operation and functions of the wireless device inFIG. 1 according to an embodiment of the invention. -
FIG. 1 is an overview block diagram of awireless communication system 100 such as a Bluetooth communication network (but not limited) according to an embodiment of the invention. Thesystem 100 comprises an audio source D1 such as a mobile/wearable electronic device (e.g. a smart phone), awireless device 101 used as a primary headset D2, and anotherwireless device 101 used as a secondary headset D3. The headsets D2 and D3 are for example earphones. Thewireless device 101 is used to wirelessly receive and play audio information which is generated from the audio source D1. - The audio source D1 and the primary headset D2 are in the same piconet P1 in which the audio source D1 is a master device while the primary headset D2 is a slave device. The primary headset D2 is used to receive Bluetooth packet stream for example comprising Bluetooth audio packets generated from the audio source D1 through the piconet P1.
- The primary headset D2 and the secondary headset D3 are in the same piconet P2 in which the primary headset D2 is a master device while the secondary headset D3 is a slave device. In addition, the number of secondary headsets in other embodiments may be two or more; this is not meant to be a limitation.
- The secondary headset D3 can receive the audio packets via a variety ways. For example, the secondary headset D3 may join the piconet P1 to receive the audio packets directly from the audio source D1. Alternatively, the secondary headset D3 may receive the audio packets relayed by the primary headset D2 through the piconet P2. Alternatively, the secondary headset D3 may snoop the audio packets transmitted from the audio source D1 in the piconet P1. For instance, the primary headset D2 and secondary headset D3 are arranged to establish communications in the piconet P2, and the primary headset D2 can provide communication parameters for the secondary headset D3 so that the secondary headset D3 can snoop the piconet P1 or can receive the audio packets relayed by the primary headset D2 from the audio source D1.
- Each Bluetooth
wireless device 101 has its native clock generated from its oscillator as its local clock. For clock synchronization of each piconet, a master device of thewireless devices 101 is arranged to use its native clock as the Bluetooth clock in one piconet, and slave device of thewireless devices 101 is arranged to use the master device's native clock as its Bluetooth clock in the same piconet. Each of the slave devices is arranged to synchronize its native clock to a master wireless device's native clock, i.e. the Bluetooth clock of the piconet. - In addition, for time slot synchronization, the Bluetooth clock employed by a slave device is kept in synchronization with a master device's native Bluetooth clock by adding a clock offset into the native clock of the slave device wherein the clock offset is updated each time or periodically when a Bluetooth packet is received from the master device. That is, the slave device's Bluetooth clock is equal to the master device's native Bluetooth clock plus the clock offset.
-
FIG. 2 is a block diagram of an example of awireless device 101 ofFIG. 1 according to an embodiment of the invention. Thewireless device 101 comprises anRF circuit 205, abaseband circuit 210, a controllingcircuit 215, and amemory 220. The controllingcircuit 215 such as a controller comprising a microcontroller (MCU) 2151 and a digital signal processing circuit (DSP) 2152. A receiver circuit of thewireless device 101 may compriseRF circuit 205 or a combination ofRF circuit 205 andbaseband circuit 210. - The
memory 220 is divided and allocated to multiple buffers such as an audio packet buffer, a decoder buffer, and an audio codec buffer (not shown inFIG. 2 ). For implementation, in practice, the audio packet buffer may be embedded within theMCU 2151, and the decoder buffer and audio codec buffer may be embedded in the DSP 2152. However, this is not meant to be a limitation. - The
RF circuit 205 is an RF transceiver used for receiving a radio signal corresponding to a data packet stream from an antenna (not illustrated) ofwireless device 101 to generate a digital signal comprising packets. - The
baseband circuit 210 is coupled to theRF circuit 205 and used for receiving and processing the digital packets in digital domain and then providing the processed digital packets for thecontroller 215. - A Bluetooth packet comprises a header and content information. The header may comprise higher layer header information and lower layer header information. For example, the
baseband circuit 210 may be used to parse the header (e.g. the lower layer header information) of the Bluetooth packet to determine whether such Bluetooth packet is an SCO/eSCO packet or an ACL packet. For example, an SCO/eSCO packet is associated with a real-time narrow band signal which does not require retransmission. In this example, an SCO/eSCO packet comprises voice data in Bluetooth. The narrow band audio may be referred to as Bluetooth voice type. An ACL packet is associated with all other Bluetooth data transfer including High quality audio/video data. An example of an ACL packet is music playback through A2DP, and this is high bandwidth data. - If the Bluetooth packet is parsed or determined as an SCO/eSCO packet, the SCO/eSCO type Bluetooth packet is transmitted by the
baseband circuit 210 to the decoder buffer. If the Bluetooth packet is parsed or determined as an ACL packet, the ACL type Bluetooth packet is transmitted by thebaseband circuit 210 to a data packet buffer ofMCU 2151. -
MCU 2151 is used to parse the header (e.g. the higher layer header information) of the ACL type Bluetooth packet. If the ACL type Bluetooth packet is determined as an A2DP type Bluetooth packet, the A2DP type Bluetooth packet is transmitted from the data packet buffer to the audio packet buffer. - Further, it should be noted that the operation of parsing the header of a Bluetooth packet to determine whether such packet is a SCO/eSCO packet may be installed within the
MCU 2151 ofcontroller 215. That is, in one embodiment, the above-mentioned parsing operation is included by thecontroller 215 and excluded from thebaseband circuit 210. However, this is not meant to be a limitation. -
FIG. 3 is a block diagram of the operation of thecontroller 215 for processing Bluetooth packet(s) to generate audio PCM (pulse code modulation) samples for an audio codec according to an embodiment of the invention. As shown inFIG. 3 , an SCO/eSCO packet indicated byblock 301 is transmitted from thebaseband circuit 210, and then the SCO/eSCO packet is transmitted to thedecoder buffer 310.DSP 2152 is arranged to process or parse/decode the content of the SCO/eSCO packet frames by frames to generate PCM samples and store the PCM samples into theaudio codec buffer 315 for the audio codec for audio playing. - Alternatively, an A2DP packet is transmitted from the
MCU 2151 to store the A2DP packet into theaudio packet buffer 305, and then the A2DP packet is transmitted fromMCU 2151 toDSP 2152 to store the A2DP packet into thedecoder buffer 310. In this example,DSP 2152 is arranged to process or parse/decode the content of the A2DP packet frames by frames to generate PCM samples and store the PCM samples into theaudio codec buffer 315 for the audio codec for audio playing. -
FIG. 4 is a block diagram illustrating audio play synchronization operation and functions of thewireless device 101 inFIG. 1 according to an embodiment of the invention. Thewireless device 101 in thesystem 100 supports functions and operations of a clock trimming method/process and a buffer monitoring method/process. Theclock trimming process 410 is arranged to perform a clock trimming/tuning operation upon a clock frequency generated from anoscillator 405 of thewireless device 101 based on clock trim data indicated by theblock 415 to generate a system clock signal. Thebuffer monitoring process 425 is arranged to receive its native clock signal, generated from aclock generator 420 based on the system clock signal, to generate and tune an audio clock signal for audio playing based on buffer monitor data indicated by theblock 430 and the system clock signal; the audio clock signal is used for playing audio PCM samples. - It should be noted that the
clock trimming process 410 can be employed by the secondary headset D3 to track a clock signal of primary headset D2, and thebuffer monitoring process 425 can be employed by the primary headset D2 to track audio signals/packets from the audio source D1. However, this is not intended to be a limitation of the invention. In addition, the primary headset D2 or secondary headset D3 can execute theclock trimming process 410 and/or thebuffer monitoring process 425. The operation ofclock trimming process 410 and operation ofbuffer monitoring process 425 can be separated and to be executed individually. The operation ofbuffer monitoring process 425 can be executed without theclock trimming process 410. For example, in one embodiment, the system clock signal as shown inFIG. 4 is generated from the clock frequency ofoscillator 405 without frequency tuning ofclock trimming process 410. Alternatively, in one embodiment, the audio clock signal can be generated from the system clock signal without tuning of thebuffer monitoring process 425. - Based on the
clock trimming process 410, awireless device 101 if used as a slave device of a piconet, e.g. the secondary headset D3, can track a corresponding master device's native clock in such piconet and avoid a long-term accumulated packet arrival timing offset between the secondary headset D3 and such corresponding master device (e.g. primary headset D2) due to the variation between the native clocks. - In practice, for an embodiment of the
clock trimming process 410, thewireless device 101 for example is used as the secondary headset D3 (but not limited), andMCU 2151 is used to tune a clock frequency generated from an oscillator (i.e. the clock frequency ofoscillator 405 inFIG. 4 ) ofRF circuit 205 of thewireless device 101 according to at least one of a frequency offset generated from theRF circuit 205 and a reception time offset ofRF circuit 205. The clock trimdata 415 ofFIG. 4 comprises at least one of the frequency offset and the reception time offset. - For generating the reception time offset, the
RF circuit 205 is arranged to be turned on earlier to receive the analog RF signal transmitted from the primary headset D2 that is used as a master device in the piconet P2. For example, the secondary headset D3 can negotiate with the primary headset D2 to know an ideal reception timing that is ready for receiving the analog RF signal. However, the actual reception timing starting to receive the analog RF signal may be different and may be earlier than or later than the ideal reception timing. Accordingly, theRF circuit 205 is arranged to be turned on earlier to receive the analog RF signal. -
MCU 2151 is used to read the actual reception timing and the specified/ideal reception timing from theRF circuit 205 and to generate a frequency offset by comparing the actual reception timing of theRF circuit 205 of thewireless device 101 with the specified reception timing specified by or transmitted from the master device such as primary headset D2. ThenMCU 2151 is arranged to tune the clock frequency generated from theoscillator 405 based on the generated frequency offset so as to synchronize the native clock of secondary headset D3 with that of primary headset D2. - Additionally, for generating the frequency offset, the
MCU 2151 of the slave device is used to obtain or receive the frequency count number from the clock frequency of the oscillator in the slave device (i.e. the native clock of secondary headset D3) and a specified frequency count number of the master device (i.e. the native clock of the primary headset D2). ThenMCU 2151 is arranged to generate a frequency offset by comparing the two frequency count numbers and to tune the clock frequency generated from the oscillator of the slave device based on the generated frequency offset so as to synchronize the native clock of the secondary headset D3 with that of the primary headset D2. - This provides or ensures a better user experience in a true wireless stereo produce device.
- In addition, in some examples, since the secondary headset D3 synchronizes with the primary headset D2, therefore it is not necessary for secondary headset D3 to use the buffer monitoring process to adjust its audio clock based on the received audio packet from the audio source D1. However, this is not intended to be a limitation.
- Further, it should be noted that the reception time offset may mean a long-term total/average packet arrival time offset between the specified/ideal packet reception timing and the actual packet reception timing. That is, the
MCU 2151 can be arranged to calculate a long-term accumulated/average time offset to adjust or tune its native clock. - An advantage of the above-mentioned clock trimming process is to avoid a circumstance that audio data are played in different speed between two headsets.
- For example, in an audio play scenario, it is assumed that the Bluetooth clock of the secondary headset D3 is zero ppm (parts per million) which means no offsets and the audio data such as music is played at 48 KHz (about 20.8 μs (microseconds) per sample). The native clock of the secondary headset D3 may be faster than the primary headset D2 and for example may always increase 2 ppm frequency offset each time. Thus, after one second, the secondary headset D3 may play the music 2 μs ahead corresponding to the music played by the primary headset D2. After 11 seconds, the secondary headset D3 may play the music 22 μs ahead corresponding to the music played by the primary headset D2. The secondary headset D3 plays the audio data too fast and is consuming one extra audio sample about every 10.42 seconds.
- To solve this problem,
MCU 2151 of the secondary headset D3 can employ the clock trimming process to trim or tune the generated native clock based on the frequency offset in the beginning to rapidly adjust the generated native clock to be synchronized with the native clock of the primary headset D2, i.e. the Bluetooth clock employed by the secondary headset D3. At first, theMCU 2151 identifies the frequency offset between the received packet from the primary headset D2 and its native clock and then trims its native clock based on the identified frequency offset. - In one embodiment, the
MCU 2151 can gradually trim the generated native clock in several time slots to avoid too much frequency drop. For example, if theMCU 2151 determines to speed up the generated native clock 5 ppm, thenMCU 2151 may speed up the clock 1 ppm in the next time slot and speed up the clock 2 ppm in a time slot after the next time slot, . . . , and so on. TheMCU 2151 can trim the generated native clock so as to make the frequency offset/difference be less than 1 ppm. - Then
MCU 2151 of the secondary headset D3 may employ theclock trimming process 410 to trim or tune the generated native clock based on the time reception offset (i.e. the long-term accumulated/average packet arrival time offset) to precisely adjust the native clock of secondary headset D3 to be synchronized with the native clock of the primary headset D2, i.e. the Bluetooth clock employed by secondary headset D3. - For example, the
MCU 2151 of secondary headset D3 can accumulate or average the differences between actual packet arrival times and expected/ideal packet arrival times respectively for a sequence of packets to derive the time reception offset mentioned above. - Further, based on the buffer monitoring process, a
wireless device 101 if used as a slave device, e.g. the primary headset D2, can employ thebuffer monitoring process 425 to monitor if the audio data is played too fast or too slow compared to the received audio packets sent from a master device such as audio source D1 so as to appropriately tune an audio clock frequency of the primary headset D2. In addition, awireless device 101 if used as a primary headset D2 inFIG. 1 can employ the result from the buffer monitoring process to adjust its audio clock frequency and pass corresponding parameter(s) to a secondary headset D3 to adjust the audio clock frequency of headset D3. - In practice, for an embodiment of the buffer monitoring process, the
wireless device 101 for example is used as a slave device in a piconet, e.g. the primary headset D2 of piconet P1. The primary headset D2 is arranged to receive audio packets from audio source D1 and can employ the buffer monitoring process to adjust its audio clock corresponding to the reception speed of audio packets from the audio source D1. - As shown in
FIG. 4 , theBluetooth clock generator 420 is used to generate a Bluetooth native clock signal based on the system clock signal. Then, thebuffer monitoring process 425 is used to employ a sampling rate converter (SRC) to receive the system clock signal of primary headset D2, the Bluetooth native clock signal, and the buffer monitordata 430 to generate and tune the audio clock. The SRC means a circuit capable of offering high-resolution sampling rate adjustments. The SRC is controlled by thecontroller 215 which is arranged to determine the buffer monitor data based on a monitored status of at least one buffer such as the audio packet buffer, decoder buffer, and/or audio codec buffer. For example, the monitored status may be a monitored data amount of a buffer. - Please refer to
FIG. 2 andFIG. 3 again. In practice, thecontroller 215 is used to monitor the data amount of at least one buffer of thememory 220 to correspondingly tune/trim an audio clock frequency (i.e. the audio code clock) for playing audio samples. If too much data is buffered in a buffer, thewireless device 101 as primary headset D2 is arranged to increase the audio play speed to offload and avoid buffer overflow. - For controlling the buffer (s), the
DSP 2152 ofcontroller 215 is arranged to read theaudio codec buffer 315 to play audio and theDSP 2152 is used to move data from thedecoder buffer 310 to theaudio codec buffer 315 when the level of the data amount stored in theaudio codec buffer 315 is lower than a first threshold. TheDSP 2152 is used to retrieve data from theaudio packet buffer 305 to thedecoder buffer 310 when the level of data amount stored in thedecoder buffer 310 is lower than a second threshold. - For receiving and playing music type data, the
wireless device 101 as the primary headset D2 is used to receive A2DP packets and store these packets into theaudio packet buffer 305. TheMCU 2151 orDSP 2152 is used to monitor theaudio packet buffer 305 to see if theaudio packet buffer 305 has too much or too little audio data. If theaudio packet buffer 305 stores too much data, a corresponding buffer monitor data is generated by theMCU 2151 orDSP 2152 and is sent to the SRC to slightly increase the audio clock frequency. If theaudio packet buffer 305 stores too little data, a corresponding buffer monitor data is generated by theMCU 2151 orDSP 2152 and is sent to the SRC to slightly decrease the audio clock frequency. - As mentioned above, the
audio packet buffer 305 in thememory 220 is used to buffer or temporarily store sequentially received audio packet(s) such as A2DP packets having information/content of music type data. In one embodiment, thecontroller 215 employs theMCU 2151 to periodically or real-timely monitor the data amount of theaudio packet buffer 305 in a first time period/interval, calculate a first average value of a first data amount in the first time period, monitor the data amount of the audio packet buffer to calculate a second average value of a second data amount level in a second time period later than or following the first time period, and tune the audio clock frequency by comparing the first average value with the second average value to determine whether the monitored data amount deviates from a particular data amount. - For example,
MCU 2151 is used for deriving a difference value between the first average value and the second average value, increasing the audio clock frequency if the difference value indicates that an absolute value of the difference value is higher than a threshold value as well as the second average value is higher than the first average value, and decreasing the audio clock frequency if the difference value indicates that the absolute value of the difference value is higher than the threshold value as well as the second average value is lower than the first average value. That is, the above first average value is used as a reference data amount, and when the second average value corresponding to later monitored data amount significant varies from the first average value, theMCU 2151 determines that the monitored data amount of audio packet buffer deviates from a reference data amount. In this situation, theMCU 2151 can tune the audio clock frequency dedicated for playing audio samples so as to control such data amount difference becomes smaller than the threshold data amount. - For receiving and playing speech type data, the
wireless device 101 as the primary headset D2 is used to receive SCO/eSCO packets and store these packets into thedecoder buffer 310.DSP 2152 is used to monitor at least one of thedecoder buffer 310 andaudio codec buffer 315 to see if at least one buffer has too much or too little audio data. If the at least one buffer stores too much data, a corresponding buffer monitor data is generated by theDSP 2152 and is sent to the SRC to slightly increase the audio clock frequency. If the at least one buffer stores too little data, a corresponding buffer monitor data is generated by theMCU 2151 orDSP 2152 and is sent to the SRC to slightly decrease the audio clock frequency. - For example, the
audio codec buffer 315 in thememory 220 is used to buffer or temporarily store audio PCM samples of SCO/eSCO packet(s). Thecontroller 215 is arranged to use theDSP 2152 to periodically monitor the data amount of theaudio codec buffer 315 or may use theMCU 2151 to monitor the data amount of theaudio codec buffer 315 to determine whether the data amount of audio codec samples in theaudio codec buffer 315 deviates from a normal average data amount level/value. - In one example,
DSP 2152 may decode an SCO/eSCO packet at a fixed time period such as 7.5 ms, and 128 PCM (Pulse Code Modulation) samples are generated. Equivalently the audio clock frequency for playing the samples is equal to 16 KHz. Accordingly, the data amount of audio samples ofaudio codec buffer 315 ideally is kept at a normal data amount level. If the difference between the real-time monitored data amount and the normal data amount level becomes larger than a threshold data amount, thenDSP 2152 is arranged to determine that the audio clock frequency has a frequency offset and is arranged to tune/control the audio clock frequency at a neighborhood of a target frequency. For example, the real-time monitored data amount may vary between 127 samples and 129 samples; that is, the average number of samples is 128. In this situation, theDSP 2152 determines that the audio clock frequency has no frequency offsets. If the real-time monitored data amount significantly varies between 126 samples and 130 samples, then theDSP 2152 determines that the audio clock frequency has a frequency offset and correspondingly increases/decreases the audio clock frequency to control the tuned audio clock frequency at a target audio clock frequency as far as possible. In some examples, theDSP 2152 is arranged to gradually adjust the audio clock frequency. However, this is not meant to be a limitation. In addition, the maximum capacity of theaudio codec buffer 315 can be designed as two times of 128 samples, i.e. 256 samples. This is also not meant to be a limitation. - In addition, when audio is to be played, the primary headset D2 sends initial information (packet number, anchor, and/or SRC) to the secondary headset D3, and both the headsets D2 and D3 enable the their audio codecs at the same timing to keep the initial audio timing between the left and right ears aligned. The primary headset D2 keeps monitoring the status of the at least one buffer to get tracking information and then passes to information to the secondary headset D3, and both headsets D2 and D3 apply the new setting at anchor point based on the native clock of the primary headset D2.
- That is, before tuning the audio clock frequency, if the
wireless device 101 is used as a primary headset D2 to be wirelessly connected to the audio source D1 and can be used to be wireless connected to the secondary headset D3, then thecontroller 215 is arranged to control thewireless device 101 to send audio clock trimming information from thewireless device 101 to the secondary headset D3 to control both of thewireless device 101 and the secondary headset D3 to adjust corresponding audio clock frequencies to the target audio clock frequency. Thus, both audio clock frequencies of the primary and secondary headsets D2 and D3 are simultaneously increased or decreased with the same adjustment amount, and the audio playing for the two devices is synchronized. - For a better user audio experience, it may be needed to keep the secondary headset D3 in a near perfect timing which is synchronized with the primary headset D2 . It is proposed that the secondary headset D3 at first uses the clock trimming method to keep its native clock to be synchronized with the native clock of the primary headset D2.
- Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Claims (18)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/404,746 US20200059504A1 (en) | 2018-08-19 | 2019-05-07 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
CN201910697808.2A CN110838854B (en) | 2018-08-19 | 2019-07-30 | Bluetooth wireless device and method for using the same |
US17/234,811 US11706271B2 (en) | 2018-08-19 | 2021-04-20 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201862719702P | 2018-08-19 | 2018-08-19 | |
US16/404,746 US20200059504A1 (en) | 2018-08-19 | 2019-05-07 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/234,811 Division US11706271B2 (en) | 2018-08-19 | 2021-04-20 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
Publications (1)
Publication Number | Publication Date |
---|---|
US20200059504A1 true US20200059504A1 (en) | 2020-02-20 |
Family
ID=69523605
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/404,746 Abandoned US20200059504A1 (en) | 2018-08-19 | 2019-05-07 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
US17/234,811 Active US11706271B2 (en) | 2018-08-19 | 2021-04-20 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/234,811 Active US11706271B2 (en) | 2018-08-19 | 2021-04-20 | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices |
Country Status (2)
Country | Link |
---|---|
US (2) | US20200059504A1 (en) |
CN (1) | CN110838854B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10771200B2 (en) * | 2018-12-21 | 2020-09-08 | Intel Corporation | Method to decrease bluetooth power consumption for periodic traffic profiles |
US10887051B2 (en) * | 2019-01-03 | 2021-01-05 | Qualcomm Incorporated | Real time MIC recovery |
CN112601109A (en) * | 2020-11-30 | 2021-04-02 | 海信视像科技股份有限公司 | Audio playing method and display device |
CN112887773A (en) * | 2021-01-22 | 2021-06-01 | 昆腾微电子股份有限公司 | Synchronization method and device of audio equipment |
US11115885B2 (en) * | 2019-04-19 | 2021-09-07 | Qualcomm Incorporated | Audio synchronization during handover |
US20220141568A1 (en) * | 2020-11-05 | 2022-05-05 | Shenzhen GOODIX Technology Co., Ltd. | Method, apparatus and device for synchronously playing audio |
US20220353330A1 (en) * | 2021-04-30 | 2022-11-03 | Samsung Electronics Co., Ltd. | Electronic device and method for recording audio data acquired from multiple devices |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111918261B (en) * | 2020-08-13 | 2023-07-07 | 南京中感微电子有限公司 | Bluetooth audio equipment synchronous playing method and system and Bluetooth audio master and slave equipment |
CN114205065A (en) * | 2020-09-02 | 2022-03-18 | 深圳市朗强科技有限公司 | Clock frequency synchronization method, device, equipment and computer storage medium |
CN112188344B (en) * | 2020-09-30 | 2023-01-13 | 广州安凯微电子股份有限公司 | TWS earphone and control method thereof |
CN112333610B (en) * | 2020-11-06 | 2022-06-10 | 炬芯科技股份有限公司 | Audio playing method and device of Bluetooth TWS equipment |
CN112787742B (en) * | 2021-03-16 | 2022-11-22 | 芯原微电子(成都)有限公司 | Clock synchronization method and device, wireless earphone and readable storage medium |
CN113365129B (en) * | 2021-08-09 | 2022-04-26 | 北京百瑞互联技术有限公司 | Bluetooth audio data processing method, transmitter, receiver and transceiving equipment |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1204276A3 (en) * | 2000-10-10 | 2007-01-03 | Matsushita Electric Industrial Co., Ltd. | Apparatus for processing a digital Audio Video signal |
JP4030792B2 (en) * | 2002-04-26 | 2008-01-09 | 株式会社ルネサステクノロジ | Wireless communication apparatus and microcomputer |
JP4452136B2 (en) * | 2004-03-30 | 2010-04-21 | 株式会社日立製作所 | Data synchronized playback device and terminal device |
JP2006101119A (en) * | 2004-09-29 | 2006-04-13 | Mitsubishi Materials Corp | Data communication system, and device and method for data reproduction |
CN1855887A (en) * | 2005-04-29 | 2006-11-01 | 华硕电脑股份有限公司 | Method and apparatus for polling transmission status in a wireless communication system |
US8041066B2 (en) | 2007-01-03 | 2011-10-18 | Starkey Laboratories, Inc. | Wireless system for hearing communication devices providing wireless stereo reception modes |
US7925214B2 (en) | 2005-12-16 | 2011-04-12 | Sony Ericsson Mobile Communications Ab | Distributed bluetooth system |
US8155335B2 (en) * | 2007-03-14 | 2012-04-10 | Phillip Rutschman | Headset having wirelessly linked earpieces |
KR101680408B1 (en) * | 2009-09-10 | 2016-12-12 | 코스 코퍼레이션 | Synchronizing wireless earphones |
US8768252B2 (en) | 2010-09-02 | 2014-07-01 | Apple Inc. | Un-tethered wireless audio system |
CN107333339B (en) * | 2017-05-16 | 2020-09-01 | 恒玄科技(上海)股份有限公司 | Audio data transmission method between double wireless earphones and double wireless earphones |
CN107632838B (en) * | 2017-10-09 | 2021-05-07 | 郑州云海信息技术有限公司 | System building device and method, computer device and readable storage medium |
US10244307B1 (en) * | 2018-02-09 | 2019-03-26 | Bestechnic (Shanghai) Co., Ltd. | Communication of wireless headphones |
US10534573B2 (en) | 2018-05-29 | 2020-01-14 | Sonova Ag | Method for apparatus for sample rate conversion with unknown input and output clocks |
CN108337595B (en) * | 2018-06-19 | 2018-09-11 | 恒玄科技(上海)有限公司 | Bluetooth headset realizes the method being precisely played simultaneously |
CN108415685B (en) * | 2018-07-12 | 2018-12-14 | 恒玄科技(上海)有限公司 | Wireless Bluetooth headsets realize the method being precisely played simultaneously |
-
2019
- 2019-05-07 US US16/404,746 patent/US20200059504A1/en not_active Abandoned
- 2019-07-30 CN CN201910697808.2A patent/CN110838854B/en active Active
-
2021
- 2021-04-20 US US17/234,811 patent/US11706271B2/en active Active
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10771200B2 (en) * | 2018-12-21 | 2020-09-08 | Intel Corporation | Method to decrease bluetooth power consumption for periodic traffic profiles |
US10887051B2 (en) * | 2019-01-03 | 2021-01-05 | Qualcomm Incorporated | Real time MIC recovery |
US11115885B2 (en) * | 2019-04-19 | 2021-09-07 | Qualcomm Incorporated | Audio synchronization during handover |
US20220141568A1 (en) * | 2020-11-05 | 2022-05-05 | Shenzhen GOODIX Technology Co., Ltd. | Method, apparatus and device for synchronously playing audio |
US11632617B2 (en) * | 2020-11-05 | 2023-04-18 | Shenzhen GOODIX Technology Co., Ltd. | Method, apparatus and device for synchronously playing audio |
CN112601109A (en) * | 2020-11-30 | 2021-04-02 | 海信视像科技股份有限公司 | Audio playing method and display device |
CN112887773A (en) * | 2021-01-22 | 2021-06-01 | 昆腾微电子股份有限公司 | Synchronization method and device of audio equipment |
US20220353330A1 (en) * | 2021-04-30 | 2022-11-03 | Samsung Electronics Co., Ltd. | Electronic device and method for recording audio data acquired from multiple devices |
Also Published As
Publication number | Publication date |
---|---|
US20210243242A1 (en) | 2021-08-05 |
CN110838854B (en) | 2021-09-03 |
CN110838854A (en) | 2020-02-25 |
US11706271B2 (en) | 2023-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11706271B2 (en) | Schemes capable of synchronizing native clocks and audio codec clocks of audio playing for bluetooth wireless devices | |
US11375312B2 (en) | Method, device, loudspeaker equipment and wireless headset for playing audio synchronously | |
US10809969B2 (en) | Systems and methods for audio playback | |
US10750459B2 (en) | Synchronization method for synchronizing clocks of a bluetooth device | |
CN108415685B (en) | Wireless Bluetooth headsets realize the method being precisely played simultaneously | |
US20090298420A1 (en) | Apparatus and methods for time synchronization of wireless audio data streams | |
CN115551068A (en) | Bluetooth media device time synchronization | |
US20120087503A1 (en) | Multi-channel audio over standard wireless protocol | |
CN109547946B (en) | Audio data communication method | |
US10735120B1 (en) | Reducing end-to-end delay for audio communication | |
US20110110358A1 (en) | Stereo bit clock tuning | |
US20230216910A1 (en) | Audio synchronization in wireless systems | |
KR20080012920A (en) | Method and apparatus for adaptive polling in a wireless communication device | |
KR20210055009A (en) | Multi-member bluetooth device capable of synchronizing audio playback between different bluetooth circuits | |
US8006007B1 (en) | Time scale normalization of a digitized signal | |
US9860654B2 (en) | Method for synchronizing the reproduction of a digital signal sent by a transmitter to a plurality of mobile audio terminals | |
KR102433753B1 (en) | Main bluetooth circuit and auxiliary bluetooth circuit of multi-member bluetooth device capable of synchronizing audio playback between different bluetooth circuits | |
CN112235685B (en) | Sound box networking method and sound box system | |
JP4862135B2 (en) | Digital radio for mobile station and control method | |
CN113613124A (en) | TWS master and slave device, audio device and system | |
CN116828585A (en) | Audio synchronous playing method and system, audio equipment and storage medium | |
CN114270735A (en) | Radio device for transmitting digital audio streams |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: PIXART IMAGING INC., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:HO, I-KEN;SUNG, CHIH-WEI;PENG, WEI-CHUNG;AND OTHERS;REEL/FRAME:049095/0422 Effective date: 20190503 |
|
AS | Assignment |
Owner name: AUDIOWISE TECHNOLOGY INC., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:PIXART IMAGING INC.;REEL/FRAME:049634/0177 Effective date: 20190614 |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |