WO2020133183A1 - Audio data synchronization method and device - Google Patents

Audio data synchronization method and device Download PDF

Info

Publication number
WO2020133183A1
WO2020133183A1 PCT/CN2018/124768 CN2018124768W WO2020133183A1 WO 2020133183 A1 WO2020133183 A1 WO 2020133183A1 CN 2018124768 W CN2018124768 W CN 2018124768W WO 2020133183 A1 WO2020133183 A1 WO 2020133183A1
Authority
WO
WIPO (PCT)
Prior art keywords
earplug
cig
cis
electronic device
audio
Prior art date
Application number
PCT/CN2018/124768
Other languages
French (fr)
Chinese (zh)
Inventor
朱宇洪
张景云
倪观军
王良
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/124768 priority Critical patent/WO2020133183A1/en
Priority to CN201880100553.0A priority patent/CN113228701B/en
Priority to CN202210871663.5A priority patent/CN115426064A/en
Publication of WO2020133183A1 publication Critical patent/WO2020133183A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes

Definitions

  • the present application relates to the field of short-range communications, and in particular to a method and device for synchronizing audio data.
  • Bluetooth is a wireless technology standard that enables short-range data interaction between different devices.
  • the mobile phone can turn on the Bluetooth module and perform short-range data interaction with the Bluetooth headset to use the Bluetooth headset as the audio input/output device of the mobile phone to implement functions such as calling and music playback.
  • the purpose of the present application is to provide a method and device for synchronizing audio data.
  • playback level synchronization of audio data between multiple Bluetooth devices is achieved.
  • a method for synchronizing audio data can be applied to an electronic device that can establish a wireless connection with a first earplug and a second earplug, respectively; the method can include: The first isochronous stream (connected, isochronous stream, CIS) of the connected isochronous group (CIG) sends a data packet to the first earbud, and sends the data to the second earbud through the second CIS of the CIG Packet; wherein, the data packet may include: audio data, an audio time stamp of the data packet, and an initial Bluetooth time stamp.
  • the initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud, and establishes the second CIS with the second earbud; the audio timestamp and the initial Bluetooth timestamp are used for the first earbud Determine the CIG play point with the second earplug, and the CIG playpoint is the time point when the first earplug and the second earplug play the audio data in the data packet.
  • the above-mentioned electronic device may be a device such as a mobile phone
  • the above-mentioned first earplug and the above-mentioned second earplug may be Bluetooth earphones, such as the left earplug and the right earplug of a true wireless stereo (TWS) headset, respectively.
  • the first earplug and the second earplug may be replaced with two other Bluetooth devices, respectively.
  • the device shape of the two Bluetooth devices can be the same (such as two wireless speakers) or different (such as one wireless speaker and one wireless headset).
  • the electronic device sends the audio time stamp carrying the data packet and the initial Bluetooth time stamp data packet to the two Bluetooth devices, such as the first earbud and the second earbud, so that the first earbud and the second earbud can
  • the playback time point of the audio data in the data packet is determined, that is, the CIG playback point.
  • the audio timestamp and initial Bluetooth timestamp in the data packet can ensure the synchronization of the Bluetooth clock and the audio clock.
  • the first earplug and the second earplug can determine the CIG play point of the audio data according to the synchronized Bluetooth clock and the synchronized audio clock.
  • the play level synchronization of audio data is realized by using the determined CIG play point.
  • the Bluetooth clock and the audio clock are decoupled and synchronized independently, and the hardware clock synchronization of the Bluetooth clock and the audio clock is not required.
  • the Bluetooth clock it is only necessary to carry the BTS of the first data packet in each data packet, that is, the initial Bluetooth time stamp, and it is not necessary to obtain the BTS of each data packet to reduce the load.
  • each data packet is independently labeled. Therefore, while achieving playback-level synchronization of audio data, it can also support independent playback of each data packet. In this way, the technical solution of this embodiment can be applied to scenarios where single earplugs are used alone, both earplugs are used simultaneously, and single ear and binaural switching is performed.
  • the electronic device may send a first data packet to the first earplug through the first CIS of CIG, and the first data packet may include: Audio data, audio timestamp of the first data packet, and initial Bluetooth timestamp.
  • the initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud; the audio timestamp and initial Bluetooth timestamp of the first data packet can be used for the first earbud to determine CIG playback Point, the CIG play point is the time point when the first earbud plays the audio data in the first data packet.
  • the electronic device can not only send the second data packet to the first earplug through the first CIS of CIG, but also send the second data packet to the second earplug through the second CIS of CIG.
  • a data packet, the second data packet may include: audio data, an audio time stamp of the second data packet, and an initial Bluetooth time stamp.
  • the audio timestamp and initial Bluetooth timestamp of the second data packet can be used to determine the CIG playback point of the first earplug and the second earplug, and the CIG playback point is the time point at which the first earplug and the second earplug play the audio data in the second data packet .
  • the electronic device may calculate the audio timestamp of the data packet for each data packet, and carry it in the data packet to notify the first earplug and/or the second earplug.
  • the method may further include: The device establishes the CIG's first CIS with the first earplug and the CIG's second CIS with the second earplug.
  • the electronic device establishes the first CIS of the CIG with the first earplug and the second CIS of the CIG with the second earplug, which may specifically include: the electronic device sends a CIS establishment request message to the first earplug, Receive the CIS establishment response message sent by the first earbud, send the CIS establishment message to the first earbud; the electronic device sends the CIS establishment request message to the second earbud, receive the CIS establishment response message sent by the second earbud, and send the CIS establishment to the second earbud Message; wherein, the CIS establishment request message includes transmission delay and playback delay, and the transmission delay and playback delay are used for the first earplug and the second earplug to determine the CIG play point.
  • the method may further include: the electronic device and the first earplug respectively Pair the second earbuds; the electronic device establishes a first asynchronous connection-oriented (ACL) link with the first earbud; the electronic device establishes a second ACL link with the second earbud; the electronic device establishes with the first earbud
  • ACL asynchronous connection-oriented
  • the first CIS of CIG establishes the second CIS of CIG with the second earplug, which may specifically include: the electronic device establishes the first CIS of CIG with the first earplug through the first ACL link, and the second earplug through the second ACL link Established CIG's second CIS.
  • the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet meets at least one of the following conditions: less than or equal to the transmission delay, and less than or equal to the playback delay , Less than or equal to the sum of transmission delay and playback delay. In this way, the continuity of audio data at the playback level can be guaranteed.
  • a method for synchronizing audio data is provided, which is applied to a first earplug and a second earplug that establish a wireless connection with an electronic device.
  • the method may include: the first earplug receives a first CIS from the electronic device through the first CIS of the CIG The data packet; the second earplug receives the data packet from the electronic device through the second CIS of CIG; the data packet may include: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is for the electronic device Establish the first CIS with the first earbud, and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earbud; the first earbud and the second earbud are based on the audio timestamp, the initial Bluetooth timestamp, and the transmission time
  • the delay and playback delay determine the CIG playback point; the first earplug and the second earplug respectively play the audio data in the data packet at the CIG
  • the first earplug and the second earplug may be a left earplug and a right earplug of a Bluetooth headset (such as a TWS headset), respectively.
  • the first earplug and the second earplug may be replaced with two other Bluetooth devices, respectively.
  • the device shape of the two Bluetooth devices can be the same (such as two wireless speakers) or different (such as one wireless speaker and one wireless headset).
  • two Bluetooth devices such as the first earplug and the second earplug, respectively receive data packets from the electronic device, and the data packet carries the audio timestamp of the data packet, and the initial Bluetooth timestamp
  • the first earplug And the second earbud can determine the playing time point of the audio data in the data packet according to the audio timestamp and the initial Bluetooth timestamp, that is, the CIG playing point.
  • the audio timestamp and initial Bluetooth timestamp in the data packet can ensure the synchronization of the Bluetooth clock and the audio clock.
  • the first earplug and the second earplug can determine the CIG play point of the audio data according to the synchronized Bluetooth clock and the synchronized audio clock.
  • the Bluetooth clock and the audio clock are decoupled and synchronized independently, and no hardware clock synchronization of the Bluetooth clock and the audio clock is required.
  • the Bluetooth clock it is only necessary to carry the BTS of the first data packet in each data packet, that is, the initial Bluetooth time stamp, and it is not necessary to obtain the BTS of each data packet to reduce the load.
  • each data packet is independently labeled. Therefore, while achieving playback-level synchronization of audio data, it can also support independent playback of each data packet. In this way, the technical solution of this embodiment can be applied to scenarios where single earplugs are used alone, both earplugs are used simultaneously, and single ear and binaural switching is performed.
  • the first earplug may receive the first data packet from the electronic device through the first CIS of CIG, and the first data packet may include : Audio data, audio timestamp of the first data packet, and initial Bluetooth timestamp.
  • the initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud; the first earbud can determine the CIG playback point according to the audio timestamp of the first data packet and the initial Bluetooth timestamp , The first earplug can play the audio data in the first data packet at the CIG play point.
  • the second earplug can also receive the electronic data through the CIG’s second CIS A second data packet of the device.
  • the second data packet may include: audio data, an audio time stamp of the second data packet, and an initial Bluetooth time stamp.
  • the first earplug and the second earplug can determine the CIG playback point according to the audio timestamp and the initial Bluetooth timestamp of the second data packet, respectively, and the first earplug and the second earplug can play the audio data in the second data packet at the CIG playback point, respectively .
  • the method may include: the first earplug and the electronic device establish a CIG first CIS, and the second earplug and the electronic device establish a CIG second CIS.
  • the first earplug and the electronic device establish a CIG first CIS
  • the second earplug and the electronic device establish a CIG second CIS
  • the first earplug receives the CIS establishment from the electronic device Request message, send CIS establishment response message to the electronic device, receive CIS establishment message from the electronic device
  • second earbuds receive CIS establishment request message from the electronic device, send CIS establishment response message to the electronic device, receive CIS establishment message from the electronic device Message
  • CIS establishment request message includes transmission delay and play delay.
  • the method may further include: the first earplug and the second The earplugs are paired with the electronic device; the first earplug and the electronic device establish a first ACL link; the second earplug and the electronic device establish a second ACL link; the first earplug and the electronic device establish a CIG first CIS, and the second earplug Establishing the second CIS of the CIG with the electronic device may specifically include: establishing the first CIS of the CIG with the electronic device through the first ACL link, and establishing the second of the CIG with the electronic device through the second ACL link CIS.
  • the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet meets at least one of the following conditions: less than or equal to the transmission delay, and less than or equal to the playback delay , Less than or equal to the sum of transmission delay and playback delay. In this way, the continuity of audio data at the playback level can be guaranteed.
  • the first earplug and the second earplug respectively determine the CIG play point according to the audio timestamp, the initial Bluetooth timestamp, the transmission delay, and the playback delay, which may specifically include: the first earplug according to the audio time Poke, initial Bluetooth timestamp and transmission delay determine the CIG synchronization point, the first earbud determines the CIG playback point based on the determined CIG synchronization point and playback delay; the second earbud determines the audio Bluetooth timestamp, initial Bluetooth timestamp and transmission delay CIG synchronization point, the first earplug determines the CIG playback point according to the determined CIG synchronization point and playback delay.
  • SYNC_m_n is the CIG synchronization point
  • Init_BTS is the initial Bluetooth timestamp
  • ATS_n is the audio timestamp
  • transport_delay is the transmission delay
  • m indicates that the packet is the mth packet on the Bluetooth clock
  • n indicates that the packet is The nth packet on the audio clock.
  • an electronic device may include: one or more processors, a memory, a wireless communication module, and a mobile communication module; wherein: the memory, the wireless communication module, the mobile communication module, and one or more processes Is coupled to a memory, and the memory is used to store computer program code.
  • the computer program code includes computer instructions. When one or more processors execute the computer instructions, the electronic device may perform any one of the first aspect or any possible implementation manner of the first aspect. A method for synchronizing audio data.
  • a Bluetooth headset may include at least one earphone; the earphone may include: a processor, a memory, a wireless communication module, a receiver, and a microphone; a memory, a wireless communication module, a receiver, and a microphone are coupled to the processor ,
  • the memory is used to store computer program code, the computer program code includes computer instructions; when the processor executes the computer instructions, the earplugs can execute the audio data described in any one of the second aspect or any possible implementation manner of the second aspect Synchronization method.
  • the Bluetooth headset includes two earplugs, such as the first earplug and the second earplug, and the first earplug and the second earplug may perform any one of the second aspect or any possible implementation manner of the second aspect. Synchronization method of audio data.
  • a Bluetooth audio system may include: an electronic device, a first earplug, and a second earplug; wherein: the electronic device may be used to send a data packet to the first earplug through the first CIS of CIG , Sending a data packet to the second earbud through the second CIS of CIG; the data packet may include: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is the electronic device and the first earbud Establish the first CIS, and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earplug; the first earplug can be used to receive the data packet, according to the audio timestamp and the initial Bluetooth timestamp in the data packet, And the transmission delay and playback delay to determine the CIG playback point, and play the audio data in the received data packet at the determined CIG playback point; the second earplug can be used to receive the data
  • a Bluetooth chip which can be applied to electronic devices;
  • the Bluetooth chip can include a memory, a processor, and a radio frequency module, and the memory is used to store computer program code, and the computer program code includes computer instructions; wherein: processing The computer executes computer instructions stored in the memory to control the radio frequency module to send a data packet to the first earplug through the first CIS of CIG and a data packet to the second earplug through the second CIS of CIG; wherein, the data packet may include: audio data, The audio timestamp of the data packet and the initial Bluetooth timestamp.
  • the initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud and establishes the second CIS with the second earbud;
  • the audio timestamp and the initial Bluetooth timestamp are used by the first earplug and the second earplug to determine the CIG playback point, and the CIG playback point is the time point at which the first earplug and the second earplug play the audio data in the data packet.
  • a Bluetooth chip which can be applied to the earbuds of a Bluetooth headset;
  • the Bluetooth chip includes a memory, a processor, and a radio frequency module, and the memory is used to store computer program code, and the computer program code includes computer instructions;
  • the processor executes The computer instructions stored in the memory control the radio frequency module to receive the data packet from the electronic device through the CIG CIS;
  • the data packet may include: audio data, audio time stamp of the data packet, and initial Bluetooth time stamp, the initial Bluetooth time stamp is The Bluetooth timestamp of the first data packet transmitted after the CIS is established;
  • the CIG playback point is determined based on the audio timestamp, initial Bluetooth timestamp, transmission delay and playback delay; so that the microphone of the earbud of the Bluetooth headset can be at the CIG playback point Play audio data in the packet.
  • a computer storage medium including computer instructions, which, when run on an electronic device, cause the electronic device to perform audio as described in any one of the first aspect or any possible implementation manner of the first aspect Data synchronization method.
  • a computer storage medium including computer instructions, which when executed on an earbud of a Bluetooth headset, causes the earbud to perform any one of the second aspect or any possible implementation manner of the second aspect Synchronization method of audio data.
  • a computer program product which, when the computer program product runs on a computer, causes the computer to execute any one of the above audio data synchronization methods.
  • a device for synchronizing audio data may be included in an electronic device, and the device has the electronic device in any of the methods for implementing the first aspect and the possible implementation manners of the first aspect.
  • Behavioral function The function can be realized by hardware, or can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a sending module or unit, a processing module or unit, a receiving module or unit, etc.
  • the apparatus for synchronizing audio data may be included in an earplug of a Bluetooth headset.
  • the apparatus has any method for implementing the second aspect and the possible implementation manners of the second aspect.
  • the function of the earplugs of the Bluetooth headset (for example, the first earplug or the second earplug).
  • the function can be realized by hardware, or can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a receiving module or unit, a processing module or unit, a playing module or unit, a sending module or unit, etc.
  • FIG. 1 is a schematic structural diagram of a Bluetooth audio system provided by an embodiment
  • FIG. 2 is a schematic structural diagram of an earplug of a TWS earphone provided by an embodiment
  • FIG. 3 is a schematic diagram of an example of a product form of a TWS earphone provided by an embodiment
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment
  • FIG. 5 is a schematic diagram of the composition of a Bluetooth transmission architecture provided by an embodiment
  • FIG. 6 is a schematic flowchart of a method for synchronizing audio data according to an embodiment
  • FIG. 7 is a schematic diagram of an audio data transmission principle provided by an embodiment
  • FIG. 8 is a schematic structural diagram of a data packet provided by an embodiment
  • FIG. 9 is a schematic structural diagram of an earplug of a Bluetooth headset provided by an embodiment
  • FIG. 10 is a schematic structural diagram of an electronic device according to another embodiment.
  • Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which is mainly responsible for the formulation of Bluetooth technical specifications.
  • the current Bluetooth technical specifications are mainly used for point-to-point data transmission based on basic rate (BR)/enhanced data (EDR).
  • BR basic rate
  • EDR enhanced data
  • the mobile phone establishes a wireless connection with multiple (such as two) Bluetooth devices, it is necessary to realize point-to-multipoint data transmission between the mobile phone and the two Bluetooth devices.
  • BR/EDR basic rate
  • these two Bluetooth devices may also have a need to achieve playback-level synchronization of audio data between the devices.
  • Bluetooth headsets with two independent headset bodies gradually enter people's vision.
  • such a Bluetooth headset with two independent headset bodies may be called a TWS headset, and the two independent headset bodies contained therein may be called left earplugs and right earplugs, respectively.
  • TWS headset is used as the audio input/output device of the mobile phone
  • the point-to-multipoint data transmission between the mobile phone and the left and right earplugs of the TWS headset needs to be realized.
  • the playback level synchronization of audio data between the left and right earbuds of the TWS headset is also required. That is to say, it is necessary to realize the synchronous transmission of the playback level of point-to-multipoint audio data.
  • the Bluetooth Technology Alliance is already working on the development of point-to-multipoint Bluetooth technical specifications for the realization of playback-level synchronous transmission of point-to-multipoint audio data.
  • BLE Bluetooth Low Energy
  • ISO isochronous
  • a master device referred to as M, such as the above mobile phone
  • S multiple slave devices
  • the transmission mechanism can be used to realize the synchronous transmission of the playback level of point-to-multipoint audio data.
  • CIG is defined in the above transmission mechanism, and CIG is the concept of group.
  • a CIG can include multiple CIS.
  • a master device can send audio data to multiple slave devices through multiple CISs in a CIG.
  • Multiple slave devices correspond to multiple CISs in one-to-one manner, so that point-to-multipoint data transmission can be achieved.
  • the transmission channel between the master device and each slave device is defined as CIS, and multiple CISs belong to the same CIG.
  • multiple CISs in a CIG can share the same CIG synchronization point (CIG synchronization point) and CIG playback point (CIG presentation point).
  • CIG synchronization point multiple slave devices corresponding to CIS all receive audio data.
  • CIG playback point multiple slave devices corresponding to CIS all play audio data. That is, multiple slave devices can achieve playback-level synchronization of audio data of multiple slave devices according to the shared CIG synchronization point and CIG playback point, respectively.
  • the playback level synchronization of audio data of multiple slave devices may refer to: multiple slave devices may receive audio data from the master device separately, and for the user, the same Play the received audio data at a point in time.
  • the master device may be a mobile phone
  • the multiple slave devices may be the left earplug and the right earplug of the TWS headset.
  • the mobile phone can send audio data to the left and right earplugs of the TWS headset through two CISs in a CIG, respectively.
  • the left earplug and the right earplug of the TWS earphone can play the received audio data at the same time point as perceived by the user, so as to realize the playback level synchronization of the audio data.
  • This embodiment provides a method for synchronizing audio data, which can be applied to the process of transmitting audio data between an electronic device and multiple Bluetooth devices.
  • the electronic device establishes a wireless connection with each of the plurality of Bluetooth devices, and the electronic device sends audio data to each of the plurality of Bluetooth devices based on the wireless connection with each Bluetooth device .
  • These multiple Bluetooth devices can determine the CIG synchronization point and CIG playback point based on the synchronized audio clock (clock) and the synchronized Bluetooth clock (Bluetooth clock), so that the determined CIG synchronization point and CIG playback point can be used to realize audio data Play level synchronization.
  • the above audio data may include: voice data during a call, which is performed using an application program (eg, WeChat, Facebook) Voice data or voice messages during voice calls or video calls, prompt tones (such as call prompt tone, ring back tone, SMS prompt tone, etc.), music, voice data when playing video, navigation sound, etc.
  • voice data during a call
  • an application program eg, WeChat, Facebook
  • voice messages during voice calls or video calls
  • prompt tones such as call prompt tone, ring back tone, SMS prompt tone, etc.
  • music voice data when playing video, navigation sound, etc.
  • the audio data synchronization method provided in this embodiment can be applied to a Bluetooth audio system composed of a peripheral device 101 and an electronic device 102.
  • the peripheral device 101 and the electronic device 102 may use Bluetooth to establish a Bluetooth connection. Based on the established Bluetooth connection, short-range data interaction can be realized between the peripheral device 101 and the electronic device 102. Exemplarily, the audio data may be transmitted between the peripheral device 101 and the electronic device 102 based on the Bluetooth connection.
  • the peripheral device 101 can serve as an audio input/output device of the electronic device 102 to realize a call.
  • the peripheral device 101 can be used as an output device of the electronic device 102, such as a speaker to play music.
  • the peripheral device 101 may be a device such as a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, etc., which includes a main body.
  • the electronic device 102 may serve as a master device to transmit audio data to a peripheral device 101 as a slave device through a CIS in a CIG.
  • the wireless earphone may be a headphone, earplugs or other portable listening devices.
  • the electronic device 102 can serve as a master device to transmit audio data to multiple peripheral devices 101 as slave devices through multiple CISs in a CIG, and the multiple CIS correspond to the multiple peripheral devices 101 in one-to-one correspondence.
  • the audio data synchronization method provided in this embodiment can also be applied to a scenario where the electronic device 102 sends audio data to multiple peripheral devices 101.
  • multiple peripheral devices 101 can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, thereby using the determined CIG synchronization point and the CIG playback point to realize audio data Play level synchronization.
  • the peripheral device 101 may also be a Bluetooth headset (it may also be referred to as a TWS headset, which will be described using the TWS headset as an example in the following embodiments), a Bluetooth speaker, smart glasses, and other devices.
  • the peripheral device 101 includes two main bodies, and no wire connection is needed between the two main bodies, and they can cooperate with each other and work together.
  • the two main bodies have a requirement to achieve playback-level synchronization of the audio data.
  • the electronic device 102 can send audio data to two main bodies of the peripheral device 101 through two CISs in one CIG, and the two CISs correspond to the two main bodies of the peripheral device in one-to-one correspondence.
  • the peripheral device 101 shown in FIG. 1 is illustrated with a TWS earphone as an example.
  • the TWS earphone includes two main bodies (such as a headphone main body), such as a left earplug 101-1 and a right earplug 101-2. No wire connection is required between the left earplug 101-1 and the right earplug 101-2, and they can cooperate with each other and work together, for example, to achieve stereo playback.
  • the electronic device 102 can serve as a master device to send audio data to the left earplug 101-1 and the right earplug 101-2 as slave devices through two CISs in one CIG, respectively.
  • the left earplug 101-1 and the right earplug 101-2 of the TWS earphone can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, thereby using the determined CIG synchronization point and CIG playback point Play level synchronization of audio data.
  • the structures of the left earplug 101-1 and the right earplug 101-2 of the TWS earphone may be as shown in FIG. 2 and will be described in detail in the following embodiments.
  • the electronic device 102 may be a mobile phone (as shown in FIG. 1), a tablet computer, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC) , Netbooks, and cellular phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR) ⁇ virtual reality (virtual reality, VR) devices, media players, televisions and other devices.
  • PDAs personal digital assistants
  • augmented reality augmented reality, AR
  • VR virtual reality
  • the specific form of the device is not subject to special restrictions.
  • the structure of the electronic device 102 may be as shown in FIG. 4 and will be described in detail in the following embodiments.
  • FIG. 2 is a schematic structural diagram of an earplug (left earplug or right earplug) of a TWS earphone provided by this embodiment.
  • the earplugs of the TWS headset may include: a processor 201, a memory 202, a sensor 203, a wireless communication module 204, at least one receiver 205, at least one microphone 206, and a power supply 207.
  • the memory 202 can be used to store application code, such as an application code for establishing a Bluetooth connection with another earbud of the TWS headset and pairing the earbud with the electronic device 102 described above.
  • the processor 201 can control the execution of the above application program code to implement the function of the earplug of the TWS earphone in this embodiment.
  • the memory 202 may also store a Bluetooth address for uniquely identifying the earbud, and a Bluetooth address of another earbud where the TWS earphone is stored.
  • the memory 202 may also store connection data of the electronic device that has been successfully paired with the earplug before.
  • the connection data may be the Bluetooth address of the electronic device that has successfully paired with the earbud. Based on the connection data, the earplug can be automatically paired with the electronic device without having to configure a connection with it, such as performing legality verification.
  • the aforementioned Bluetooth address may be a Media Access Control (Media Access Control, MAC) address.
  • Media Access Control Media Access Control
  • the sensor 203 may be a distance sensor or a proximity light sensor.
  • the processor 201 of the earplug can determine whether it is worn by the user through the sensor 203.
  • the processor 201 of the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user.
  • the processor 201 of the earplug may turn on the receiver 205.
  • the earplug may also include a bone conduction sensor, combined with a bone conduction earphone.
  • the bone conduction sensor can obtain the vibration signal of the vibrating bone mass of the voice part, and the processor 201 parses out the voice signal to realize the control function corresponding to the voice signal.
  • the earplug may further include a touch sensor or a pressure sensor, which are used to detect the user's touch operation and pressing operation, respectively.
  • the earplug may further include a fingerprint sensor, which is used to detect a user's fingerprint and identify the user's identity.
  • the earplug may further include an ambient light sensor, and the processor 201 of the earplug may adaptively adjust some parameters, such as volume, according to the brightness of the ambient light sensed by the ambient light sensor.
  • the wireless communication module 204 is used to support short-distance data interaction between the left earplug and the right earplug of the TWS earphone, and between the earplug and various electronic devices, such as the electronic device 102 described above.
  • the wireless communication module 204 may be a Bluetooth transceiver.
  • the earplugs of the TWS headset can establish a Bluetooth connection with the electronic device 102 through the Bluetooth transceiver to achieve short-range data interaction between the two.
  • the receiver 205 which may also be referred to as an "earpiece", may be used to convert audio electrical signals into sound signals and play them.
  • the receiver 205 may convert the received audio electrical signal into a sound signal and play it.
  • the microphone 206 which may also be referred to as a "microphone” or a “microphone,” is used to convert sound signals into audio electrical signals.
  • a microphone When the earplug of the TWS earphone is used as the audio input device of the electronic device 102, when the user speaks (such as talking or sending a voice message), the microphone 206 can collect the user's voice signal and convert it into an audio electrical signal.
  • the above audio electrical signal is the audio data in this embodiment.
  • the power supply 207 can be used to supply power to various components included in the earplugs of the TWS earphone.
  • the power source 207 may be a battery, such as a rechargeable battery.
  • TWS earphones will be equipped with a headphone box (eg, 301 shown in Figure 3).
  • the earphone box 301 may include a cavity 301-1 and a box cover 301-2.
  • the cavity 301-1 can be used to store the left earplug and the right earplug of the TWS earphone.
  • the cavity 301-1 of the earphone box 301 can be used to house the left earplug 101-1 and the right earplug 101-2 of the TWS earphone.
  • the earphone box 301 can also charge the left earplug and the right earplug of the TWS earphone.
  • the earplugs of the TWS earphone may further include: an input/output interface 208.
  • the input/output interface 208 may be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the cavity 301-1 of the earphone box 301 described above).
  • the input/output interface 208 may be an electrical connector.
  • the earplug of the TWS earphone when the earplug of the TWS earphone is placed in the cavity 301-1 of the earphone box 301, the earplug of the TWS earphone may be electrically connected to the earphone box 301 (such as the input/output interface with the earphone box 301) through the electrical connector. After the electrical connection is established, the earphone box 301 can charge the power supply 207 of the earplug of the TWS earphone.
  • the earplugs of the TWS earphone can also perform data communication with the earphone box 301.
  • the processor 201 of the earplug of the TWS earphone may receive the pairing instruction from the earphone box 301 through the electrical connection.
  • the pairing command is used to instruct the processor 201 of the earphone of the TWS earphone to turn on the wireless communication module 204, so that the earphone of the TWS earphone can use a corresponding wireless communication protocol (such as Bluetooth) to pair with the electronic device 102.
  • a corresponding wireless communication protocol such as Bluetooth
  • the earplugs of the aforementioned TWS earphones may not include the input/output interface 208.
  • the earplugs can implement charging or data communication functions based on the Bluetooth connection established with the earphone box 301 through the wireless communication module 204 described above.
  • the earphone box (such as the aforementioned earphone box 301) may further include a processor, a memory, and other components.
  • the memory can be used to store application program codes, and is controlled and executed by the processor of the earphone box 301 to realize the function of the earphone box 301.
  • the processor of the earphone box 301 can send the pairing to the earplug of the TWS headset in response to the user's operation of opening the lid 301-2 by executing the application code stored in the memory Orders etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the earplugs of the TWS earphone. It may have more or fewer components than shown in FIG. 2, two or more components may be combined, or may have different component configurations.
  • the earplug may also include an indicator light (which can indicate the status of the earplug's power level, etc.), a dust filter (which can be used with the earpiece), and other components.
  • the various components shown in FIG. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
  • the structure of the left earplug and the right earplug of the TWS earphone may be the same.
  • the left earplug and the right earplug of the TWS earphone may both include the components shown in FIG. 2.
  • the structure of the left earplug and the right earplug of the TWS earphone may be different.
  • one earplug (such as the right earplug) of the TWS earphone may include the components shown in FIG. 2
  • the other earplug such as the left earplug
  • FIG. 4 is a schematic structural diagram of an electronic device 102 in the Bluetooth audio system shown in FIG. 1 according to an embodiment of the present application.
  • the electronic device 102 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , A display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 102.
  • the electronic device 102 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • the different processing units may be independent devices or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 102.
  • the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /Or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 102.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193.
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 102.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 102.
  • the GPIO interface can be configured via software.
  • the GPIO interface can be configured as a control signal or a data signal.
  • the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 102, and can also be used to transfer data between the electronic device 102 and peripheral devices. It can also be used to connect headphones and play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in this embodiment is only a schematic description, and does not constitute a limitation on the structure of the electronic device 102.
  • the electronic device 102 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 102. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 102 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 102 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 102.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (Bluetooth, BT), and global navigation satellites that are applied to the electronic device 102 Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
  • the antenna 1 of the electronic device 102 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160 so that the electronic device 102 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include a global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation system
  • the electronic device 102 may utilize the wireless communication module 160 to establish a Bluetooth connection with a peripheral device through a wireless communication technology, such as Bluetooth (BT). Based on the established Bluetooth connection, the electronic device 102 can send audio data to the peripheral device and can also receive audio data from the peripheral device.
  • BT Bluetooth
  • the electronic device 102 realizes a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 102 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 102 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CCD charge coupled device
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the electronic device 102 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 102 selects at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
  • the video codec is used to compress or decompress digital video.
  • the electronic device 102 may support one or more video codecs. In this way, the electronic device 102 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • moving picture experts group moving picture experts, MPEG
  • MPEG2 moving picture experts, MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the electronic device 102, such as image recognition, face recognition, voice recognition, and text understanding.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 102.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 102.
  • the processor 110 may execute instructions stored in the internal memory 121, establish a Bluetooth connection with the peripheral device through the wireless communication module 160, and perform short-range data interaction with the peripheral device to implement the peripheral device Call, play music and other functions.
  • the internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system, at least one function required application programs (such as sound playback function, image playback function, etc.).
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 102 and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
  • the wireless communication technology is adopted between the electronic device 102 and the peripheral device. For example, after the Bluetooth connection is established by the Bluetooth, the electronic device 102 can store the Bluetooth address of the peripheral device in the internal memory 121.
  • the peripheral device when the peripheral device is a device that includes two main bodies, such as a TWS headset, the left and right earbuds of the TWS headset have respective Bluetooth addresses, and the electronic device 102 can use the left and right earbuds of the TWS headset
  • the associated Bluetooth address is stored in the internal memory 121.
  • the electronic device 102 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 102 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 102 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the ear.
  • the microphone 170C also known as “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal to the microphone 170C.
  • the electronic device 102 may be provided with at least one microphone 170C. In other embodiments, the electronic device 102 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 102 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the TWS headset when the electronic device 102 establishes a Bluetooth connection with a peripheral device such as a TWS headset, the TWS headset can be used as an audio input/output device of the electronic device 102.
  • the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering a phone call and playing music through a TWS headset.
  • the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the electronic device 102.
  • the wireless communication module 160 transmits the audio electrical signal to the audio module 170.
  • the audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and pass it to the mobile communication module 150.
  • the application processor may transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170.
  • the audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170.
  • the wireless communication module 160 may send the audio electrical signal to the TWS headset, so that the TWS headset converts the audio electrical signal into a sound signal and plays it.
  • the audio electrical signal may be the audio data in this embodiment.
  • the headset interface 170D is used to connect wired headsets.
  • the earphone interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
  • OMTP open mobile electronic device
  • CTIA American Telecommunications Industry Association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 102 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 102 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 102 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 102. In some embodiments, the angular velocity of the electronic device 102 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 102 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 102 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 102 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 102 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device 102 when the electronic device 102 is a clamshell machine, the electronic device 102 can detect the opening and closing of the clamshell according to the magnetic sensor 180D.
  • characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 102 in various directions (generally three axes). When the electronic device 102 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 102 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the electronic device 102 may use the distance sensor 180F to measure distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 102 emits infrared light outward through the light emitting diode.
  • the electronic device 102 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 102. When insufficient reflected light is detected, the electronic device 102 may determine that there is no object near the electronic device 102.
  • the electronic device 102 can use the proximity light sensor 180G to detect that the user holds the electronic device 102 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the electronic device 102 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 102 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 102 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, answer the call with the fingerprint, and so on.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the motor 191 may generate a vibration prompt.
  • the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • CIG In the transmission mechanism defined by the ISO channel of BLE, CIG is defined.
  • CIG is a concept of a group and can include multiple CISs.
  • a master device can send audio data to multiple slave devices through multiple CISs in the CIG.
  • Multiple CIS correspond to multiple slave devices. And these multiple CISs can share the same CIG sync point and CIG play point.
  • multiple slave devices can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, so that the determined CIG synchronization point and CIG playback point can be used to achieve the playback level of audio data Synchronize.
  • FIG. 5 is a schematic diagram of the composition of a Bluetooth transmission framework provided by an embodiment of the present application.
  • the Bluetooth transmission framework may include an application layer, a host, a host controller interface (HCI), and a controller.
  • the application layer may include telephone applications, multimedia applications (such as music players, video players) and other applications.
  • the host may include various application profiles of Bluetooth and transmission protocols.
  • hands-free profile HFP
  • advanced audio transmission profile advanced audio distribution profile
  • A2DP advanced audio transmission profile
  • audio/video remote control profile audio/video remote control profile
  • AVRCP general access profile
  • GAP Generic Attribute Profile
  • GATT Generic Attribute Profile
  • Audio and Video Distribution Transmission Protocol audio/video distribution protocol, AVDTP
  • Audio and Video Control Transmission Protocol audio/video control transmission protocol
  • AVCTP Service Discovery Protocol
  • serial port emulation protocol radio frequency communications protocols
  • RFCOMM logical link control and adaptation protocol
  • L2CAP logical link control and adaptation protocol
  • Interoperable devices need to use the same application specification to communicate. Different applications require different application specifications.
  • HCI is located between the host and the controller, and can provide a unified interface for the upper layer protocol to enter the link layer in the controller and a unified way to enter the baseband in the controller.
  • the controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit.
  • the link layer is responsible for managing the communication between the devices, to achieve link establishment, verification, link configuration and other operations.
  • the baseband mainly performs mutual conversion between radio frequency signals and digital or voice signals to implement baseband protocols and other low-level connection procedures.
  • the radio frequency unit is used to transmit and receive Bluetooth signals.
  • the host may be implemented in the AP of the device.
  • the controller can be implemented in the Bluetooth chip of the device. In other embodiments, the host and the controller may be implemented in the same processor or controller of the device, in which case HCI is optional.
  • the electronic device may send a data packet containing audio data to each of the plurality of Bluetooth devices based on the wireless connection established with each Bluetooth device.
  • the data packet may also include an audio time stamp and an initial Bluetooth time stamp of the data packet.
  • Multiple Bluetooth devices can determine the CIG playback point of the audio data based on the audio timestamp and the initial Bluetooth timestamp in the data packet, and play the audio data according to the determined CIG playback point to achieve playback-level synchronization of the audio data.
  • the following embodiment combines the Bluetooth transmission framework shown in FIG. 5 and uses the electronic device as a mobile phone and the Bluetooth device as the main body of the peripheral device.
  • the peripheral device is a TWS headset.
  • the TWS headset includes two headset bodies, which are respectively Taking earplugs and right earplugs as examples, the method for synchronizing audio data provided in this embodiment will be described in detail.
  • the left earplug may be the first earplug in this application
  • the right earplug may be the second earplug in this application
  • the right earplug may be the first earplug in this application
  • the left earplug may be the second earplug in this application.
  • Earplugs Earplugs.
  • the left and right earbuds of the TWS headset are paired with the mobile phone via Bluetooth.
  • the lid of the earphone box of the TWS earphone can be opened.
  • the left earplug and right earplug of the TWS headset turn on automatically, or the function key is pressed and then turned on. If the left earbud and the right earbud have not completed Bluetooth pairing before, the left earbud and the right earbud can automatically perform Bluetooth pairing, or the left earbud and right earbud can perform Bluetooth pairing after the pairing function key is pressed. If the left earbud and the right earbud have previously completed Bluetooth pairing, the Bluetooth pairing process can be omitted. After Bluetooth pairing is completed, a Bluetooth connection can be established between the left and right earbuds of the TWS headset.
  • any one of the left earplug and the right earplug of the TWS earphone can send a paired broadcast to the outside.
  • the mobile phone has turned on the Bluetooth function, the mobile phone can receive the pairing broadcast and prompt the user that the relevant Bluetooth device (such as a TWS headset) has been scanned.
  • the mobile phone can be paired with the right earbud of the TWS headset via Bluetooth.
  • the Bluetooth pairing process can be omitted. In other words, after receiving the pairing broadcast, the mobile phone can automatically perform Bluetooth pairing with the right earbud.
  • the right earbud After the right earbud is paired with the mobile phone via Bluetooth, the right earbud can send the Bluetooth address of the mobile phone to the left earbud through the Bluetooth connection between the left earbud and the left earbud, and notify the left earbud to send a pairing broadcast to the outside. In this way, the mobile phone can receive the pairing broadcast sent by the left earplug and perform Bluetooth pairing with the left earplug.
  • the right earplug of the TWS headset may also send the Bluetooth address of the left earplug to the mobile phone to indicate to the mobile phone that the left earplug and the right earplug are two main bodies of the same peripheral device.
  • the mobile phone can transmit audio data to the right and left earplugs through the two CISs in the same CIG, so that the right earplug and the left earplug can be realized. Play level synchronization of audio data.
  • the trigger condition for the paired broadcast of the left earplug or the right earplug of the TWS headset may be that the cover of the headphone box of the TWS headset is opened, or the pairing of the left earplug and the right earplug of the TWS headset Bluetooth Done, or the left earplug or right earplug of the TWS earphone is taken out of the earphone box, or the pairing function key is pressed, or other triggering conditions.
  • the pairing function key can be set on the earphone box of the TWS earphone.
  • the earphone box of the TWS earphone is equipped with a pairing function key.
  • the mobile phone After the mobile phone is paired with the left earplug and the right earplug of the TWS headset via Bluetooth, the mobile phone can establish an ACL link with the left earplug and the right earplug of the TWS headset, respectively.
  • a mobile phone can establish an ACL link 1 with the left earbud, and a mobile phone can establish an ACL link 2 with the right earbud. Take the case where the mobile phone and the left earbud establish ACL link 1 as an example.
  • the mobile phone can send a request to establish an ACL link to the left earplug.
  • the left earbud answers after receiving the request to establish the ACL link.
  • ACL link 1 is established.
  • ACL link 1 may be the first ACL link in this application
  • ACL link 2 may be the second ACL link in this application.
  • the parameters of the CIG (such as CIG parameters) used to transmit audio data of different audio services may be different.
  • the mobile phone determines that there is audio data to be transmitted (for example, the mobile phone determines that the audio service is turned on)
  • the mobile phone can be connected with the left and right earplugs of the TWS headset or the left earplug of the TWS headset
  • the earplug and one of the right earplugs perform parameter negotiation.
  • the mobile phone can determine the CIG parameters that can be adapted to the audio service according to the results of the parameter negotiation.
  • This CIG parameter can be used to establish the CIS in the CIG for the transmission of related audio data.
  • the above parameter negotiation may include one or more of the following: quality of service (QoS) parameter negotiation, codec parameter negotiation, and CIS parameter negotiation.
  • QoS quality of service
  • codec parameter negotiation codec parameter negotiation
  • CIS parameter negotiation CIS parameter negotiation.
  • the CIG parameters determined by the mobile phone may include one or more of the following: QoS parameters, codec parameters, and CIS parameters.
  • the QoS parameters may include parameters such as delay, packet loss rate, throughput, etc. that represent transmission quality.
  • the codec parameters may include encoding methods, compression ratios, and other parameters that affect audio quality.
  • the CIS parameters may include an anchor point, ISO interval, CIS identification (ID), and so on.
  • the CIG may include multiple CIG events (CIG_event).
  • the anchor point is the start time point of the corresponding CIG event.
  • the ISO interval is the time between two consecutive anchor points. Each CIG event belongs to an ISO interval in time.
  • the above-mentioned parameter negotiation process may be implemented based on the ACL link established between the mobile phone and the left and right earplugs of the TWS headset. For example, taking a mobile phone to negotiate parameter with one of the left earplug and right earplug of the TWS earphone (such as the left earplug) to determine the CIG parameter as an example, the specific process of parameter negotiation may be: the mobile phone passes the ACL link 1 to the left earplug Send parameter negotiation messages.
  • the parameter negotiation message may carry CIG parameters corresponding to the currently enabled audio service. In some embodiments, the CIG parameters corresponding to the currently enabled audio service may be predefined.
  • the left earplug receives the parameter negotiation message sent by the mobile phone through ACL link 1.
  • the left earplug If the left earplug agrees with the CIG parameters carried in the parameter negotiation message, it can return a confirmation message to the mobile phone; if the left earplug does not agree with the parameters carried in the parameter negotiation message or agrees with some of the parameters carried in the parameter negotiation message, you can send The mobile phone returns a continue negotiation message to continue parameter negotiation with the mobile phone until the left earbud returns a confirmation message to the mobile phone. The mobile phone receives the confirmation message returned by the left earplug through ACL link 1. The mobile phone obtains the parameter negotiation result with the left earplug according to the confirmation message. In this way, the mobile phone can determine the CIG parameters that can be adapted to the audio data transmission of the audio service according to the parameter negotiation results.
  • the CIG parameters can be configured according to the determined CIG parameters.
  • the CIG parameter configuration process may be: the host of the mobile phone sets the CIG parameter.
  • the host of the mobile phone can send the HCI command "Low Power CIG Parameter Settings (LE Set CIG parameters)" to the LL of the mobile phone through the HCI.
  • the LL of the mobile phone may return a response message to the host of the mobile phone, such as "command complete".
  • the host of the mobile phone initiated the creation of CIS.
  • the host of the mobile phone can send the HCI command "LE createCIS" to the LL of the mobile phone through the HCI.
  • the LL of the mobile phone can return a response message to the host of the mobile phone, such as "HCI command status (HCI command status)".
  • HCI command status HCI command status
  • the mobile phone establishes CIS with the left and right earplugs of the TWS earphone through the ACL link between the left and right earplugs.
  • the mobile phone can establish the CIS with the left and right earplugs of the TWS headset through the ACL link with the left and right earplugs according to the configured CIG parameters.
  • a mobile phone can establish CIS 1 with the left earbud and CIS 2 with the right earbud.
  • the CIS1 and the CIS2 are included in the same CIG.
  • CIS 1 may be the first CIS in this application
  • CIS 2 may be the second CIS in this application.
  • the process of establishing the CIS 1 between the mobile phone and the left earplug and the CIS 2 between the mobile phone and the right earplug can be seen in FIG. 6.
  • the process of establishing the CIS1 between the mobile phone and the left earbud may include:
  • Step 601 The LL of the mobile phone can send a CIS establishment request message to the LL of the left earplug through the ACL link 1, such as an air interface request message LL_CIS_REQ.
  • the CIS establishment request message can be used to request the LL of the left earplug to create a CIS.
  • Step 602 The LL of the left earplug can send a CIS establishment response message to the LL of the mobile phone through the ACL link 1, such as an air interface response message LL_CIS_RSP.
  • the CIS establishment response message may be used to indicate to the mobile phone that the left earplug agrees to the establishment of CIS.
  • the LL of the left earplug may initiate a CIS creation request to the host of the left earplug.
  • the LL of the left earplug can send the HCI command "low power consumption CIS request (LE CIS request)" to the host of the left earplug through HCI.
  • the host of the left earplug can accept the CIS creation request of the left earplug LL.
  • the host of the left earplug can send the HCI command "low power CIS acceptance (LE accept CIS)" to the LL of the left earplug through HCI.
  • the LL of the left earplug may send the CIS establishment response message to the LL of the mobile phone.
  • the LL of the left earplug may return a response message to the host of the left earplug, such as “command status”.
  • Step 603 The LL of the mobile phone can send a CIS establishment message to the LL of the left earplug through the ACL link 1, such as an air interface notification message LL_CIS_IND.
  • the CIS establishment message can be used to notify the LL of the left earplug that the CIS has completed establishment.
  • the LL of the mobile phone can also send the HCI instruction "LE CIS establishment (LE) CIS establishment" to the host of the mobile phone through the HCI to notify the host of the mobile phone that the CIS is completed.
  • the LL of the left earplug can also send the HCI command "LE CIS establish” to the host of the left earplug through HCI to notify the host of the left earplug to complete the establishment. In this way, the establishment of CIS1 between the mobile phone and the left earbud is completed.
  • L CIS establishment LCIS establishment
  • the mobile phone can perform step 604, step 605, and step 606 with the right earplug (the description of step 604-step 606 is the same as the description type of the above step 601-step 603, which will not be described in detail here) ,
  • step 604-step 606 is the same as the description type of the above step 601-step 603, which will not be described in detail here.
  • the mobile phone can send the TWS headset through CIS 1 and CIS 2 respectively
  • the left earbud and right earbud transmit audio data.
  • the left earplug and right earplug of the TWS headset can receive audio data from the mobile phone through CIS1 and CIS2, respectively.
  • the left earplug and the right earplug of the TWS headset can also determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, and realize the playback level synchronization of the audio data according to the determined CIG synchronization point and the CIG playback point.
  • the method may further include:
  • Step 607 The mobile phone obtains a data packet, and the data packet includes audio data to be transmitted.
  • step 607 may specifically be: the host of the mobile phone may encode the audio data to be transmitted.
  • the host of the mobile phone can transmit the encoded audio data to the LL of the mobile phone through HCI.
  • the controller where the LL of the mobile phone is located may add one or more fields in the frame header, frame tail, preamble and other fields to the data. In this way, the phone gets the data packet.
  • Step 608 The mobile phone sends the above data packets to the left earplug and the right earplug through the CIS between the left earplug and the right earplug of the TWS earphone, respectively.
  • the LL of the mobile phone can send the data packet to the LL of the left earbud of the TWS headset through CIS 1 and the LL of the right earbud of the TWS headset through CIS 2.
  • Step 609 The left earplug of the TWS earphone determines the CIG play point of the audio data in the data packet.
  • Step 610 The right earplug of the TWS earphone determines the CIG play point of the audio data in the data packet.
  • the CIG playback point of audio data may be determined according to the CIG synchronization point and playback delay (presentation delay), for example, as shown in formula (1).
  • Render_m_n is used to represent the CIG play point of the audio data.
  • SYNC_m_n represents the CIG synchronization point.
  • Presentation_delay indicates the playback delay.
  • m indicates that the data packet containing the audio data is the m-th data packet on the Bluetooth clock.
  • n indicates that the packet containing the audio data is the nth packet on the audio clock.
  • m and n may be the same or different.
  • the synchronization of the audio clock and the synchronization of the Bluetooth clock need to be considered when determining the CIG synchronization point.
  • the audio clock may be represented by an audio time stamp (ATS)
  • the Bluetooth clock may be represented by a Bluetooth time stamp (BTS).
  • BTS_m is the Bluetooth timestamp of the data packet containing the audio data.
  • ATS n is the audio time stamp of the data packet containing the audio data.
  • a common clock can be virtualized as a reference time for reference. Then, ATS n can be determined according to the following formula:
  • Timeoffset ATS is the starting offset of the audio clock relative to the common clock.
  • sample_num(i) is the number of sampling points of the data packet.
  • f s is the sampling frequency.
  • BTS m can be determined according to the following formula:
  • Timeoffset BTS is the starting offset of the Bluetooth clock relative to the common clock.
  • Iso_interval(i) is the time between two consecutive anchor points.
  • the CIG to which the CIS established between the mobile phone and the left earplug and the right earplug of the TWS headset can include multiple CIG events (CIG_event), and the start time point of each CIG event is an anchor point.
  • CIG_event CIG events
  • the time between two consecutive anchor points can also be understood as the time between the starting time points of two consecutive CIG events.
  • the CIG synchronization point that is, SYNC_m_n
  • SYNC_m_n can be determined according to the audio timestamp and transmission delay of a data packet containing audio data with the Bluetooth clock as a reference, for example, such as Formula (2) shows.
  • ATS_m_n is the audio timestamp of the data packet containing audio data under the premise of taking the Bluetooth clock as a reference.
  • transport_delay is the transmission delay.
  • ATS_m_n can be determined according to the following formula (3).
  • formula (2) and formula (3) can be obtained: the CIG playback point of the audio data, that is, Render_m_n can be determined according to the following formula (4). According to formula (4), it is necessary to consider the synchronization of the audio clock and the synchronization of the Bluetooth clock when determining the above-mentioned CIG play point.
  • Render_m_n Init_BTS+transport_delay+ATS_n+Presentation_delay
  • Parameter (2) Presentation delay delay_delay.
  • Parameter (3) Bluetooth timestamp Init_BTS of the first data packet.
  • the transmission delay transport_delay and the playback delay Presentation_delay can be sent from the mobile phone to the left and right earplugs of the TWS headset when the mobile phone establishes a CIS with the left and right earplugs of the TWS headset.
  • the mobile phone may send the transmission delay transport_delay and the playback delay Presentation_delay to the left earplug in the process of establishing the CIS 1 with the left earplug, such as the air interface request message LL_CIS_REQ carried in step 601 to the left earplug.
  • the mobile phone may send the transmission delay transport_delay and the playback delay Presentation_delay to the right earplug in the process of establishing CIS 2 with the right earplug, for example, the air interface request message LL_CIS_REQ carried in step 604 is sent to the right earplug.
  • Init_BTS and ATS_n may be carried by the mobile phone in data packets transmitted to the left and right earplugs of the TWS headset.
  • the host of the mobile phone may add a packet header to the audio data after the encoding process.
  • the encoded audio data after adding the packet header may be called an encoded data packet, or called a load (playload).
  • the packet header may include ATS_n and Init_BTS. Taking the data packet as the nth data packet on the audio clock as an example, the audio time stamp of the data packet can be represented by ATS_n.
  • the host of the mobile phone can transmit the encoded data packet to the LL of the mobile phone.
  • the controller where the LL is located may add one or more fields in the above frame header, frame end, preamble, etc. to the coded data packet to obtain the data packet.
  • the structure of the data packet may be as shown in FIG. 8.
  • the data packet includes, in sequence, a preamble, a frame header, a packet header, audio data, and a frame tail.
  • the above Init_BTS can be expressed as an ISO event counter (ISO event counter).
  • the above ATS_n may be modulated by pulse code (pulse code modulation, PCM) sample (sample) to count, or, can also be counted in units of Bluetooth clock.
  • PCM pulse code modulation
  • the audio timestamp ATS represents the number of samples, and the value of ATS of each data packet is the sum of the number of sampling points of all previous data packets.
  • the ATS of the first data packet ie ATS_1
  • the ATS of the second data packet ie ATS_2
  • the ATS of the third data packet That is, ATS_3
  • the ATS of the nth data packet that is, ATS_n
  • the mobile phone can obtain the ATS (such as ATS_n) of the currently transmitted data according to the PCM sample count, and carry the left and right earplugs sent to the TWS headset in the data packet.
  • the left and right earplugs of the TWS earphone can calculate the audio time of each data packet.
  • the Init_BTS may not be carried by the mobile phone in a data packet to notify the left and right earplugs of the TWS headset. Instead, the left and right earplugs of the TWS headset are obtained based on the ISO event count (ISO event count) maintained by the TWS headset.
  • the mobile phone may be responsible for the maintenance of the ISO event, and may notify the left earplug and the right earplug of the TWS headset through an air interface message to ensure the synchronization of the ISO events of the left earplug and the right earplug of the TWS headset.
  • the mobile phone when the ISO establishes a CIS between the mobile phone and the left earplug and the right earplug of the TWS headset, the mobile phone sends the left earplug and the right earplug of the TWS headset through an air interface message, respectively.
  • the mobile phone may send the ISO event to the left earplug during the establishment of the CIS 1 with the left earplug, such as the air interface request message LL_CIS_IND carried in step 603 to the left earplug.
  • the mobile phone may send the ISO event to the right earplug during the establishment of the CIS 2 with the right earplug, for example, the air interface request message LL_CIS_IND carried in step 606 is sent to the right earplug.
  • the mobile phone can also send the indication value to the left and right earplugs of the TWS headset.
  • the left and right earplugs of the TWS headset can also maintain the ISO event according to the indication value.
  • the left and right earbuds of the TWS headset can obtain the Bluetooth timestamp of the first data packet on the Bluetooth clock according to the maintained ISO event, that is, Init_BTS.
  • the playback time (ie, CIG playback point) of the audio data contained in any data packet is unique and ATS_n, transport_delay and Presentation_delay are related.
  • ATS_n is decoupled from BTS_m when actually transmitting audio data, that is, decoupling of audio timestamp and Bluetooth timestamp is achieved.
  • timeoffset_m_n satisfies the above three conditions
  • step 609 may specifically include:
  • the LL of the left earplug can send the received data packet to the host of the left earplug through the HCI.
  • the host of the left earplug can parse the data packet to obtain Init_BTS and ATS_n carried in the packet header.
  • the host of the left earplug can calculate the CIG synchronization point of the data packet based on the Init_BTS and ATS_n carried in the data packet, and the transport_delay carried in the air interface request message LL_CIS_REQ.
  • the CIG playback point of the audio data can be determined.
  • the right earplug can also obtain the CIG playback point of the audio data after the above processing.
  • Step 611 The left earplug of the TWS earphone plays the audio data in the data packet according to the determined CIG play point.
  • Step 612 The right earplug of the TWS earphone plays the audio data in the data packet according to the determined CIG play point.
  • the audio data of the received data packets can be played at the determined CIG play point.
  • the CIG playback point and audio data can be transmitted to the DSP of the left earplug and the right earplug, and the DSP decodes the audio data to the CIG Play at the playback point.
  • the left earplug and right earplug of the TWS earphone can determine the CIG synchronization point and CIG playback point of audio data according to the synchronized Bluetooth clock and synchronized audio clock, and use the determined CIG playback point to realize the playback of audio data Level synchronization.
  • the Bluetooth clock and the audio clock are decoupled and synchronized independently, and no hardware clock synchronization of the Bluetooth clock and the audio clock is required.
  • the Bluetooth clock it is only necessary to carry the BTS of the first data packet in each data packet, that is, Init_BTS, and there is no need to obtain the BTS of each data packet to reduce the load.
  • each data packet is independently labeled.
  • a peripheral device is also provided.
  • the peripheral device is a Bluetooth headset, and the Bluetooth headset may include at least one earplug.
  • the earbuds of the Bluetooth headset may include: one or more processors 901; a memory 902; a communication interface 903; a receiver 904; a microphone 905; and one or more computer programs 906. Or multiple communication buses 907 are connected.
  • the one or more computer programs 906 are stored in the above-mentioned memory 902, and are configured to be executed by the one or more processors 901.
  • the one or more computer programs 906 include instructions, and the above instructions may be used to execute Each step performed by the earplug (such as the left earplug and the right earplug) in the corresponding embodiment of FIG. 6.
  • the earbuds of the Bluetooth headset shown in FIG. 9 may also include other devices such as sensors and the like, which are not limited in the embodiments of the present application.
  • the earplug shown in FIG. 9 further includes other devices such as sensors, it may be the earplug shown in FIG. 2.
  • the electronic device may include: a touch screen 1001, wherein the touch screen 1001 may include a touch-sensitive surface 1006 and a display screen 1007; one or more The processor 1002; the memory 1003; and one or more computer programs 1004.
  • the above devices may be connected through one or more communication buses 1005.
  • the one or more computer programs 1004 are stored in the above-mentioned memory 1003 and are configured to be executed by the one or more processors 1002.
  • the one or more computer programs 1004 include instructions, which can be used to execute Each step performed by the electronic device in the corresponding embodiment of FIG. 6.
  • FIG. 10 may also include other devices such as a sensor module, an audio module, and a SIM card interface, which is not limited in the embodiments of the present application.
  • the electronic device shown in FIG. 10 further includes other devices such as a sensor module, an audio module, and a SIM card interface, it may be the electronic device shown in FIG. 4.
  • This embodiment also provides a computer-readable storage medium including instructions.
  • the electronic device When the above instructions run on an electronic device, the electronic device causes the electronic device to perform the relevant method steps in FIG. 6 to implement the above The method in the examples.
  • This embodiment also provides a computer-readable storage medium including instructions.
  • the earphone of the Bluetooth headset executes the relevant method steps in FIG. 6 To implement the method in the above embodiment.
  • This embodiment also provides a computer program product containing instructions.
  • the computer program product runs on an electronic device, the electronic device is caused to execute relevant method steps as shown in FIG. 6 to implement the method in the above embodiment.
  • This embodiment also provides a computer program product containing instructions.
  • the computer program product runs on the earphone of the Bluetooth headset, the earphone of the Bluetooth headset executes the relevant method steps shown in FIG. 6 to implement the above embodiment The method.
  • the control device includes a processor and a memory.
  • the memory is used to store computer program code.
  • the computer program code includes computer instructions.
  • the control device executes the relevant method steps as shown in FIG. 6 to implement the method in the above embodiment.
  • the control device may be an integrated circuit IC or a system-on-chip SOC.
  • the integrated circuit may be a general-purpose integrated circuit, a field programmable gate array FPGA, or an application-specific integrated circuit ASIC.
  • This embodiment also provides a device for synchronizing audio data.
  • the device has a function of realizing the earplug behavior of an electronic device or a Bluetooth headset in the above method.
  • the function can be realized by hardware, or can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the electronic device, the earbud of the Bluetooth headset, the computer storage medium, the computer program product, the control device, or the audio data synchronization device provided in this embodiment are all used to execute the corresponding method provided above, therefore, it can achieve
  • the beneficial effects please refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules or units is only a division of logical functions.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each of the embodiments of this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of this embodiment essentially or part of the contribution to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium
  • several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in the various embodiments.
  • the foregoing storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Abstract

Disclosed are an audio data synchronization method and device, which relate to the field of short-distance communications. When a wireless connection is established between a mobile phone and a plurality of Bluetooth devices, play-level synchronization of audio data between the plurality of Bluetooth devices is realized. The method comprises: an electronic device sending, by means of a first CIS of a CIG, a data packet to a first earbud that establishes a wireless connection with the electronic device, and sending, by means of a second CIS of the CIG, the data packet to a second earbud that establishes a wireless connection with the electronic device, wherein the data packet comprises: audio data, an audio timestamp of the data packet and an initial Bluetooth timestamp; the initial Bluetooth timestamp is a Bluetooth timestamp of a first data packet transmitted after the electronic device establishes the first CIS with the first earbud and establishes the second CIS with the second earbud; the audio timestamp and the initial Bluetooth timestamp are used for the first earbud and the second earbud to determine a CIG play point; and the CIG play point is a time point at which the first earbud and the second earbud play the audio data.

Description

音频数据的同步方法及设备Audio data synchronization method and equipment 技术领域Technical field
本申请涉及短距离通信领域,尤其涉及一种音频数据的同步方法及设备。The present application relates to the field of short-range communications, and in particular to a method and device for synchronizing audio data.
背景技术Background technique
蓝牙(Bluetooth)是一种无线技术标准,其可实现不同设备之间的短距离数据交互。如手机可以开启蓝牙模块与蓝牙耳机进行短距离数据交互,以将蓝牙耳机作为手机的音频输入/输出设备实现通话、音乐播放等功能。Bluetooth (Bluetooth) is a wireless technology standard that enables short-range data interaction between different devices. For example, the mobile phone can turn on the Bluetooth module and perform short-range data interaction with the Bluetooth headset to use the Bluetooth headset as the audio input/output device of the mobile phone to implement functions such as calling and music playback.
而在手机与多个(两个或两个以上)蓝牙设备建立了无线连接时,这多个蓝牙设备之间可能有实现音频数据的播放级同步的需求。When a mobile phone establishes a wireless connection with multiple (two or more) Bluetooth devices, there may be a need to achieve playback-level synchronization of audio data between the multiple Bluetooth devices.
发明内容Summary of the invention
本申请的目的在于提供一种音频数据的同步方法及设备,在手机与多个蓝牙设备建立了无线连接时,实现了多个蓝牙设备之间音频数据的播放级同步。The purpose of the present application is to provide a method and device for synchronizing audio data. When a wireless connection is established between a mobile phone and multiple Bluetooth devices, playback level synchronization of audio data between multiple Bluetooth devices is achieved.
上述目标和其他目标将通过独立权利要求中的特征来达成。进一步的实现方式在从属权利要求、说明书和附图中体现。The above and other objectives will be achieved by the features in the independent claims. Further implementations are reflected in the dependent claims, the description and the drawings.
第一方面,提供一种音频数据的同步方法,该方法可以应用于电子设备,该电子设备可以与第一耳塞和第二耳塞分别建立无线连接;该方法可以包括:电子设备通过基于连接的等时流组(connected isochronous group,CIG)的第一基于连接的等时音频流(connected isochronous stream,CIS),向第一耳塞发送数据包,通过CIG的第二CIS,向第二耳塞发送该数据包;其中,该数据包中可以包括:音频数据,该数据包的音频时间戳,以及初始蓝牙时间戳。初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS,与第二耳塞建立第二CIS后传输的第一个数据包的蓝牙时间戳;音频时间戳和初始蓝牙时间戳用于第一耳塞和第二耳塞确定CIG播放点,CIG播放点是第一耳塞和第二耳塞播放数据包中的音频数据的时间点。In a first aspect, a method for synchronizing audio data is provided. The method can be applied to an electronic device that can establish a wireless connection with a first earplug and a second earplug, respectively; the method can include: The first isochronous stream (connected, isochronous stream, CIS) of the connected isochronous group (CIG) sends a data packet to the first earbud, and sends the data to the second earbud through the second CIS of the CIG Packet; wherein, the data packet may include: audio data, an audio time stamp of the data packet, and an initial Bluetooth time stamp. The initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud, and establishes the second CIS with the second earbud; the audio timestamp and the initial Bluetooth timestamp are used for the first earbud Determine the CIG play point with the second earplug, and the CIG playpoint is the time point when the first earplug and the second earplug play the audio data in the data packet.
其中,上述电子设备可以是手机等设备,上述第一耳塞和上述第二耳塞分别可以是蓝牙耳机,如真无线立体声(true wireless stereo,TWS)耳机的左耳塞和右耳塞。另外,上述第一耳塞和第二耳塞也可以分别替换为两个其他蓝牙设备。这两个蓝牙设备的设备形态可以相同(如两个无线音箱),也可以不同(如一个无线音箱,一个无线耳机)。Wherein, the above-mentioned electronic device may be a device such as a mobile phone, and the above-mentioned first earplug and the above-mentioned second earplug may be Bluetooth earphones, such as the left earplug and the right earplug of a true wireless stereo (TWS) headset, respectively. In addition, the first earplug and the second earplug may be replaced with two other Bluetooth devices, respectively. The device shape of the two Bluetooth devices can be the same (such as two wireless speakers) or different (such as one wireless speaker and one wireless headset).
采用该技术方案,电子设备通过向两个蓝牙设备,如第一耳塞和第二耳塞发送携带该数据包的音频时间戳,以及初始蓝牙时间戳的数据包,使得第一耳塞和第二耳塞可以根据音频时间戳和初始蓝牙时间戳确定出数据包中音频数据的播放时间点,即CIG播放点。数据包中的音频时间戳和初始蓝牙时间戳能够确保蓝牙时钟的同步和音频时钟的同步。也就是说,第一耳塞和第二耳塞能够根据同步的蓝牙时钟和同步音频时钟确定出音频数据的CIG播放点。这样,利用确定出的CIG播放点实现了音频数据的播放级同步。另外,在本实施例中,蓝牙时钟和音频时钟是解耦独立进行同步的, 不需要蓝牙时钟和音频时钟的硬件时钟同步。对于蓝牙时钟,只需在每个数据包中携带第一个数据包的BTS,即初始蓝牙时间戳,不需要获取每个数据包的BTS,减少负载。对应音频时钟,每个数据包是进行独立标注的,因此,在实现音频数据的播放级同步的同时,还可以支持每个数据包的独立播放。这样,本实施例的技术方案可以适用于单耳塞单独使用,双耳塞同时使用,以及单耳双耳切换等场景中。With this technical solution, the electronic device sends the audio time stamp carrying the data packet and the initial Bluetooth time stamp data packet to the two Bluetooth devices, such as the first earbud and the second earbud, so that the first earbud and the second earbud can According to the audio timestamp and the initial Bluetooth timestamp, the playback time point of the audio data in the data packet is determined, that is, the CIG playback point. The audio timestamp and initial Bluetooth timestamp in the data packet can ensure the synchronization of the Bluetooth clock and the audio clock. In other words, the first earplug and the second earplug can determine the CIG play point of the audio data according to the synchronized Bluetooth clock and the synchronized audio clock. In this way, the play level synchronization of audio data is realized by using the determined CIG play point. In addition, in this embodiment, the Bluetooth clock and the audio clock are decoupled and synchronized independently, and the hardware clock synchronization of the Bluetooth clock and the audio clock is not required. For the Bluetooth clock, it is only necessary to carry the BTS of the first data packet in each data packet, that is, the initial Bluetooth time stamp, and it is not necessary to obtain the BTS of each data packet to reduce the load. Corresponding to the audio clock, each data packet is independently labeled. Therefore, while achieving playback-level synchronization of audio data, it can also support independent playback of each data packet. In this way, the technical solution of this embodiment can be applied to scenarios where single earplugs are used alone, both earplugs are used simultaneously, and single ear and binaural switching is performed.
在一些实施例中,在单耳使用(如使用第一耳塞)的场景下,电子设备可以通过CIG的第一CIS,向第一耳塞发送第一数据包,该第一数据包中可以包括:音频数据,该第一数据包的音频时间戳,以及初始蓝牙时间戳。初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS后传输的第一个数据包的蓝牙时间戳;第一数据包的音频时间戳和初始蓝牙时间戳可以用于第一耳塞确定CIG播放点,CIG播放点是第一耳塞播放第一数据包中的音频数据的时间点。In some embodiments, in the scenario of single ear use (eg, using the first earplug), the electronic device may send a first data packet to the first earplug through the first CIS of CIG, and the first data packet may include: Audio data, audio timestamp of the first data packet, and initial Bluetooth timestamp. The initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud; the audio timestamp and initial Bluetooth timestamp of the first data packet can be used for the first earbud to determine CIG playback Point, the CIG play point is the time point when the first earbud plays the audio data in the first data packet.
在单耳使用转换为双耳使用的场景后,电子设备不仅可以通过CIG的第一CIS,向第一耳塞发送第二数据包,还可以通过CIG的第二CIS,向第二耳塞发送第二数据包,该第二数据包中可以包括:音频数据,该第二数据包的音频时间戳,以及初始蓝牙时间戳。第二数据包的音频时间戳和初始蓝牙时间戳可以用于第一耳塞和第二耳塞确定CIG播放点,CIG播放点是第一耳塞和第二耳塞播放第二数据包中音频数据的时间点。In the scenario where one ear is converted to two ears, the electronic device can not only send the second data packet to the first earplug through the first CIS of CIG, but also send the second data packet to the second earplug through the second CIS of CIG. A data packet, the second data packet may include: audio data, an audio time stamp of the second data packet, and an initial Bluetooth time stamp. The audio timestamp and initial Bluetooth timestamp of the second data packet can be used to determine the CIG playback point of the first earplug and the second earplug, and the CIG playback point is the time point at which the first earplug and the second earplug play the audio data in the second data packet .
也就是说,在本实施例中,电子设备可以对每个数据包计算该数据包的音频时间戳,并携带在该数据包中通知给第一耳塞和/或第二耳塞。That is to say, in this embodiment, the electronic device may calculate the audio timestamp of the data packet for each data packet, and carry it in the data packet to notify the first earplug and/or the second earplug.
在一种可能的实现方式中,在电子设备通过CIG的第一CIS,向第一耳塞发送数据包,通过CIG的第二CIS,向第二耳塞发送数据包之前,该方法还可以包括:电子设备与第一耳塞建立CIG的第一CIS,与第二耳塞建立CIG的第二CIS。In a possible implementation, before the electronic device sends a data packet to the first earplug through the first CIS of CIG, and sends a data packet to the second earplug through the second CIS of CIG, the method may further include: The device establishes the CIG's first CIS with the first earplug and the CIG's second CIS with the second earplug.
在另一种可能的实现方式中,电子设备与第一耳塞建立CIG的第一CIS,与第二耳塞建立CIG的第二CIS,具体可以包括:电子设备向第一耳塞发送CIS建立请求消息,接收第一耳塞发送的CIS建立响应消息,向第一耳塞发送CIS建立消息;电子设备向第二耳塞发送CIS建立请求消息,接收第二耳塞发送的CIS建立响应消息,向第二耳塞发送CIS建立消息;其中,CIS建立请求消息包括传输时延和播放时延,传输时延和播放时延用于第一耳塞和第二耳塞确定CIG播放点。In another possible implementation manner, the electronic device establishes the first CIS of the CIG with the first earplug and the second CIS of the CIG with the second earplug, which may specifically include: the electronic device sends a CIS establishment request message to the first earplug, Receive the CIS establishment response message sent by the first earbud, send the CIS establishment message to the first earbud; the electronic device sends the CIS establishment request message to the second earbud, receive the CIS establishment response message sent by the second earbud, and send the CIS establishment to the second earbud Message; wherein, the CIS establishment request message includes transmission delay and playback delay, and the transmission delay and playback delay are used for the first earplug and the second earplug to determine the CIG play point.
在另一种可能的实现方式中,在电子设备与第一耳塞建立CIG的第一CIS,与第二耳塞建立CIG的第二CIS之前,该方法还可以包括:电子设备分别与第一耳塞和第二耳塞进行配对;电子设备与第一耳塞建立第一异步面向连接(asynchronous connection-oriented link,ACL)链路;电子设备与第二耳塞建立第二ACL链路;电子设备与第一耳塞建立CIG的第一CIS,与第二耳塞建立CIG的第二CIS,具体可以包括:电子设备通过第一ACL链路与第一耳塞建立CIG的第一CIS,通过第二ACL链路与第二耳塞建立CIG的第二CIS。In another possible implementation manner, before the electronic device establishes the first CIS of the CIG with the first earplug and the second CIS of the CIG with the second earplug, the method may further include: the electronic device and the first earplug respectively Pair the second earbuds; the electronic device establishes a first asynchronous connection-oriented (ACL) link with the first earbud; the electronic device establishes a second ACL link with the second earbud; the electronic device establishes with the first earbud The first CIS of CIG establishes the second CIS of CIG with the second earplug, which may specifically include: the electronic device establishes the first CIS of CIG with the first earplug through the first ACL link, and the second earplug through the second ACL link Established CIG's second CIS.
在另一种可能的实现方式中,数据包的音频时间戳与数据包的蓝牙时间戳之间的时间偏移满足以下条件中的至少一个:小于或等于传输时延,小于或等于播放时延,小于或等于传输时延与播放时延之和。这样,可以保证音频数据在播放级别的连续性。In another possible implementation, the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet meets at least one of the following conditions: less than or equal to the transmission delay, and less than or equal to the playback delay , Less than or equal to the sum of transmission delay and playback delay. In this way, the continuity of audio data at the playback level can be guaranteed.
第二方面,提供一种音频数据的同步方法,应用于与电子设备建立无线连接的第 一耳塞和第二耳塞,该方法可以包括:第一耳塞通过CIG的第一CIS,接收来自电子设备的数据包;第二耳塞通过CIG的第二CIS,接收来自电子设备的数据包;该数据包可以包括:音频数据,数据包的音频时间戳,以及初始蓝牙时间戳,初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS,与第二耳塞建立第二CIS后传输的第一个数据包的蓝牙时间戳;第一耳塞和第二耳塞分别根据音频时间戳,初始蓝牙时间戳,传输时延和播放时延确定CIG播放点;第一耳塞和第二耳塞分别在CIG播放点播放数据包中的音频数据。In a second aspect, a method for synchronizing audio data is provided, which is applied to a first earplug and a second earplug that establish a wireless connection with an electronic device. The method may include: the first earplug receives a first CIS from the electronic device through the first CIS of the CIG The data packet; the second earplug receives the data packet from the electronic device through the second CIS of CIG; the data packet may include: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is for the electronic device Establish the first CIS with the first earbud, and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earbud; the first earbud and the second earbud are based on the audio timestamp, the initial Bluetooth timestamp, and the transmission time The delay and playback delay determine the CIG playback point; the first earplug and the second earplug respectively play the audio data in the data packet at the CIG playback point.
在一些实施例中,上述第一耳塞和上述第二耳塞分别可以是蓝牙耳机(如TWS耳机)的左耳塞和右耳塞。另外,上述第一耳塞和第二耳塞也可以分别替换为两个其他蓝牙设备。这两个蓝牙设备的设备形态可以相同(如两个无线音箱),也可以不同(如一个无线音箱,一个无线耳机)。In some embodiments, the first earplug and the second earplug may be a left earplug and a right earplug of a Bluetooth headset (such as a TWS headset), respectively. In addition, the first earplug and the second earplug may be replaced with two other Bluetooth devices, respectively. The device shape of the two Bluetooth devices can be the same (such as two wireless speakers) or different (such as one wireless speaker and one wireless headset).
采用该技术方案,两个蓝牙设备,如第一耳塞和第二耳塞分别接收来自电子设备的数据包,该数据包中携带有该数据包的音频时间戳,以及初始蓝牙时间戳,第一耳塞和第二耳塞可以根据音频时间戳和初始蓝牙时间戳确定出数据包中音频数据的播放时间点,即CIG播放点。数据包中的音频时间戳和初始蓝牙时间戳能够确保蓝牙时钟的同步和音频时钟的同步。也就是说,第一耳塞和第二耳塞能够根据同步的蓝牙时钟和同步音频时钟确定出音频数据的CIG播放点。这样,利用确定出的CIG播放点实现了音频数据的播放级同步。另外,在本实施例中,蓝牙时钟和音频时钟是解耦独立进行同步的,不需要蓝牙时钟和音频时钟的硬件时钟同步。对于蓝牙时钟,只需在每个数据包中携带第一个数据包的BTS,即初始蓝牙时间戳,不需要获取每个数据包的BTS,减少负载。对应音频时钟,每个数据包是进行独立标注的,因此,在实现音频数据的播放级同步的同时,还可以支持每个数据包的独立播放。这样,本实施例的技术方案可以适用于单耳塞单独使用,双耳塞同时使用,以及单耳双耳切换等场景中。With this technical solution, two Bluetooth devices, such as the first earplug and the second earplug, respectively receive data packets from the electronic device, and the data packet carries the audio timestamp of the data packet, and the initial Bluetooth timestamp, the first earplug And the second earbud can determine the playing time point of the audio data in the data packet according to the audio timestamp and the initial Bluetooth timestamp, that is, the CIG playing point. The audio timestamp and initial Bluetooth timestamp in the data packet can ensure the synchronization of the Bluetooth clock and the audio clock. In other words, the first earplug and the second earplug can determine the CIG play point of the audio data according to the synchronized Bluetooth clock and the synchronized audio clock. In this way, the play level synchronization of audio data is realized by using the determined CIG play point. In addition, in this embodiment, the Bluetooth clock and the audio clock are decoupled and synchronized independently, and no hardware clock synchronization of the Bluetooth clock and the audio clock is required. For the Bluetooth clock, it is only necessary to carry the BTS of the first data packet in each data packet, that is, the initial Bluetooth time stamp, and it is not necessary to obtain the BTS of each data packet to reduce the load. Corresponding to the audio clock, each data packet is independently labeled. Therefore, while achieving playback-level synchronization of audio data, it can also support independent playback of each data packet. In this way, the technical solution of this embodiment can be applied to scenarios where single earplugs are used alone, both earplugs are used simultaneously, and single ear and binaural switching is performed.
在一些实施例中,在单耳使用(如使用第一耳塞)的场景下,第一耳塞可以通过CIG的第一CIS,接收来自电子设备的第一数据包,该第一数据包中可以包括:音频数据,该第一数据包的音频时间戳,以及初始蓝牙时间戳。初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS后传输的第一个数据包的蓝牙时间戳;第一耳塞可以根据第一数据包的音频时间戳和初始蓝牙时间戳确定CIG播放点,第一耳塞可以在CIG播放点播放第一数据包中的音频数据。In some embodiments, in the scenario of single ear use (eg, using the first earplug), the first earplug may receive the first data packet from the electronic device through the first CIS of CIG, and the first data packet may include : Audio data, audio timestamp of the first data packet, and initial Bluetooth timestamp. The initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud; the first earbud can determine the CIG playback point according to the audio timestamp of the first data packet and the initial Bluetooth timestamp , The first earplug can play the audio data in the first data packet at the CIG play point.
在单耳使用转换为双耳使用的场景后,不仅第一耳塞可以通过CIG的第一CIS,接收来自电子设备的第二数据包,第二耳塞也可以通过CIG的第二CIS,接收来自电子设备的第二数据包,该第二数据包中可以包括:音频数据,该第二数据包的音频时间戳,以及初始蓝牙时间戳。第一耳塞和第二耳塞可以分别根据第二数据包的音频时间戳和初始蓝牙时间戳确定CIG播放点,第一耳塞和第二耳塞可以分别在CIG播放点播放第二数据包中的音频数据。In the scenario where one ear is converted to two ears, not only the first earplug can receive the second data packet from the electronic device through the CIG’s first CIS, the second earplug can also receive the electronic data through the CIG’s second CIS A second data packet of the device. The second data packet may include: audio data, an audio time stamp of the second data packet, and an initial Bluetooth time stamp. The first earplug and the second earplug can determine the CIG playback point according to the audio timestamp and the initial Bluetooth timestamp of the second data packet, respectively, and the first earplug and the second earplug can play the audio data in the second data packet at the CIG playback point, respectively .
在一种可能的实现方式中,在第一耳塞通过CIG的第一CIS,接收来自电子设备的数据包,第二耳塞通过CIG的第二CIS,接收来自电子设备的数据包之前,该方法还可以包括:第一耳塞与电子设备建立CIG的第一CIS,第二耳塞与电子设备建立CIG的第二CIS。In a possible implementation manner, before the first earplug receives the data packet from the electronic device through the first CIS of CIG, and the second earplug receives the data packet from the electronic device through the second CIS of CIG, the method It may include: the first earplug and the electronic device establish a CIG first CIS, and the second earplug and the electronic device establish a CIG second CIS.
在另一种可能的实现方式中,第一耳塞与电子设备建立CIG的第一CIS,第二耳塞与电子设备建立CIG的第二CIS,具体可以包括:第一耳塞接收来自电子设备的CIS建立请求消息,向电子设备发送CIS建立响应消息,接收来自电子设备的CIS建立消息;第二耳塞接收来自电子设备的CIS建立请求消息,向电子设备发送CIS建立响应消息,接收来自电子设备的CIS建立消息;其中,CIS建立请求消息包括传输时延和播放时延。In another possible implementation manner, the first earplug and the electronic device establish a CIG first CIS, and the second earplug and the electronic device establish a CIG second CIS, which may specifically include: the first earplug receives the CIS establishment from the electronic device Request message, send CIS establishment response message to the electronic device, receive CIS establishment message from the electronic device; second earbuds receive CIS establishment request message from the electronic device, send CIS establishment response message to the electronic device, receive CIS establishment message from the electronic device Message; Among them, CIS establishment request message includes transmission delay and play delay.
在另一种可能的实现方式中,在第一耳塞与电子设备建立CIG的第一CIS,第二耳塞与电子设备建立CIG的第二CIS之前,该方法还可以包括:第一耳塞和第二耳塞分别与电子设备进行配对;第一耳塞与电子设备建立第一ACL链路;第二耳塞与电子设备建立第二ACL链路;第一耳塞与电子设备建立CIG的第一CIS,第二耳塞与电子设备建立CIG的第二CIS,具体可以包括:第一耳塞通过第一ACL链路与电子设备建立CIG的第一CIS,第二耳塞通过第二ACL链路与电子设备建立CIG的第二CIS。In another possible implementation manner, before the first earplug establishes the first CIS of the CIG with the electronic device, and the second earplug establishes the second CIS of the CIG with the electronic device, the method may further include: the first earplug and the second The earplugs are paired with the electronic device; the first earplug and the electronic device establish a first ACL link; the second earplug and the electronic device establish a second ACL link; the first earplug and the electronic device establish a CIG first CIS, and the second earplug Establishing the second CIS of the CIG with the electronic device may specifically include: establishing the first CIS of the CIG with the electronic device through the first ACL link, and establishing the second of the CIG with the electronic device through the second ACL link CIS.
在另一种可能的实现方式中,数据包的音频时间戳与数据包的蓝牙时间戳之间的时间偏移满足以下条件中的至少一个:小于或等于传输时延,小于或等于播放时延,小于或等于传输时延与播放时延之和。这样,可以保证音频数据在播放级别的连续性。In another possible implementation, the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet meets at least one of the following conditions: less than or equal to the transmission delay, and less than or equal to the playback delay , Less than or equal to the sum of transmission delay and playback delay. In this way, the continuity of audio data at the playback level can be guaranteed.
在另一种可能的实现方式中,第一耳塞和第二耳塞分别根据音频时间戳,初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,具体可以包括:第一耳塞根据音频时间戳,初始蓝牙时间戳和传输时延确定CIG同步点,第一耳塞根据确定的CIG同步点和播放时延确定CIG播放点;第二耳塞根据音频时间戳,初始蓝牙时间戳和传输时延确定CIG同步点,第一耳塞根据确定的CIG同步点和播放时延确定CIG播放点。在一种可能的实现方式中,根据音频时间戳,初始蓝牙时间戳和传输时延确定CIG同步点,具体的可以包括:SYNC_m_n=Init_BTS+ATS_n+transport_delay。其中,SYNC_m_n为CIG同步点,Init_BTS为初始蓝牙时间戳,ATS_n为音频时间戳,transport_delay为传输时延,m表示包含该数据包是蓝牙时钟上的第m个数据包,n表示该数据包是音频时钟上的第n个数据包。根据确定的CIG同步点和播放时延确定CIG播放点,具体的可以包括:Render_m_n=SYNC_m_n+Presentation_delay。其中,Render_m_n为CIG播放点,Presentation_delay为播放时延。In another possible implementation manner, the first earplug and the second earplug respectively determine the CIG play point according to the audio timestamp, the initial Bluetooth timestamp, the transmission delay, and the playback delay, which may specifically include: the first earplug according to the audio time Poke, initial Bluetooth timestamp and transmission delay determine the CIG synchronization point, the first earbud determines the CIG playback point based on the determined CIG synchronization point and playback delay; the second earbud determines the audio Bluetooth timestamp, initial Bluetooth timestamp and transmission delay CIG synchronization point, the first earplug determines the CIG playback point according to the determined CIG synchronization point and playback delay. In a possible implementation, the CIG synchronization point is determined according to the audio timestamp, the initial Bluetooth timestamp, and the transmission delay, which may specifically include: SYNC_m_n=Init_BTS+ATS_n+transport_delay. Among them, SYNC_m_n is the CIG synchronization point, Init_BTS is the initial Bluetooth timestamp, ATS_n is the audio timestamp, transport_delay is the transmission delay, m indicates that the packet is the mth packet on the Bluetooth clock, and n indicates that the packet is The nth packet on the audio clock. The CIG playback point is determined according to the determined CIG synchronization point and playback delay, which may specifically include: Render_m_n=SYNC_m_n+Presentation_delay. Among them, Render_m_n is the CIG playback point, and Presentation_delay is the playback delay.
在另一种可能的实现方式中,上述根据音频时间戳,初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,具体可以包括:根据Render_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delay确定CIG播放点。In another possible implementation manner, the above-mentioned determination of the CIG playback point according to the audio timestamp, initial Bluetooth timestamp, transmission delay and playback delay may specifically include: determining CIG playback according to Render_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delay point.
第三方面,提供一种电子设备,该电子设备可以包括:一个或多个处理器、存储器、无线通信模块以及移动通信模块;其中:存储器、无线通信模块以及移动通信模块与一个或多个处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行该计算机指令时,电子设备可以执行如第一方面或第一方面的可能的实现方式中任一项所述的音频数据的同步方法。In a third aspect, an electronic device is provided. The electronic device may include: one or more processors, a memory, a wireless communication module, and a mobile communication module; wherein: the memory, the wireless communication module, the mobile communication module, and one or more processes Is coupled to a memory, and the memory is used to store computer program code. The computer program code includes computer instructions. When one or more processors execute the computer instructions, the electronic device may perform any one of the first aspect or any possible implementation manner of the first aspect. A method for synchronizing audio data.
第四方面,提供一种蓝牙耳机,该蓝牙耳机可以包括至少一个耳塞;该耳塞可以包括:处理器、存储器、无线通信模块、受话器以及麦克风;存储器、无线通信模块、受话器以及麦克风与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令;当处理器执行计算机指令时,耳塞可以执行如第二方面或第二方面 的可能的实现方式中任一项所述的音频数据的同步方法。例如,该蓝牙耳机包括两个耳塞,如称为第一耳塞和第二耳塞,第一耳塞和第二耳塞可以执行如第二方面或第二方面的可能的实现方式中任一项所述的音频数据的同步方法。According to a fourth aspect, a Bluetooth headset is provided. The Bluetooth headset may include at least one earphone; the earphone may include: a processor, a memory, a wireless communication module, a receiver, and a microphone; a memory, a wireless communication module, a receiver, and a microphone are coupled to the processor , The memory is used to store computer program code, the computer program code includes computer instructions; when the processor executes the computer instructions, the earplugs can execute the audio data described in any one of the second aspect or any possible implementation manner of the second aspect Synchronization method. For example, the Bluetooth headset includes two earplugs, such as the first earplug and the second earplug, and the first earplug and the second earplug may perform any one of the second aspect or any possible implementation manner of the second aspect. Synchronization method of audio data.
第五方面,提供一种蓝牙音频系统,该蓝牙音频系统可以包括:电子设备,第一耳塞以及第二耳塞;其中:电子设备可以用于通过CIG的第一CIS,向第一耳塞发送数据包,通过CIG的第二CIS,向第二耳塞发送数据包;该数据包可以包括:音频数据,该数据包的音频时间戳,以及初始蓝牙时间戳,初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS,与第二耳塞建立第二CIS后传输的第一个数据包的蓝牙时间戳;第一耳塞可以用于接收数据包,根据数据包中的音频时间戳和初始蓝牙时间戳,以及传输时延和播放时延确定CIG播放点,在确定出的CIG播放点播放接收到的数据包中的音频数据;第二耳塞可以用于接收数据包,根据数据包中的音频时间戳和初始蓝牙时间戳,以及传输时延和播放时延确定CIG播放点,在确定出的CIG播放点播放接收到的数据包中的音频数据。According to a fifth aspect, a Bluetooth audio system is provided. The Bluetooth audio system may include: an electronic device, a first earplug, and a second earplug; wherein: the electronic device may be used to send a data packet to the first earplug through the first CIS of CIG , Sending a data packet to the second earbud through the second CIS of CIG; the data packet may include: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is the electronic device and the first earbud Establish the first CIS, and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earplug; the first earplug can be used to receive the data packet, according to the audio timestamp and the initial Bluetooth timestamp in the data packet, And the transmission delay and playback delay to determine the CIG playback point, and play the audio data in the received data packet at the determined CIG playback point; the second earplug can be used to receive the data packet, according to the audio timestamp and The initial Bluetooth timestamp, transmission delay and playback delay determine the CIG playback point, and the audio data in the received data packet is played at the determined CIG playback point.
第六方面,提供一种蓝牙芯片,该蓝牙芯片可以应用于电子设备;该蓝牙芯片可以包括存储器,处理器和射频模块,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令;其中:处理器执行存储器存储的计算机指令控制射频模块通过CIG的第一CIS,向第一耳塞发送数据包,通过CIG的第二CIS,向第二耳塞发送数据包;其中,数据包可以包括:音频数据,数据包的音频时间戳,以及初始蓝牙时间戳,初始蓝牙时间戳为电子设备与第一耳塞建立第一CIS,与第二耳塞建立第二CIS后传输的第一个数据包的蓝牙时间戳;音频时间戳和初始蓝牙时间戳用于第一耳塞和第二耳塞确定CIG播放点,CIG播放点是第一耳塞和第二耳塞播放数据包中的音频数据的时间点。In a sixth aspect, a Bluetooth chip is provided, which can be applied to electronic devices; the Bluetooth chip can include a memory, a processor, and a radio frequency module, and the memory is used to store computer program code, and the computer program code includes computer instructions; wherein: processing The computer executes computer instructions stored in the memory to control the radio frequency module to send a data packet to the first earplug through the first CIS of CIG and a data packet to the second earplug through the second CIS of CIG; wherein, the data packet may include: audio data, The audio timestamp of the data packet and the initial Bluetooth timestamp. The initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the electronic device establishes the first CIS with the first earbud and establishes the second CIS with the second earbud; The audio timestamp and the initial Bluetooth timestamp are used by the first earplug and the second earplug to determine the CIG playback point, and the CIG playback point is the time point at which the first earplug and the second earplug play the audio data in the data packet.
第七方面,提供一种蓝牙芯片,该蓝牙芯片可以应用于蓝牙耳机的耳塞;蓝牙芯片包括存储器,处理器和射频模块,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令;处理器执行存储器存储的计算机指令控制射频模块通过CIG的CIS,接收来自电子设备的数据包;其中,该数据包可以包括:音频数据,数据包的音频时间戳,以及初始蓝牙时间戳,初始蓝牙时间戳为CIS建立后传输的第一个数据包的蓝牙时间戳;根据音频时间戳,初始蓝牙时间戳,传输时延和播放时延确定CIG播放点;以便该蓝牙耳机的耳塞的麦克风可以在CIG播放点播放数据包中的音频数据。In a seventh aspect, a Bluetooth chip is provided, which can be applied to the earbuds of a Bluetooth headset; the Bluetooth chip includes a memory, a processor, and a radio frequency module, and the memory is used to store computer program code, and the computer program code includes computer instructions; the processor executes The computer instructions stored in the memory control the radio frequency module to receive the data packet from the electronic device through the CIG CIS; wherein, the data packet may include: audio data, audio time stamp of the data packet, and initial Bluetooth time stamp, the initial Bluetooth time stamp is The Bluetooth timestamp of the first data packet transmitted after the CIS is established; the CIG playback point is determined based on the audio timestamp, initial Bluetooth timestamp, transmission delay and playback delay; so that the microphone of the earbud of the Bluetooth headset can be at the CIG playback point Play audio data in the packet.
第八方面,提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面或第一方面的可能的实现方式中任一项所述的音频数据的同步方法。According to an eighth aspect, a computer storage medium is provided, including computer instructions, which, when run on an electronic device, cause the electronic device to perform audio as described in any one of the first aspect or any possible implementation manner of the first aspect Data synchronization method.
第九方面,提供一种计算机存储介质,包括计算机指令,当计算机指令在蓝牙耳机的耳塞上运行时,使得耳塞执行如第二方面或第二方面的可能的实现方式中任一项所述的音频数据的同步方法。In a ninth aspect, a computer storage medium is provided, including computer instructions, which when executed on an earbud of a Bluetooth headset, causes the earbud to perform any one of the second aspect or any possible implementation manner of the second aspect Synchronization method of audio data.
第十方面,提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一项音频数据的同步方法。According to a tenth aspect, there is provided a computer program product which, when the computer program product runs on a computer, causes the computer to execute any one of the above audio data synchronization methods.
第十一方面,提供一种音频数据的同步装置,该音频数据的同步装置可以包含在电子设备中,该装置具有实现上述第一方面以及第一方面的可能实现方式中任一方法 中电子设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,发送模块或单元、处理模块或单元、接收模块或单元等。According to an eleventh aspect, there is provided a device for synchronizing audio data. The device for synchronizing audio data may be included in an electronic device, and the device has the electronic device in any of the methods for implementing the first aspect and the possible implementation manners of the first aspect. Behavioral function. The function can be realized by hardware, or can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a sending module or unit, a processing module or unit, a receiving module or unit, etc.
第十二方面,提供另一种音频数据的同步装置,该音频数据的同步装置可以包含在蓝牙耳机的耳塞中,该装置具有实现上述第二方面以及第二方面的可能实现方式中任一方法中蓝牙耳机的耳塞(如,上述第一耳塞或上述第二耳塞)行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,接收模块或单元、处理模块或单元、播放模块或单元、发送模块或单元等。According to a twelfth aspect, another apparatus for synchronizing audio data is provided. The apparatus for synchronizing audio data may be included in an earplug of a Bluetooth headset. The apparatus has any method for implementing the second aspect and the possible implementation manners of the second aspect. The function of the earplugs of the Bluetooth headset (for example, the first earplug or the second earplug). The function can be realized by hardware, or can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a receiving module or unit, a processing module or unit, a playing module or unit, a sending module or unit, etc.
应当理解的是,本实施例中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。It should be understood that the description of technical features, technical solutions, beneficial effects, or similar language in this embodiment does not imply that all features and advantages can be achieved in any single embodiment. On the contrary, it can be understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can also be combined in any suitable manner. Those skilled in the art will understand that the embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of the specific embodiments. In other embodiments, additional technical features and beneficial effects may also be identified in specific embodiments that do not reflect all the embodiments.
附图说明BRIEF DESCRIPTION
图1为一实施例提供的一种蓝牙音频系统的架构示意图;1 is a schematic structural diagram of a Bluetooth audio system provided by an embodiment;
图2为一实施例提供的一种TWS耳机的耳塞的结构示意图;2 is a schematic structural diagram of an earplug of a TWS earphone provided by an embodiment;
图3为一实施例提供的一种TWS耳机的产品形态实例示意图;3 is a schematic diagram of an example of a product form of a TWS earphone provided by an embodiment;
图4为一实施例提供的一种电子设备的结构示意图;4 is a schematic structural diagram of an electronic device according to an embodiment;
图5为一实施例提供的一种蓝牙传输架构的组成示意图;5 is a schematic diagram of the composition of a Bluetooth transmission architecture provided by an embodiment;
图6为一实施例提供的一种音频数据的同步方法的流程示意图;6 is a schematic flowchart of a method for synchronizing audio data according to an embodiment;
图7为一实施例提供的一种音频数据的传输原理示意图;7 is a schematic diagram of an audio data transmission principle provided by an embodiment;
图8为一实施例提供的一种数据包的结构示意图;8 is a schematic structural diagram of a data packet provided by an embodiment;
图9为一实施例提供的一种蓝牙耳机的耳塞的结构示意图;9 is a schematic structural diagram of an earplug of a Bluetooth headset provided by an embodiment;
图10为另一实施例提供的一种电子设备的结构示意图。10 is a schematic structural diagram of an electronic device according to another embodiment.
具体实施方式detailed description
如今,蓝牙由蓝牙技术联盟(Bluetooth special interest group,SIG)管理,其主要负责蓝牙技术规范的制定。目前制定的蓝牙技术规范主要用于基于基本速率(basic rate,BR)/增强速率(enhanced data rate,EDR)的点对点的数据传输。而如果手机与多个(如两个)的蓝牙设备建立了无线连接,则需要实现手机与这两个蓝牙设备之间的点对多点的数据传输。显然目前制定的基于BR/EDR的点对点的数据传输已不能满足需求。另外,这两个蓝牙设备还可能有实现设备之间音频数据的播放级同步的需求。例如,随着科技的进步,具有两个独立的耳机主体的蓝牙耳机逐渐进入人们视野。如这种具有两个的独立耳机主体的蓝牙耳机可以称为TWS耳机,其包含的两个独立的耳机主体分别可以称为左耳塞和右耳塞。如果将TWS耳机作为手机的音频输入/输出设备使用,则需要实现手机与TWS耳机的左右耳塞之间的点对多点的数据传输。另外,还 需要实现TWS耳机的左右耳塞之间音频数据的播放级同步。也就是说,需要实现点对多点的音频数据的播放级同步传输。Today, Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which is mainly responsible for the formulation of Bluetooth technical specifications. The current Bluetooth technical specifications are mainly used for point-to-point data transmission based on basic rate (BR)/enhanced data (EDR). If the mobile phone establishes a wireless connection with multiple (such as two) Bluetooth devices, it is necessary to realize point-to-multipoint data transmission between the mobile phone and the two Bluetooth devices. Obviously, the current point-to-point data transmission based on BR/EDR can no longer meet the demand. In addition, these two Bluetooth devices may also have a need to achieve playback-level synchronization of audio data between the devices. For example, with the advancement of technology, Bluetooth headsets with two independent headset bodies gradually enter people's vision. For example, such a Bluetooth headset with two independent headset bodies may be called a TWS headset, and the two independent headset bodies contained therein may be called left earplugs and right earplugs, respectively. If the TWS headset is used as the audio input/output device of the mobile phone, the point-to-multipoint data transmission between the mobile phone and the left and right earplugs of the TWS headset needs to be realized. In addition, the playback level synchronization of audio data between the left and right earbuds of the TWS headset is also required. That is to say, it is necessary to realize the synchronous transmission of the playback level of point-to-multipoint audio data.
蓝牙技术联盟已在着手制定点对多点的蓝牙技术规范,以用于实现点对多点的音频数据的播放级同步传输。如,低功耗蓝牙(Bluetooth low energy,BLE)的等时(isochronous,ISO)信道(channel)定义了一种传输机制。在该传输机制下,一个主设备(Master,简称M,如上述手机)基于BLE的ISO信道可以向多个从设备(Slave,简称S,如上述TWS耳机的左耳塞和右耳塞)发送音频数据,且能够实现这多个从设备的音频数据的播放级同步。也就是说,该传输机制能够用于实现点对多点的音频数据的播放级同步传输。The Bluetooth Technology Alliance is already working on the development of point-to-multipoint Bluetooth technical specifications for the realization of playback-level synchronous transmission of point-to-multipoint audio data. For example, the Bluetooth Low Energy (BLE) isochronous (ISO) channel defines a transmission mechanism. Under this transmission mechanism, a master device (Master, referred to as M, such as the above mobile phone) based on the BLE ISO channel can send audio data to multiple slave devices (Slave, referred to as S, such as the left and right earplugs of the above TWS headset) , And can achieve the playback level synchronization of the audio data of the multiple slave devices. That is to say, the transmission mechanism can be used to realize the synchronous transmission of the playback level of point-to-multipoint audio data.
具体的,上述传输机制中定义了CIG,CIG是组的概念。一个CIG可以包括多个CIS。一个主设备可以通过一个CIG中的多个CIS向多个从设备发送音频数据,多个从设备与多个CIS一一对应,这样便可实现点对多点的数据传输。可以理解的是,主设备与每个从设备之间的传输通道定义为CIS,且多个CIS归属于同一个CIG。另外,一个CIG中的多个CIS可以共享相同的CIG同步点(CIG synchronization point)和CIG播放点(CIG presentation point)。在CIG同步点,多个CIS对应的从设备都接收到音频数据。在CIG播放点,多个CIS对应的从设备都进行音频数据的播放。即多个从设备分别根据共享的CIG同步点和CIG播放点,便可实现多个从设备的音频数据的播放级同步。Specifically, CIG is defined in the above transmission mechanism, and CIG is the concept of group. A CIG can include multiple CIS. A master device can send audio data to multiple slave devices through multiple CISs in a CIG. Multiple slave devices correspond to multiple CISs in one-to-one manner, so that point-to-multipoint data transmission can be achieved. It can be understood that the transmission channel between the master device and each slave device is defined as CIS, and multiple CISs belong to the same CIG. In addition, multiple CISs in a CIG can share the same CIG synchronization point (CIG synchronization point) and CIG playback point (CIG presentation point). At the CIG synchronization point, multiple slave devices corresponding to CIS all receive audio data. At the CIG playback point, multiple slave devices corresponding to CIS all play audio data. That is, multiple slave devices can achieve playback-level synchronization of audio data of multiple slave devices according to the shared CIG synchronization point and CIG playback point, respectively.
需要说明的是,在本实施例中,多个从设备的音频数据的播放级同步可以是指:多个从设备可以分别接收来自主设备的音频数据,且对用户来说,能够在相同的时间点播放接收到的音频数据。例如,主设备可以为手机,多个从设备可以为TWS耳机的左耳塞和右耳塞。在将TWS耳机作为手机的音频输入/输出设备使用时,手机通过一个CIG中的两个CIS可以分别向TWS耳机的左耳塞和右耳塞发送音频数据。TWS耳机的左耳塞和右耳塞在接收到来自手机的音频数据后,能够在用户感知的相同时间点播放接收到的音频数据,以实现音频数据的播放级同步。It should be noted that, in this embodiment, the playback level synchronization of audio data of multiple slave devices may refer to: multiple slave devices may receive audio data from the master device separately, and for the user, the same Play the received audio data at a point in time. For example, the master device may be a mobile phone, and the multiple slave devices may be the left earplug and the right earplug of the TWS headset. When using a TWS headset as an audio input/output device for a mobile phone, the mobile phone can send audio data to the left and right earplugs of the TWS headset through two CISs in a CIG, respectively. After receiving the audio data from the mobile phone, the left earplug and the right earplug of the TWS earphone can play the received audio data at the same time point as perceived by the user, so as to realize the playback level synchronization of the audio data.
上述传输机制中,仅给出了理论的时间点(如上述CIG同步点和CIG播放点)用于实现音频数据的播放级同步。In the above transmission mechanism, only theoretical time points (such as the above-mentioned CIG synchronization point and CIG playback point) are given to achieve playback-level synchronization of audio data.
本实施例提供一种音频数据的同步方法,可以应用于电子设备与多个蓝牙设备传输音频数据的过程中。其中,电子设备分别与多个蓝牙设备中的每个蓝牙设备建立无线连接,电子设备基于与每个蓝牙设备之间的无线连接,分别向这多个蓝牙设备中的每个蓝牙设备发送音频数据。这多个蓝牙设备可以基于同步的音频时钟(audio clock)和同步的蓝牙时钟(Bluetooth clock)确定出CIG同步点和CIG播放点,从而可以利用确定出的CIG同步点和CIG播放点实现音频数据的播放级同步。This embodiment provides a method for synchronizing audio data, which can be applied to the process of transmitting audio data between an electronic device and multiple Bluetooth devices. Among them, the electronic device establishes a wireless connection with each of the plurality of Bluetooth devices, and the electronic device sends audio data to each of the plurality of Bluetooth devices based on the wireless connection with each Bluetooth device . These multiple Bluetooth devices can determine the CIG synchronization point and CIG playback point based on the synchronized audio clock (clock) and the synchronized Bluetooth clock (Bluetooth clock), so that the determined CIG synchronization point and CIG playback point can be used to realize audio data Play level synchronization.
需要说明的是,在本实施例中,上述音频数据(也可以称为音频流)可以包括:通话过程中的语音数据,利用应用程序(如,微信(WeChat),脸书(Facebook))进行语音通话或视频通话过程中的语音数据或语音消息,提示音(如来电提示音、回铃音,短信提示音等),音乐,播放视频时的语音数据,导航音等。It should be noted that, in this embodiment, the above audio data (also called audio stream) may include: voice data during a call, which is performed using an application program (eg, WeChat, Facebook) Voice data or voice messages during voice calls or video calls, prompt tones (such as call prompt tone, ring back tone, SMS prompt tone, etc.), music, voice data when playing video, navigation sound, etc.
下面将结合附图对本实施例的实施方式进行详细描述。The implementation of this embodiment will be described in detail below with reference to the drawings.
如图1所示,本实施例提供的音频数据的同步方法可以应用于外围设备101与电 子设备102组成的蓝牙音频系统中。As shown in FIG. 1, the audio data synchronization method provided in this embodiment can be applied to a Bluetooth audio system composed of a peripheral device 101 and an electronic device 102.
其中,外围设备101与电子设备102可以采用蓝牙建立蓝牙连接。基于建立的蓝牙连接,外围设备101与电子设备102之间可以实现短距离的数据交互。示例性的,外围设备101与电子设备102之间可以基于上述蓝牙连接进行音频数据的传输。如,基于上述蓝牙连接,外围设备101可以作为电子设备102的音频输入/输出设备实现通话。又如,基于上述蓝牙连接,外围设备101可以作为电子设备102的输出设备,如扬声器播放音乐等。Among them, the peripheral device 101 and the electronic device 102 may use Bluetooth to establish a Bluetooth connection. Based on the established Bluetooth connection, short-range data interaction can be realized between the peripheral device 101 and the electronic device 102. Exemplarily, the audio data may be transmitted between the peripheral device 101 and the electronic device 102 based on the Bluetooth connection. For example, based on the Bluetooth connection described above, the peripheral device 101 can serve as an audio input/output device of the electronic device 102 to realize a call. For another example, based on the Bluetooth connection described above, the peripheral device 101 can be used as an output device of the electronic device 102, such as a speaker to play music.
在一些实施例中,外围设备101可以是无线耳机,无线音箱,无线手环,无线车载,无线智能眼镜等设备,其包括一个主体。例如,电子设备102可以作为主设备通过一个CIG中的一个CIS向作为从设备的外围设备101传输音频数据。其中,无线耳机可以是头戴式耳机、耳塞式或其他便携式收听设备。又例如,电子设备102可以作为主设备通过一个CIG中的多个CIS,向多个作为从设备的外围设备101传输音频数据,多个CIS与多个外围设备101一一对应。本实施例提供的音频数据的同步方法也可以应用于电子设备102向多个外围设备101发送音频数据的场景中。采用本实施例提供的方法,多个外围设备101可以基于同步的音频时钟和同步的蓝牙时钟确定出CIG同步点和CIG播放点,从而利用确定出的CIG同步点和CIG播放点实现音频数据的播放级同步。In some embodiments, the peripheral device 101 may be a device such as a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, etc., which includes a main body. For example, the electronic device 102 may serve as a master device to transmit audio data to a peripheral device 101 as a slave device through a CIS in a CIG. Wherein, the wireless earphone may be a headphone, earplugs or other portable listening devices. For another example, the electronic device 102 can serve as a master device to transmit audio data to multiple peripheral devices 101 as slave devices through multiple CISs in a CIG, and the multiple CIS correspond to the multiple peripheral devices 101 in one-to-one correspondence. The audio data synchronization method provided in this embodiment can also be applied to a scenario where the electronic device 102 sends audio data to multiple peripheral devices 101. Using the method provided in this embodiment, multiple peripheral devices 101 can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, thereby using the determined CIG synchronization point and the CIG playback point to realize audio data Play level synchronization.
在另一些实施例中,外围设备101也可以是蓝牙耳机(也可以将其称为TWS耳机,以下实施例中以TWS耳机为例进行说明)、蓝牙音箱、智能眼镜等设备。外围设备101包含两个主体,且这两个主体之间不需要线材连接,可以互相配合、协同工作。另外,对于电子设备102传输至外围设备102的两个主体的音频数据,这两个主体有实现音频数据的播放级同步的需求。In other embodiments, the peripheral device 101 may also be a Bluetooth headset (it may also be referred to as a TWS headset, which will be described using the TWS headset as an example in the following embodiments), a Bluetooth speaker, smart glasses, and other devices. The peripheral device 101 includes two main bodies, and no wire connection is needed between the two main bodies, and they can cooperate with each other and work together. In addition, for the audio data transmitted by the electronic device 102 to the two main bodies of the peripheral device 102, the two main bodies have a requirement to achieve playback-level synchronization of the audio data.
在本实施例中,电子设备102可以通过一个CIG中的两个CIS向外围设备101的两个主体发送音频数据,两个CIS与外围设备的两个主体一一对应。作为一种示例,图1中所示的外围设备101以TWS耳机为例示出。其中,该TWS耳机包含两个主体(如耳机主体),如称为左耳塞101-1和右耳塞101-2。左耳塞101-1和右耳塞101-2之间不需要线材连接,可以相互配合、协同工作,如实现立体声播放。电子设备102可以作为主设备通过一个CIG中的两个CIS分别向作为从设备的左耳塞101-1和右耳塞101-2发送音频数据。且,TWS耳机的左耳塞101-1和右耳塞101-2可以基于同步的音频时钟和同步的蓝牙时钟确定出CIG同步点和CIG播放点,从而利用确定出的CIG同步点和CIG播放点实现音频数据的播放级同步。在本实施例中,TWS耳机的左耳塞101-1和右耳塞101-2的结构可以如图2所示,在以下实施例中将详细介绍。In this embodiment, the electronic device 102 can send audio data to two main bodies of the peripheral device 101 through two CISs in one CIG, and the two CISs correspond to the two main bodies of the peripheral device in one-to-one correspondence. As an example, the peripheral device 101 shown in FIG. 1 is illustrated with a TWS earphone as an example. Among them, the TWS earphone includes two main bodies (such as a headphone main body), such as a left earplug 101-1 and a right earplug 101-2. No wire connection is required between the left earplug 101-1 and the right earplug 101-2, and they can cooperate with each other and work together, for example, to achieve stereo playback. The electronic device 102 can serve as a master device to send audio data to the left earplug 101-1 and the right earplug 101-2 as slave devices through two CISs in one CIG, respectively. Moreover, the left earplug 101-1 and the right earplug 101-2 of the TWS earphone can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, thereby using the determined CIG synchronization point and CIG playback point Play level synchronization of audio data. In this embodiment, the structures of the left earplug 101-1 and the right earplug 101-2 of the TWS earphone may be as shown in FIG. 2 and will be described in detail in the following embodiments.
在一些实施例中,电子设备102可以是手机(如图1中所示)、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、电视机等设备,本实施例对该设备的具体形态不作特殊限制。在本实施例中,电子设备102的结构可以如图4所示,在以下实施例中将详细介绍。In some embodiments, the electronic device 102 may be a mobile phone (as shown in FIG. 1), a tablet computer, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC) , Netbooks, and cellular phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) devices, media players, televisions and other devices. The specific form of the device is not subject to special restrictions. In this embodiment, the structure of the electronic device 102 may be as shown in FIG. 4 and will be described in detail in the following embodiments.
请参考图2,为本实施例提供的一种TWS耳机的耳塞(左耳塞或右耳塞)的结构 示意图。如图2所示,TWS耳机的耳塞可以包括:处理器201、存储器202、传感器203、无线通信模块204、至少一个受话器205、至少一个麦克风206以及电源207。Please refer to FIG. 2, which is a schematic structural diagram of an earplug (left earplug or right earplug) of a TWS earphone provided by this embodiment. As shown in FIG. 2, the earplugs of the TWS headset may include: a processor 201, a memory 202, a sensor 203, a wireless communication module 204, at least one receiver 205, at least one microphone 206, and a power supply 207.
其中,存储器202可以用于存储应用程序代码,如用于与TWS耳机的另一个耳塞建立蓝牙连接,以及使得耳塞与上述电子设备102进行配对的应用程序代码。处理器201可以控制执行上述应用程序代码,以实现本实施例中TWS耳机的耳塞的功能。The memory 202 can be used to store application code, such as an application code for establishing a Bluetooth connection with another earbud of the TWS headset and pairing the earbud with the electronic device 102 described above. The processor 201 can control the execution of the above application program code to implement the function of the earplug of the TWS earphone in this embodiment.
存储器202中还可以存储有用于唯一标识该耳塞的蓝牙地址,以及存储有TWS耳机的另一个耳塞的蓝牙地址。另外,该存储器202中还可以存储有与该耳塞之前成功配对过的电子设备的连接数据。例如,该连接数据可以是与该耳塞成功配对过的电子设备的蓝牙地址。基于该连接数据,该耳塞能够与该电子设备自动配对,而不必配置与其之间的连接,如进行合法性验证等。上述蓝牙地址可以为媒体访问控制(Media Access Control,MAC)地址。The memory 202 may also store a Bluetooth address for uniquely identifying the earbud, and a Bluetooth address of another earbud where the TWS earphone is stored. In addition, the memory 202 may also store connection data of the electronic device that has been successfully paired with the earplug before. For example, the connection data may be the Bluetooth address of the electronic device that has successfully paired with the earbud. Based on the connection data, the earplug can be automatically paired with the electronic device without having to configure a connection with it, such as performing legality verification. The aforementioned Bluetooth address may be a Media Access Control (Media Access Control, MAC) address.
传感器203可以为距离传感器或接近光传感器。耳塞的处理器201可以通过该传感器203确定是否被用户佩戴。例如,耳塞的处理器201可以利用接近光传感器来检测耳塞附近是否有物体,从而确定耳塞是否被用户佩戴。在确定耳塞被佩戴时,耳塞的处理器201可以打开受话器205。在一些实施例中,该耳塞还可以包括骨传导传感器,结合成骨传导耳机。该骨传导传感器可以获取声部振动骨块的振动信号,处理器201解析出语音信号,实现语音信号对应的控制功能。在另一些实施例中,该耳塞还可以包括触摸传感器或压力传感器,分别用于检测用户的触摸操作和按压操作。在另一些实施例中,该耳塞还可以包括指纹传感器,用于检测用户指纹,识别用户身份等。在另一些实施例中,该耳塞还可以包括环境光传感器,耳塞的处理器201可以根据该环境光传感器感知的环境光的亮度,自适应调节一些参数,如音量大小。The sensor 203 may be a distance sensor or a proximity light sensor. The processor 201 of the earplug can determine whether it is worn by the user through the sensor 203. For example, the processor 201 of the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user. When it is determined that the earplug is worn, the processor 201 of the earplug may turn on the receiver 205. In some embodiments, the earplug may also include a bone conduction sensor, combined with a bone conduction earphone. The bone conduction sensor can obtain the vibration signal of the vibrating bone mass of the voice part, and the processor 201 parses out the voice signal to realize the control function corresponding to the voice signal. In other embodiments, the earplug may further include a touch sensor or a pressure sensor, which are used to detect the user's touch operation and pressing operation, respectively. In other embodiments, the earplug may further include a fingerprint sensor, which is used to detect a user's fingerprint and identify the user's identity. In other embodiments, the earplug may further include an ambient light sensor, and the processor 201 of the earplug may adaptively adjust some parameters, such as volume, according to the brightness of the ambient light sensed by the ambient light sensor.
无线通信模块204,用于支持TWS耳机的左耳塞和右耳塞之间,以及耳塞与各种电子设备,如上述电子设备102之间的短距离数据交互。在一些实施例中,该无线通信模块204可以为蓝牙收发器。TWS耳机的耳塞可以通过该蓝牙收发器与上述电子设备102之间建立蓝牙连接,以实现两者之间的短距离数据交互。The wireless communication module 204 is used to support short-distance data interaction between the left earplug and the right earplug of the TWS earphone, and between the earplug and various electronic devices, such as the electronic device 102 described above. In some embodiments, the wireless communication module 204 may be a Bluetooth transceiver. The earplugs of the TWS headset can establish a Bluetooth connection with the electronic device 102 through the Bluetooth transceiver to achieve short-range data interaction between the two.
受话器205,也可以称为“听筒”,可以用于将音频电信号转换成声音信号并播放。例如,当TWS耳机的耳塞作为上述电子设备102的音频输出设备时,受话器205可以将接收到的音频电信号转换为声音信号并播放。The receiver 205, which may also be referred to as an "earpiece", may be used to convert audio electrical signals into sound signals and play them. For example, when the earplug of the TWS earphone serves as the audio output device of the electronic device 102 described above, the receiver 205 may convert the received audio electrical signal into a sound signal and play it.
麦克风206,也可以称为“话筒”,“传声器”,用于将声音信号转换为音频电信号。例如,当TWS耳机的耳塞作为上述电子设备102的音频输入设备时,在用户说话(如通话或发语音消息)时,麦克风206可以采集用户的声音信号,并将其转换为音频电信号。上述音频电信号即为本实施例中的音频数据。The microphone 206, which may also be referred to as a "microphone" or a "microphone," is used to convert sound signals into audio electrical signals. For example, when the earplug of the TWS earphone is used as the audio input device of the electronic device 102, when the user speaks (such as talking or sending a voice message), the microphone 206 can collect the user's voice signal and convert it into an audio electrical signal. The above audio electrical signal is the audio data in this embodiment.
电源207,可以用于向TWS耳机的耳塞包含的各个部件供电。在一些实施例中,该电源207可以是电池,如可充电电池。The power supply 207 can be used to supply power to various components included in the earplugs of the TWS earphone. In some embodiments, the power source 207 may be a battery, such as a rechargeable battery.
通常,TWS耳机会配有一耳机盒(如,图3中所示的301)。如图3所示,该耳机盒301可以包括腔体301-1和盒盖301-2。腔体301-1可以用于收纳TWS耳机的左耳塞和右耳塞。如结合图1,如图3所示,耳机盒301的腔体301-1可以用于收纳TWS耳机的左耳塞101-1和右耳塞101-2。另外,该耳机盒301还可以为TWS耳机的左耳塞和右耳塞充电。相应的,在一些实施例中,上述TWS耳机的耳塞还可以包括:输入 /输出接口208。Usually, TWS earphones will be equipped with a headphone box (eg, 301 shown in Figure 3). As shown in FIG. 3, the earphone box 301 may include a cavity 301-1 and a box cover 301-2. The cavity 301-1 can be used to store the left earplug and the right earplug of the TWS earphone. As shown in FIG. 3 in combination with FIG. 1, the cavity 301-1 of the earphone box 301 can be used to house the left earplug 101-1 and the right earplug 101-2 of the TWS earphone. In addition, the earphone box 301 can also charge the left earplug and the right earplug of the TWS earphone. Correspondingly, in some embodiments, the earplugs of the TWS earphone may further include: an input/output interface 208.
输入/输出接口208可以用于提供TWS耳机的耳塞与耳机盒(如上述耳机盒301的腔体301-1)之间的任何有线连接。在一些实施例中,输入/输出接口208可以为电连接器。例如,当TWS耳机的耳塞置于耳机盒301的腔体301-1中时,TWS耳机的耳塞可以通过该电连接器与耳机盒301(如与耳机盒301的输入/输出接口)电连接。在该电连接建立后,耳机盒301可以为TWS耳机的耳塞的电源207充电。在该电连接建立后,TWS耳机的耳塞还可以与耳机盒301进行数据通信。例如,TWS耳机的耳塞的处理器201可以通过该电连接接收来自耳机盒301的配对指令。该配对命令用于指示TWS耳机的耳塞的处理器201打开无线通信模块204,从而使得TWS耳机的耳塞可以采用对应的无线通信协议(如蓝牙)与电子设备102进行配对。The input/output interface 208 may be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the cavity 301-1 of the earphone box 301 described above). In some embodiments, the input/output interface 208 may be an electrical connector. For example, when the earplug of the TWS earphone is placed in the cavity 301-1 of the earphone box 301, the earplug of the TWS earphone may be electrically connected to the earphone box 301 (such as the input/output interface with the earphone box 301) through the electrical connector. After the electrical connection is established, the earphone box 301 can charge the power supply 207 of the earplug of the TWS earphone. After the electrical connection is established, the earplugs of the TWS earphone can also perform data communication with the earphone box 301. For example, the processor 201 of the earplug of the TWS earphone may receive the pairing instruction from the earphone box 301 through the electrical connection. The pairing command is used to instruct the processor 201 of the earphone of the TWS earphone to turn on the wireless communication module 204, so that the earphone of the TWS earphone can use a corresponding wireless communication protocol (such as Bluetooth) to pair with the electronic device 102.
当然,上述TWS耳机的耳塞还可以不包括输入/输出接口208。在这种情况下,耳塞可以基于通过上述无线通信模块204与耳机盒301建立的蓝牙连接,实现充电或者数据通信功能。Of course, the earplugs of the aforementioned TWS earphones may not include the input/output interface 208. In this case, the earplugs can implement charging or data communication functions based on the Bluetooth connection established with the earphone box 301 through the wireless communication module 204 described above.
另外,在一些实施例中,耳机盒(如上述耳机盒301)还可以包括处理器,存储器等部件。该存储器可以用于存储应用程序代码,并由耳机盒301的处理器来控制执行,以实现耳机盒301的功能。例如。当用户打开耳机盒301的盒盖301-2时,耳机盒301的处理器通过执行存储在存储器中的应用程序代码,可以响应于用户打开盒盖301-2的操作向TWS耳机的耳塞发送配对命令等。In addition, in some embodiments, the earphone box (such as the aforementioned earphone box 301) may further include a processor, a memory, and other components. The memory can be used to store application program codes, and is controlled and executed by the processor of the earphone box 301 to realize the function of the earphone box 301. E.g. When the user opens the lid 301-2 of the earphone box 301, the processor of the earphone box 301 can send the pairing to the earplug of the TWS headset in response to the user's operation of opening the lid 301-2 by executing the application code stored in the memory Orders etc.
可以理解的是,本实施例示意的结构并不构成对TWS耳机的耳塞的具体限定。其可以具有比图2中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,该耳塞还可以包括指示灯(可以指示耳塞的电量等状态)、防尘网(可以配合听筒使用)等部件。图2中所示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the earplugs of the TWS earphone. It may have more or fewer components than shown in FIG. 2, two or more components may be combined, or may have different component configurations. For example, the earplug may also include an indicator light (which can indicate the status of the earplug's power level, etc.), a dust filter (which can be used with the earpiece), and other components. The various components shown in FIG. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
需要说明的是,TWS耳机的左耳塞和右耳塞的结构可以相同。例如,TWS耳机的左耳塞和右耳塞可以都包括图2中所示的部件。或者,TWS耳机的左耳塞和右耳塞的结构也可以不同。例如,TWS耳机的一个耳塞(如右耳塞)可以包括图2中所示的部件,而另一个耳塞(如左耳塞)可以包括图2中除麦克风206之外的其他的部件。It should be noted that the structure of the left earplug and the right earplug of the TWS earphone may be the same. For example, the left earplug and the right earplug of the TWS earphone may both include the components shown in FIG. 2. Alternatively, the structure of the left earplug and the right earplug of the TWS earphone may be different. For example, one earplug (such as the right earplug) of the TWS earphone may include the components shown in FIG. 2, and the other earplug (such as the left earplug) may include other components in FIG. 2 other than the microphone 206.
请参考图4,为本申请实施例提供的一种图1所示的蓝牙音频系统中的电子设备102的结构示意图。如图4所示,电子设备102可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Please refer to FIG. 4, which is a schematic structural diagram of an electronic device 102 in the Bluetooth audio system shown in FIG. 1 according to an embodiment of the present application. As shown in FIG. 4, the electronic device 102 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , A display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本实施例示意的结构并不构成对电子设备102的具体限定。在另 一些实施例中,电子设备102可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 102. In other embodiments, the electronic device 102 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or may be integrated in one or more processors.
其中,控制器可以是电子设备102的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 102. The controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /Or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备102的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 102.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接 口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备102的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备102的显示功能。The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 102. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 102.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备102充电,也可以用于电子设备102与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 102, and can also be used to transfer data between the electronic device 102 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备102的结构限定。在另一些实施例中,电子设备102也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic description, and does not constitute a limitation on the structure of the electronic device 102. In other embodiments, the electronic device 102 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备102的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 102. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备102的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 102 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备102中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 102 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备102上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波, 并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 102. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备102上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(Bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (Bluetooth, BT), and global navigation satellites that are applied to the electronic device 102 Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
在一些实施例中,电子设备102的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备102可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。例如,在本实施例中,电子设备102可以利用无线通信模块160,通过无线通信技术,如蓝牙(BT)与外围设备建立蓝牙连接。基于建立的蓝牙连接,电子设备102可以向外围设备发送音频数据,还可以接收来自外围设备的音频数据。In some embodiments, the antenna 1 of the electronic device 102 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160 so that the electronic device 102 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include a global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS). For example, in this embodiment, the electronic device 102 may utilize the wireless communication module 160 to establish a Bluetooth connection with a peripheral device through a wireless communication technology, such as Bluetooth (BT). Based on the established Bluetooth connection, the electronic device 102 can send audio data to the peripheral device and can also receive audio data from the peripheral device.
电子设备102通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 102 realizes a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采 用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备102可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 102 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备102可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 102 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备102可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the electronic device 102 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备102在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 102 selects at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备102可以支持一种或多种视频编解码器。这样,电子设备102可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。The video codec is used to compress or decompress digital video. The electronic device 102 may support one or more video codecs. In this way, the electronic device 102 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备102的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continue to self-learn. The NPU can realize applications such as intelligent recognition of the electronic device 102, such as image recognition, face recognition, voice recognition, and text understanding.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备102的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 102. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备102的各种功能应用以及数据处理。例如,在本实施例中,处理器110可以通过执行存储在内部存储器121中的指令,通过无线通信模块160与外围设备建立蓝牙连接,以及与外围设备进行短距离数据交互,以通过外围设备实现通话、播放音乐等功能。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至 少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备102使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在本实施例中,在电子设备102与外围设备之间采用无线通信技术,如蓝牙建立了蓝牙连接后,电子设备102可以将外围设备的蓝牙地址存储在内部存储器121中。在一些实施例中,当外围设备为包含两个主体的设备,如TWS耳机时,TWS耳机的左耳塞和右耳塞分别有各自的蓝牙地址,电子设备102可以将TWS耳机的左耳塞和右耳塞的蓝牙地址关联存储在内部存储器121中。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 102. For example, in this embodiment, the processor 110 may execute instructions stored in the internal memory 121, establish a Bluetooth connection with the peripheral device through the wireless communication module 160, and perform short-range data interaction with the peripheral device to implement the peripheral device Call, play music and other functions. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system, at least one function required application programs (such as sound playback function, image playback function, etc.). The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 102 and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on. In this embodiment, the wireless communication technology is adopted between the electronic device 102 and the peripheral device. For example, after the Bluetooth connection is established by the Bluetooth, the electronic device 102 can store the Bluetooth address of the peripheral device in the internal memory 121. In some embodiments, when the peripheral device is a device that includes two main bodies, such as a TWS headset, the left and right earbuds of the TWS headset have respective Bluetooth addresses, and the electronic device 102 can use the left and right earbuds of the TWS headset The associated Bluetooth address is stored in the internal memory 121.
电子设备102可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 102 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备102可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 102 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备102接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also known as "handset", is used to convert audio electrical signals into sound signals. When the electronic device 102 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备102可以设置至少一个麦克风170C。在另一些实施例中,电子设备102可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备102还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also known as "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal to the microphone 170C. The electronic device 102 may be provided with at least one microphone 170C. In other embodiments, the electronic device 102 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 102 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
在本实施例中,当电子设备102与外围设备,如TWS耳机建立了蓝牙连接时,TWS耳机可以作为电子设备102的音频输入/输出设备使用。示例性的,音频模块170可以接收无线通信模块160传递的音频电信号,实现通过TWS耳机接听电话、播放音乐等功能。例如,在用户打电话的过程中,TWS耳机可以采集用户的声音信号,并转换为音频电信号后发送给电子设备102的无线通信模块160。无线通信模块160将该音频电信号传输给音频模块170。音频模块170可以将接收到的音频电信号转换为数字音频信号,并进行编码后传递至移动通信模块150。由移动通信模块150传输至通话对端设备,以实现通话。又例如,用户在使用电子设备102的媒体播放器播放音乐时,应用处理器可以将媒体播放器播放的音乐对应的音频电信号传输至音频模块170。由音频模块170将该音频电信号传输至无线通信模块160。无线通信模块160可以将音频电信号发送给TWS耳机,以便TWS耳机将该音频电信号转换为声音信号后播放。在一些实施例中,音频电信号可以为本实施例中的音频数据。In this embodiment, when the electronic device 102 establishes a Bluetooth connection with a peripheral device such as a TWS headset, the TWS headset can be used as an audio input/output device of the electronic device 102. Exemplarily, the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering a phone call and playing music through a TWS headset. For example, during a user's phone call, the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the electronic device 102. The wireless communication module 160 transmits the audio electrical signal to the audio module 170. The audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and pass it to the mobile communication module 150. It is transmitted by the mobile communication module 150 to the call peer device to realize the call. For another example, when the user uses the media player of the electronic device 102 to play music, the application processor may transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170. The audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170. The wireless communication module 160 may send the audio electrical signal to the TWS headset, so that the TWS headset converts the audio electrical signal into a sound signal and plays it. In some embodiments, the audio electrical signal may be the audio data in this embodiment.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口, 美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headset interface 170D is used to connect wired headsets. The earphone interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备102根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备102根据压力传感器180A检测所述触摸操作强度。电子设备102也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. The capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 102 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 102 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 102 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备102的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备102围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备102抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备102的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the movement posture of the electronic device 102. In some embodiments, the angular velocity of the electronic device 102 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 102 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 102 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备102通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 102 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备102可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备102是翻盖机时,电子设备102可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 102 may use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device 102 is a clamshell machine, the electronic device 102 can detect the opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the holster or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备102在各个方向上(一般为三轴)加速度的大小。当电子设备102静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 102 in various directions (generally three axes). When the electronic device 102 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
距离传感器180F,用于测量距离。电子设备102可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备102可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 102 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the electronic device 102 may use the distance sensor 180F to measure distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备102通过发光二极管向外发射红外光。电子设备102使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备102附近有物体。当检测到不充分的反射光时,电子设备102可以确定电子设备102附近没有物体。电子设备102可以利用接近光传感器180G检测用户手持电子设备102贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 102 emits infrared light outward through the light emitting diode. The electronic device 102 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 102. When insufficient reflected light is detected, the electronic device 102 may determine that there is no object near the electronic device 102. The electronic device 102 can use the proximity light sensor 180G to detect that the user holds the electronic device 102 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备102可以根据感知的环境光亮 度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备102是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 102 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 102 is in a pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备102可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 102 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, answer the call with the fingerprint, and so on.
温度传感器180J用于检测温度。在一些实施例中,电子设备102利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备102执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备102对电池142加热,以避免低温导致电子设备102异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备102对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 102 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 102 performs performance reduction of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 102 heats the battery 142 to avoid abnormal shutdown of the electronic device 102 due to low temperature. In some other embodiments, when the temperature is below another threshold, the electronic device 102 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备102的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 102, which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone. The audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备102可以接收按键输入,产生与电子设备102的用户设置以及功能控制有关的键信号输入。The key 190 includes a power-on key, a volume key, and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 102 can receive key input and generate key signal input related to user settings and function control of the electronic device 102.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 may generate a vibration prompt. The motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, audio playback, etc.) may correspond to different vibration feedback effects. For the touch operation of different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备102的接触和分离。电子设备102可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备102通过SIM卡和网络交互,实现通话以及数 据通信等功能。在一些实施例中,电子设备102采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备102中,不能和电子设备102分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 102. The electronic device 102 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 102 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 102 uses eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 102 and cannot be separated from the electronic device 102.
在BLE的ISO信道定义的传输机制中,定义了CIG,CIG是组的概念,可以包括多个CIS。一个主设备通过CIG中的多个CIS可以向多个从设备发送音频数据。多个CIS与多个从设备一一对应。且这多个CIS可以共享相同CIG同步点和CIG播放点。在本实施例中,多个从设备能够基于同步的音频时钟和同步的蓝牙时钟确定出CIG同步点和CIG播放点,从而可以利用确定出的CIG同步点和CIG播放点实现音频数据的播放级同步。In the transmission mechanism defined by the ISO channel of BLE, CIG is defined. CIG is a concept of a group and can include multiple CISs. A master device can send audio data to multiple slave devices through multiple CISs in the CIG. Multiple CIS correspond to multiple slave devices. And these multiple CISs can share the same CIG sync point and CIG play point. In this embodiment, multiple slave devices can determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, so that the determined CIG synchronization point and CIG playback point can be used to achieve the playback level of audio data Synchronize.
另外,为了使上述音频数据能够采用蓝牙技术在设备之间进行传输,采用蓝牙通信的设备(如上述电子设备102和外围设备101)需要遵循一定的蓝牙传输框架。图5为本申请实施例提供的一种蓝牙传输框架的组成示意图。如图5所示,该蓝牙传输框架可以包括应用(application)层、主机(host)、主机控制器接口(host controller interface,HCI)以及控制器(controller)。In addition, in order to enable the above-mentioned audio data to be transmitted between devices using Bluetooth technology, devices that use Bluetooth communication (such as the aforementioned electronic device 102 and peripheral device 101) need to follow a certain Bluetooth transmission framework. FIG. 5 is a schematic diagram of the composition of a Bluetooth transmission framework provided by an embodiment of the present application. As shown in FIG. 5, the Bluetooth transmission framework may include an application layer, a host, a host controller interface (HCI), and a controller.
其中,应用层可以包括电话应用,多媒体应用(如音乐播放器,视频播放器)等应用程序。Among them, the application layer may include telephone applications, multimedia applications (such as music players, video players) and other applications.
主机可以包括蓝牙的各种应用规范(profile)以及传输协议。如,免提规范(hands free profile,HFP),高级音频传送规范(advanced audio distribution profile,A2DP),音频/视频遥控规范(audio/video remote control profile,AVRCP),通用接入规范(generic access profile,GAP),通用属性规范(generic attribute profile,GATT),音视频分发传输协议(audio/video distribution transport protocol,AVDTP),音视频控制传输协议(audio/video control transport protocol,AVCTP),服务发现协议(service discover protocol,SDP),串口仿真协议(radio frequency communications protocol,RFCOMM),逻辑链路控制与适配协议(logical link control and adaptation protocol,L2CAP)。互相操作的设备需要使用相同的应用规范才能实现通信。不同的应用需要使用不同的应用规范。The host may include various application profiles of Bluetooth and transmission protocols. For example, hands-free profile (HFP), advanced audio transmission profile (advanced audio distribution profile, A2DP), audio/video remote control profile (audio/video remote control profile, AVRCP), general access profile (generic access profile) , GAP), Generic Attribute Profile (GATT), Audio and Video Distribution Transmission Protocol (audio/video distribution protocol, AVDTP), Audio and Video Control Transmission Protocol (audio/video control transmission protocol, AVCTP), Service Discovery Protocol (service discovery protocol, SDP), serial port emulation protocol (radio frequency communications protocols, RFCOMM), logical link control and adaptation protocol (logical link control and adaptation protocol, L2CAP). Interoperable devices need to use the same application specification to communicate. Different applications require different application specifications.
HCI位于主机和控制器之间,可以为上层协议提供进入控制器中的链路层的统一接口和进入控制器中的基带的统一方式。HCI is located between the host and the controller, and can provide a unified interface for the upper layer protocol to enter the link layer in the controller and a unified way to enter the baseband in the controller.
控制器可以包括链路层(link layer,LL),基带(baseband),以及无线射频(蓝牙射频)单元等。其中,链路层负责管理设备之间的通信,实现链路的建立、验证、链路配置等操作。基带主要进行射频信号与数字或语音信号的相互转化,实现基带协议和其它的底层连接规程。无线射频单元用于发射和接收蓝牙信号。在一些实施例中,主机可以实现于设备的AP中。控制器可以实现于设备的蓝牙芯片中。在另一些实施例中,主机和控制器可以实现于设备的同一个处理器或控制器中,此时HCI是可选的。The controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit. Among them, the link layer is responsible for managing the communication between the devices, to achieve link establishment, verification, link configuration and other operations. The baseband mainly performs mutual conversion between radio frequency signals and digital or voice signals to implement baseband protocols and other low-level connection procedures. The radio frequency unit is used to transmit and receive Bluetooth signals. In some embodiments, the host may be implemented in the AP of the device. The controller can be implemented in the Bluetooth chip of the device. In other embodiments, the host and the controller may be implemented in the same processor or controller of the device, in which case HCI is optional.
在本实施例中,电子设备与多个蓝牙设备(该多个蓝牙设备可以是多个外围设备,该多个蓝牙设备也可以是一个外围设备的多个主体)建立了无线连接的情况下,电子设备可以基于与每个蓝牙设备之间建立的无线连接,向多个蓝牙设备中的每个蓝牙设备发送包含音频数据的数据包。该数据包中还可以包括该数据包的音频时间戳和初始蓝牙时间戳。多个蓝牙设备可以根据数据包中的音频时间戳和初始蓝牙时间戳确定出音频数据的CIG播放点,并根据确定出的CIG播放点进行音频数据的播放,以实现音 频数据的播放级同步。In this embodiment, when the electronic device establishes a wireless connection with multiple Bluetooth devices (the multiple Bluetooth devices may be multiple peripheral devices, and the multiple Bluetooth devices may also be multiple bodies of one peripheral device), The electronic device may send a data packet containing audio data to each of the plurality of Bluetooth devices based on the wireless connection established with each Bluetooth device. The data packet may also include an audio time stamp and an initial Bluetooth time stamp of the data packet. Multiple Bluetooth devices can determine the CIG playback point of the audio data based on the audio timestamp and the initial Bluetooth timestamp in the data packet, and play the audio data according to the determined CIG playback point to achieve playback-level synchronization of the audio data.
为了便于理解,以下实施例结合图5所示的蓝牙传输框架,并以电子设备为手机,蓝牙设备为外围设备的主体,如外围设备为TWS耳机,TWS耳机包括两个耳机主体,分别为左耳塞和右耳塞为例,对本实施例提供的音频数据的同步方法进行详细介绍。其中,左耳塞可以是本申请中的第一耳塞,右耳塞可以是本申请中的第二耳塞;或者,右耳塞可以是本申请中的第一耳塞,左耳塞可以是本申请中的第二耳塞。For ease of understanding, the following embodiment combines the Bluetooth transmission framework shown in FIG. 5 and uses the electronic device as a mobile phone and the Bluetooth device as the main body of the peripheral device. For example, the peripheral device is a TWS headset. The TWS headset includes two headset bodies, which are respectively Taking earplugs and right earplugs as examples, the method for synchronizing audio data provided in this embodiment will be described in detail. The left earplug may be the first earplug in this application, the right earplug may be the second earplug in this application; or, the right earplug may be the first earplug in this application, and the left earplug may be the second earplug in this application. Earplugs.
TWS耳机的左耳塞和右耳塞分别与手机进行蓝牙配对。The left and right earbuds of the TWS headset are paired with the mobile phone via Bluetooth.
示例性的,当用户希望使用TWS耳机时,可打开TWS耳机的耳机盒的盒盖。TWS耳机的左耳塞和右耳塞自动开机,或被按下功能键后开机。若左耳塞和右耳塞之前没有完成蓝牙配对,左耳塞和右耳塞可自动进行蓝牙配对,或者左耳塞和右耳塞在被按下配对功能键后进行蓝牙配对。若左耳塞和右耳塞之前已完成了蓝牙配对,则蓝牙配对过程可省略。在蓝牙配对完成后,TWS耳机的左耳塞和右耳塞之间可以建立蓝牙连接。然后,TWS耳机的左耳塞和右耳塞中的任一耳塞(如右耳塞)可对外发送配对广播。如果手机已经打开了蓝牙功能,则手机可以接收到该配对广播并提示用户已经扫描到相关的蓝牙设备(如TWS耳机)。当该TWS耳机作为连接设备在手机上被选中后,手机可与TWS耳机的右耳塞进行蓝牙配对。当然,如果手机与TWS耳机的右耳塞之前已完成了蓝牙配对,则蓝牙配对过程可省略。也就是说,手机在接收到上述配对广播后,可自动与右耳塞进行蓝牙配对。Exemplarily, when the user wishes to use the TWS earphone, the lid of the earphone box of the TWS earphone can be opened. The left earplug and right earplug of the TWS headset turn on automatically, or the function key is pressed and then turned on. If the left earbud and the right earbud have not completed Bluetooth pairing before, the left earbud and the right earbud can automatically perform Bluetooth pairing, or the left earbud and right earbud can perform Bluetooth pairing after the pairing function key is pressed. If the left earbud and the right earbud have previously completed Bluetooth pairing, the Bluetooth pairing process can be omitted. After Bluetooth pairing is completed, a Bluetooth connection can be established between the left and right earbuds of the TWS headset. Then, any one of the left earplug and the right earplug of the TWS earphone (such as the right earplug) can send a paired broadcast to the outside. If the mobile phone has turned on the Bluetooth function, the mobile phone can receive the pairing broadcast and prompt the user that the relevant Bluetooth device (such as a TWS headset) has been scanned. When the TWS headset is selected as the connected device on the mobile phone, the mobile phone can be paired with the right earbud of the TWS headset via Bluetooth. Of course, if the Bluetooth pairing of the mobile phone and the right earbud of the TWS headset has been completed before, the Bluetooth pairing process can be omitted. In other words, after receiving the pairing broadcast, the mobile phone can automatically perform Bluetooth pairing with the right earbud.
在右耳塞与手机完成蓝牙配对后,右耳塞可以通过与左耳塞之间的蓝牙连接,向左耳塞发送手机的蓝牙地址,并通知左耳塞对外发送配对广播。这样,手机可以接收左耳塞发送的配对广播并与左耳塞进行蓝牙配对。After the right earbud is paired with the mobile phone via Bluetooth, the right earbud can send the Bluetooth address of the mobile phone to the left earbud through the Bluetooth connection between the left earbud and the left earbud, and notify the left earbud to send a pairing broadcast to the outside. In this way, the mobile phone can receive the pairing broadcast sent by the left earplug and perform Bluetooth pairing with the left earplug.
在一些实施例中,TWS耳机的右耳塞还可以向手机发送左耳塞的蓝牙地址,以向手机指示左耳塞与右耳塞是同一个外围设备的两个主体。在后续有音频数据需要传输给TWS耳机的左耳塞和右耳塞时,手机可以通过同一个CIG中的两个CIS分别向右耳塞与左耳塞传输音频数据,以便能够实现右耳塞与左耳塞之间音频数据的播放级同步。In some embodiments, the right earplug of the TWS headset may also send the Bluetooth address of the left earplug to the mobile phone to indicate to the mobile phone that the left earplug and the right earplug are two main bodies of the same peripheral device. When there is audio data that needs to be transmitted to the left and right earplugs of the TWS headset, the mobile phone can transmit audio data to the right and left earplugs through the two CISs in the same CIG, so that the right earplug and the left earplug can be realized. Play level synchronization of audio data.
需要说明的是,上述对TWS耳机的左耳塞和右耳塞分别与手机进行蓝牙配对的过程仅是一种示例。在一些实施例中,手机也可以先和TWS耳机的左耳塞进行蓝牙配对,然后左耳塞通过向右耳塞发送手机的蓝牙地址,并通知右耳塞对外发送配对广播,以使得右耳塞与手机进行蓝牙配对。在另外一些实施例中,TWS耳机的左耳塞和右耳塞在开机后可以分别对外发送配对广播,以便于左耳塞和右耳塞能够分别与手机进行蓝牙配对。另外,在本申请实施例中,TWS耳机的左耳塞或右耳塞对外发送配对广播的触发条件,可以是TWS耳机的耳机盒的盒盖被打开,或者是TWS耳机的左耳塞和右耳塞蓝牙配对完成,或者,TWS耳机的左耳塞或右耳塞被拿出耳机盒,或者是配对功能键被按下,还可以是其他的触发条件。其中,所述的配对功能键可以设置在TWS耳机的耳机盒上,如TWS耳机的耳机盒上配置有配对功能键,当该配对功能键被按下时,TWS耳机的左耳塞或右耳塞可对外发送配对广播。配对功能键也可以设置在TWS耳机的左右耳塞上,如,TWS耳机的左耳塞和/或右耳塞上配置有配对功能键,在该配对功能键被按下时,对应的耳塞对外发送配对广播。It should be noted that the above process of pairing the left earplug and the right earplug of the TWS headset with the mobile phone via Bluetooth is only an example. In some embodiments, the mobile phone may also perform Bluetooth pairing with the left earbud of the TWS earphone, and then the left earbud sends the Bluetooth address of the mobile phone to the right earbud and notifies the right earbud to send a pairing broadcast to the outside so that the right earbud and the mobile phone can perform Bluetooth pair. In some other embodiments, the left earplug and the right earplug of the TWS earphone can separately send pairing broadcasts after being turned on, so that the left earplug and the right earplug can perform Bluetooth pairing with the mobile phone respectively. In addition, in the embodiment of the present application, the trigger condition for the paired broadcast of the left earplug or the right earplug of the TWS headset may be that the cover of the headphone box of the TWS headset is opened, or the pairing of the left earplug and the right earplug of the TWS headset Bluetooth Done, or the left earplug or right earplug of the TWS earphone is taken out of the earphone box, or the pairing function key is pressed, or other triggering conditions. The pairing function key can be set on the earphone box of the TWS earphone. For example, the earphone box of the TWS earphone is equipped with a pairing function key. When the pairing function key is pressed, the left or right earplug of the TWS earphone can be Send paired broadcasts to the outside world. The pairing function keys can also be set on the left and right earbuds of the TWS headset. For example, the pairing function keys are configured on the left and/or right earbuds of the TWS headset. When the pairing function key is pressed, the corresponding earbud sends a pairing broadcast to the outside .
在手机与TWS耳机的左耳塞和右耳塞进行蓝牙配对后,手机可以分别与TWS耳机的左耳塞和右耳塞建立ACL链路。After the mobile phone is paired with the left earplug and the right earplug of the TWS headset via Bluetooth, the mobile phone can establish an ACL link with the left earplug and the right earplug of the TWS headset, respectively.
例如,手机可以与左耳塞建立ACL链路1,手机可以与右耳塞建立ACL链路2。以手机与左耳塞建立ACL链路1为例。手机可以向左耳塞发送建立ACL链路的请求。左耳塞接收到建立ACL链路的请求后应答。手机接收到左耳塞的应答后,ACL链路1建立完成。其中,ACL链路1可以是本申请中的第一ACL链路,ACL链路2可以是本申请中的第二ACL链路。For example, a mobile phone can establish an ACL link 1 with the left earbud, and a mobile phone can establish an ACL link 2 with the right earbud. Take the case where the mobile phone and the left earbud establish ACL link 1 as an example. The mobile phone can send a request to establish an ACL link to the left earplug. The left earbud answers after receiving the request to establish the ACL link. After the mobile phone receives the response from the left earplug, ACL link 1 is established. Wherein, ACL link 1 may be the first ACL link in this application, and ACL link 2 may be the second ACL link in this application.
手机与TWS耳机进行参数协商,并依据协商结果进行CIG参数的配置。The mobile phone negotiates parameters with the TWS headset and configures CIG parameters based on the negotiation results.
示例性的,由于用于传输不同音频业务的音频数据的CIG的参数(如称为CIG参数)可能是不同的。为了适配不同音频业务的音频数据的传输,在手机确定有音频数据要传输(如,手机确定有音频业务开启)时,手机可以与TWS耳机的左耳塞和右耳塞,或者与TWS耳机的左耳塞和右耳塞中的一个耳塞进行参数协商。手机根据参数协商的结果可以确定出能够适配该音频业务的CIG参数。该CIG参数可以用于建立CIG中的CIS,以用于相关音频数据的传输。例如,上述参数协商可以包括以下一项或多项:服务质量(quality of service,QoS)参数的协商、编码(codec)参数的协商、CIS参数的协商。相应的,手机确定出的CIG参数可以包括以下一项或多项:QoS参数、codec参数、CIS参数。Exemplarily, the parameters of the CIG (such as CIG parameters) used to transmit audio data of different audio services may be different. In order to adapt to the transmission of audio data of different audio services, when the mobile phone determines that there is audio data to be transmitted (for example, the mobile phone determines that the audio service is turned on), the mobile phone can be connected with the left and right earplugs of the TWS headset or the left earplug of the TWS headset The earplug and one of the right earplugs perform parameter negotiation. The mobile phone can determine the CIG parameters that can be adapted to the audio service according to the results of the parameter negotiation. This CIG parameter can be used to establish the CIS in the CIG for the transmission of related audio data. For example, the above parameter negotiation may include one or more of the following: quality of service (QoS) parameter negotiation, codec parameter negotiation, and CIS parameter negotiation. Correspondingly, the CIG parameters determined by the mobile phone may include one or more of the following: QoS parameters, codec parameters, and CIS parameters.
其中,QoS参数可以包括时延、丢包率、吞吐量等表示传输质量的参数。codec参数可以包括编码方式、压缩率等影响音频质量的参数。CIS参数可以包括锚点(anchor point)、ISO间隔(interval)、CIS的标识(dentify,ID)等等。CIG可以包括多个CIG事件(CIG_event)。锚点是对应CIG事件的开始时间点。ISO间隔是两个连续的锚点之间的时间。每个CIG事件在时间上归属于一个ISO间隔。Among them, the QoS parameters may include parameters such as delay, packet loss rate, throughput, etc. that represent transmission quality. The codec parameters may include encoding methods, compression ratios, and other parameters that affect audio quality. The CIS parameters may include an anchor point, ISO interval, CIS identification (ID), and so on. The CIG may include multiple CIG events (CIG_event). The anchor point is the start time point of the corresponding CIG event. The ISO interval is the time between two consecutive anchor points. Each CIG event belongs to an ISO interval in time.
在一些实施例中,上述参数协商过程可以基于手机与TWS耳机的左右耳塞之间建立的ACL链路来实施。例如,以手机通过与TWS耳机的左耳塞和右耳塞中的一个耳塞(如左耳塞)进行参数协商以确定CIG参数为例,参数协商的具体过程可以是:手机通过ACL链路1向左耳塞发送参数协商消息。该参数协商消息可以携带与当前开启的音频业务对应的CIG参数。在一些实施例中,与当前开启的音频业务对应的CIG参数可以是预定义的。左耳塞通过ACL链路1接收到手机发送的参数协商消息。如果左耳塞同意该参数协商消息中携带的CIG参数,则可以向手机返回确认消息;如果左耳塞不同意该参数协商消息中携带的参数或同意该参数协商消息中携带的部分参数,则可以向手机返回继续协商消息,以便与手机继续进行参数协商,直到左耳塞向手机返回确认消息。手机通过ACL链路1接收左耳塞返回的确认消息。手机根据该确认消息获得与左耳塞的参数协商结果。这样,手机根据参数协商结果,便可以确定出能够适配该音频业务的音频数据传输的CIG参数。In some embodiments, the above-mentioned parameter negotiation process may be implemented based on the ACL link established between the mobile phone and the left and right earplugs of the TWS headset. For example, taking a mobile phone to negotiate parameter with one of the left earplug and right earplug of the TWS earphone (such as the left earplug) to determine the CIG parameter as an example, the specific process of parameter negotiation may be: the mobile phone passes the ACL link 1 to the left earplug Send parameter negotiation messages. The parameter negotiation message may carry CIG parameters corresponding to the currently enabled audio service. In some embodiments, the CIG parameters corresponding to the currently enabled audio service may be predefined. The left earplug receives the parameter negotiation message sent by the mobile phone through ACL link 1. If the left earplug agrees with the CIG parameters carried in the parameter negotiation message, it can return a confirmation message to the mobile phone; if the left earplug does not agree with the parameters carried in the parameter negotiation message or agrees with some of the parameters carried in the parameter negotiation message, you can send The mobile phone returns a continue negotiation message to continue parameter negotiation with the mobile phone until the left earbud returns a confirmation message to the mobile phone. The mobile phone receives the confirmation message returned by the left earplug through ACL link 1. The mobile phone obtains the parameter negotiation result with the left earplug according to the confirmation message. In this way, the mobile phone can determine the CIG parameters that can be adapted to the audio data transmission of the audio service according to the parameter negotiation results.
在手机确定出能够适配音频业务的音频数据传输的CIG参数后,可以根据确定出的CIG参数进行CIG参数的配置。例如,结合上述图5所示的音频传输框架,CIG参数的配置流程可以是:手机的host设置CIG参数。如,手机的host可以通过HCI向手机的LL发送HCI指令“低功耗CIG参数设置(LE Set CIG parameters)”。手机的LL接收到该HCI指令后,可以向手机的host返回响应消息,如“命令完成(command  complete)”。手机的host发起CIS的创建。如手机的host可以通过HCI向手机的LL发送HCI指令“低功耗CIS创建(LE createCIS)”。手机的LL接收到该HCI指令后,可以向手机的host返回响应消息,如“HCI命令状态(HCI command status)”。至此,CIG参数的配置完成。After the mobile phone determines the CIG parameters that can be adapted to the audio data transmission of the audio service, the CIG parameters can be configured according to the determined CIG parameters. For example, in combination with the audio transmission framework shown in FIG. 5 above, the CIG parameter configuration process may be: the host of the mobile phone sets the CIG parameter. For example, the host of the mobile phone can send the HCI command "Low Power CIG Parameter Settings (LE Set CIG parameters)" to the LL of the mobile phone through the HCI. After receiving the HCI command, the LL of the mobile phone may return a response message to the host of the mobile phone, such as "command complete". The host of the mobile phone initiated the creation of CIS. For example, the host of the mobile phone can send the HCI command "LE createCIS" to the LL of the mobile phone through the HCI. After receiving the HCI command, the LL of the mobile phone can return a response message to the host of the mobile phone, such as "HCI command status (HCI command status)". At this point, the configuration of CIG parameters is complete.
手机通过与左右耳塞之间的ACL链路,分别与TWS耳机的左耳塞和右耳塞建立CIS。The mobile phone establishes CIS with the left and right earplugs of the TWS earphone through the ACL link between the left and right earplugs.
在CIG参数配置完成后,手机可以根据配置的CIG参数,通过与左耳塞和右耳塞之间的ACL链路,分别与TWS耳机的左耳塞和右耳塞建立CIS。例如,手机可以与左耳塞建立CIS 1,与右耳塞建立CIS 2。该CIS1和该CIS 2包含于同一个CIG中。其中,CIS 1可以是本申请中的第一CIS,CIS 2可以是本申请中的第二CIS。After the CIG parameter configuration is completed, the mobile phone can establish the CIS with the left and right earplugs of the TWS headset through the ACL link with the left and right earplugs according to the configured CIG parameters. For example, a mobile phone can establish CIS 1 with the left earbud and CIS 2 with the right earbud. The CIS1 and the CIS2 are included in the same CIG. Among them, CIS 1 may be the first CIS in this application, and CIS 2 may be the second CIS in this application.
其中,手机与左耳塞建立CIS 1,手机与右耳塞建立CIS 2的流程具体的可以参见图6所示。结合图5所示的音频传输框架,以手机与左耳塞建立CIS 1为例。手机与左耳塞建立CIS 1的过程可以包括:Among them, the process of establishing the CIS 1 between the mobile phone and the left earplug and the CIS 2 between the mobile phone and the right earplug can be seen in FIG. 6. Combining the audio transmission framework shown in Figure 5, take the mobile phone and the left earbud to establish CIS as an example. The process of establishing the CIS1 between the mobile phone and the left earbud may include:
步骤601:手机的LL可以通过ACL链路1向左耳塞的LL发送CIS建立请求消息,如空口请求消息LL_CIS_REQ。该CIS建立请求消息可以用于向左耳塞的LL请求创建CIS。Step 601: The LL of the mobile phone can send a CIS establishment request message to the LL of the left earplug through the ACL link 1, such as an air interface request message LL_CIS_REQ. The CIS establishment request message can be used to request the LL of the left earplug to create a CIS.
步骤602:左耳塞的LL可以通过ACL链路1向手机的LL发送CIS建立响应消息,如空口响应消息LL_CIS_RSP。该CIS建立响应消息可以用于向手机指示左耳塞同意CIS的建立。Step 602: The LL of the left earplug can send a CIS establishment response message to the LL of the mobile phone through the ACL link 1, such as an air interface response message LL_CIS_RSP. The CIS establishment response message may be used to indicate to the mobile phone that the left earplug agrees to the establishment of CIS.
在一些实施例中,左耳塞的LL在接收到手机的LL发送的CIS建立请求消息后,左耳塞的LL可以向左耳塞的host发起CIS的创建请求。如左耳塞的LL可以通过HCI向左耳塞的host发送HCI指令“低功耗CIS请求(LE CIS request)”。左耳塞的host可以接受左耳塞的LL的CIS创建请求。如左耳塞的host可以通过HCI向左耳塞的LL发送HCI指令“低功耗CIS接受(LE accept CIS)”。左耳塞的LL接收到该HCI指令后,可以向手机的LL发送上述CIS建立响应消息。左耳塞的LL接收到该HCI指令后,还可以向左耳塞的host返回响应消息,如“命令状态(command status)”。In some embodiments, after receiving the CIS establishment request message sent by the LL of the mobile phone, the LL of the left earplug may initiate a CIS creation request to the host of the left earplug. For example, the LL of the left earplug can send the HCI command "low power consumption CIS request (LE CIS request)" to the host of the left earplug through HCI. The host of the left earplug can accept the CIS creation request of the left earplug LL. For example, the host of the left earplug can send the HCI command "low power CIS acceptance (LE accept CIS)" to the LL of the left earplug through HCI. After receiving the HCI command, the LL of the left earplug may send the CIS establishment response message to the LL of the mobile phone. After receiving the HCI command, the LL of the left earplug may return a response message to the host of the left earplug, such as “command status”.
步骤603:手机的LL可以通过ACL链路1向左耳塞的LL发送CIS建立消息,如空口通知消息LL_CIS_IND。该CIS建立消息可以用于通知左耳塞的LL CIS完成建立。Step 603: The LL of the mobile phone can send a CIS establishment message to the LL of the left earplug through the ACL link 1, such as an air interface notification message LL_CIS_IND. The CIS establishment message can be used to notify the LL of the left earplug that the CIS has completed establishment.
另外,手机的LL还可以通过HCI向手机的host发送HCI指令“低功耗CIS建立(LE CIS establish)”,以通知手机的host CIS完成建立。左耳塞的LL还可以通过HCI向左耳塞的host发送HCI指令“LE CIS establish”,以通知左耳塞的host CIS完成建立。这样,手机与左耳塞之间的CIS 1建立完成。类似的,如图6所示,手机可以与右耳塞执行步骤604,步骤605,步骤606(步骤604-步骤606的描述分别与上述步骤601-步骤603的描述类型,此处不再详细赘述),以便完成手机与右耳塞之间CIS2的建立。至此,手机与TWS耳机的左右耳塞之间的两个CIS便建立完成。In addition, the LL of the mobile phone can also send the HCI instruction "LE CIS establishment (LE) CIS establishment" to the host of the mobile phone through the HCI to notify the host of the mobile phone that the CIS is completed. The LL of the left earplug can also send the HCI command "LE CIS establish" to the host of the left earplug through HCI to notify the host of the left earplug to complete the establishment. In this way, the establishment of CIS1 between the mobile phone and the left earbud is completed. Similarly, as shown in FIG. 6, the mobile phone can perform step 604, step 605, and step 606 with the right earplug (the description of step 604-step 606 is the same as the description type of the above step 601-step 603, which will not be described in detail here) , In order to complete the establishment of CIS2 between the mobile phone and the right earbud. At this point, the two CIS between the mobile phone and the left and right earplugs of the TWS headset are established.
在手机与TWS耳机的左右耳塞之间的CIS(即上述CIS 1和CIS 2,该CIS 1和CIS 2归属于同一个CIG)建立完成后,手机可以通过CIS 1和CIS 2分别向TWS耳机的左耳塞和右耳塞传输音频数据。TWS耳机的左耳塞和右耳塞可以分别通过CIS 1 和CIS 2接收来自手机的音频数据。TWS耳机的左耳塞和右耳塞还可以基于同步的音频时钟和同步的蓝牙时钟确定出CIG同步点和CIG播放点,并根据确定出的CIG同步点和CIG播放点实现音频数据的播放级同步。After the establishment of the CIS between the mobile phone and the left and right earplugs of the TWS headset (that is, the above CIS 1 and CIS 2, the CIS 1 and CIS 2 belong to the same CIG), the mobile phone can send the TWS headset through CIS 1 and CIS 2 respectively The left earbud and right earbud transmit audio data. The left earplug and right earplug of the TWS headset can receive audio data from the mobile phone through CIS1 and CIS2, respectively. The left earplug and the right earplug of the TWS headset can also determine the CIG synchronization point and the CIG playback point based on the synchronized audio clock and the synchronized Bluetooth clock, and realize the playback level synchronization of the audio data according to the determined CIG synchronization point and the CIG playback point.
以下继续结合图5所示的音频传输框架,对手机向TWS耳机的左耳塞和右耳塞发送音频数据,以及TWS耳机的左耳塞和右耳塞实现音频数据的播放级同步的过程进行详细说明。如图6所示,该方法还可以包括:In the following, in conjunction with the audio transmission framework shown in FIG. 5, the process of sending audio data to the left earplug and the right earplug of the TWS earphone and the process of synchronizing the playback level of the audio data by the left earplug and the right earplug of the TWS earphone will be described in detail. As shown in FIG. 6, the method may further include:
步骤607:手机获取数据包,该数据包中包括待传输的音频数据。Step 607: The mobile phone obtains a data packet, and the data packet includes audio data to be transmitted.
在一些实施例中,如图6所示,步骤607具体的可以是:手机的host可以对待传输的音频数据进行编码处理。手机的host可以将进行编码后的音频数据通过HCI传输至手机的LL。手机的LL接收到该数据后,手机的LL所在的控制器可以为该数据增加帧头(frame header),帧尾(frame tail),前导(preamble)等字段中的一个或多个字段。这样,手机便获取到数据包。In some embodiments, as shown in FIG. 6, step 607 may specifically be: the host of the mobile phone may encode the audio data to be transmitted. The host of the mobile phone can transmit the encoded audio data to the LL of the mobile phone through HCI. After the LL of the mobile phone receives the data, the controller where the LL of the mobile phone is located may add one or more fields in the frame header, frame tail, preamble and other fields to the data. In this way, the phone gets the data packet.
步骤608:手机通过与TWS耳机的左耳塞和右耳塞之间的CIS,分别向左耳塞和右耳塞发送上述数据包。Step 608: The mobile phone sends the above data packets to the left earplug and the right earplug through the CIS between the left earplug and the right earplug of the TWS earphone, respectively.
例如,在手机获取到数据包后,手机的LL可以通过CIS 1向TWS耳机的左耳塞的LL发送该数据包,通过CIS 2向TWS耳机的右耳塞的LL发送该数据包。For example, after the mobile phone obtains the data packet, the LL of the mobile phone can send the data packet to the LL of the left earbud of the TWS headset through CIS 1 and the LL of the right earbud of the TWS headset through CIS 2.
步骤609:TWS耳机的左耳塞确定数据包中音频数据的CIG播放点。Step 609: The left earplug of the TWS earphone determines the CIG play point of the audio data in the data packet.
步骤610:TWS耳机的右耳塞确定数据包中音频数据的CIG播放点。Step 610: The right earplug of the TWS earphone determines the CIG play point of the audio data in the data packet.
在一些实施例中,根据BLE的ISO信道定义的传输机制,音频数据的CIG播放点可以根据CIG同步点和播放时延(presentation delay)确定,例如,如公式(1)所示。其中,Render_m_n用于表示音频数据的CIG播放点。SYNC_m_n表示CIG同步点。Presentation_delay表示播放时延。m表示包含该音频数据的数据包是蓝牙时钟上的第m个数据包。n表示包含该音频数据的数据包是音频时钟上的第n个数据包。m与n可以相同,也可以不同。In some embodiments, according to the transmission mechanism defined by the ISO channel of BLE, the CIG playback point of audio data may be determined according to the CIG synchronization point and playback delay (presentation delay), for example, as shown in formula (1). Among them, Render_m_n is used to represent the CIG play point of the audio data. SYNC_m_n represents the CIG synchronization point. Presentation_delay indicates the playback delay. m indicates that the data packet containing the audio data is the m-th data packet on the Bluetooth clock. n indicates that the packet containing the audio data is the nth packet on the audio clock. m and n may be the same or different.
Render_m_n=SYNC_m_n+Presentation_delay       公式(1)Render_m_n=SYNC_m_n+Presentation_delay formula (1)
另外,为了TWS耳机的左耳塞和右耳塞能够实现音频数据的播放级同步,则在确定上述CIG同步点时需要考虑音频时钟的同步以及蓝牙时钟的同步。In addition, in order to achieve playback-level synchronization of audio data in the left and right earplugs of the TWS earphone, the synchronization of the audio clock and the synchronization of the Bluetooth clock need to be considered when determining the CIG synchronization point.
在本实施例中,音频时钟可以用音频时间戳(audio time stamp,ATS)来表示,蓝牙时钟可以用蓝牙时间戳(Bluetooth time stamp,BTS)来表示。例如,BTS_m为包含该音频数据的数据包的蓝牙时间戳。ATS n为包含该音频数据的数据包的音频时间戳。对于ATS n和BTS m,在本实施例中,可以虚拟一个公共时钟,作为基准的参考时间。那么,ATS n可以根据以下公式确定: In this embodiment, the audio clock may be represented by an audio time stamp (ATS), and the Bluetooth clock may be represented by a Bluetooth time stamp (BTS). For example, BTS_m is the Bluetooth timestamp of the data packet containing the audio data. ATS n is the audio time stamp of the data packet containing the audio data. For ATS n and BTS m , in this embodiment, a common clock can be virtualized as a reference time for reference. Then, ATS n can be determined according to the following formula:
Figure PCTCN2018124768-appb-000001
Figure PCTCN2018124768-appb-000001
其中,Timeoffset ATS为音频时钟相对于公共时钟的起始偏移量。sample_num(i)为数据包的采样点数。f s为采样频率。 Wherein, Timeoffset ATS is the starting offset of the audio clock relative to the common clock. sample_num(i) is the number of sampling points of the data packet. f s is the sampling frequency.
BTS m可以根据以下公式确定: BTS m can be determined according to the following formula:
Figure PCTCN2018124768-appb-000002
Figure PCTCN2018124768-appb-000002
其中,Timeoffset BTS为蓝牙时钟相对于公共时钟的起始偏移量。Iso_interval(i)为两个连续的锚点(anchor point)之间的时间。手机与TWS耳机的左耳塞和右耳塞之间建立的CIS所归属的CIG可以包括多个CIG事件(CIG_event),每个CIG事件的开始时间点为一个锚点。两个连续的锚点之间的时间也可以理解为两个连续的CIG事件的开始时间点之间的时间。 Among them, Timeoffset BTS is the starting offset of the Bluetooth clock relative to the common clock. Iso_interval(i) is the time between two consecutive anchor points. The CIG to which the CIS established between the mobile phone and the left earplug and the right earplug of the TWS headset can include multiple CIG events (CIG_event), and the start time point of each CIG event is an anchor point. The time between two consecutive anchor points can also be understood as the time between the starting time points of two consecutive CIG events.
如果假设蓝牙时钟和音频时钟的起点对齐,也就是说,可以假设Timeoffset BTS=0,Timeoffset ATS=0。结合图7所示的音频数据的传输原理示意图可知:CIG同步点,即SYNC_m_n可以根据在以蓝牙时钟为参考的前提下包含音频数据的数据包的音频时间戳和传输时延确定,例如,如公式(2)所示。其中,ATS_m_n为在以蓝牙时钟为参考的前提下包含音频数据的数据包的音频时间戳。transport_delay为传输时延。 If it is assumed that the start points of the Bluetooth clock and the audio clock are aligned, that is to say, Timeoffset BTS =0 and Timeoffset ATS =0 can be assumed. With reference to the schematic diagram of the transmission principle of audio data shown in FIG. 7, it can be known that the CIG synchronization point, that is, SYNC_m_n can be determined according to the audio timestamp and transmission delay of a data packet containing audio data with the Bluetooth clock as a reference, for example, such as Formula (2) shows. Among them, ATS_m_n is the audio timestamp of the data packet containing audio data under the premise of taking the Bluetooth clock as a reference. transport_delay is the transmission delay.
SYNC_m_n=ATS_m_n+transport_delay     公式(2)SYNC_m_n=ATS_m_n+transport_delay formula (2)
其中,考虑到数据传输的起始点可能不是BTS=0,也就是说,允许数据从Init_BTS开始传输,也就是说,在手机与TWS耳机的左右耳塞建立了CIS后,第一个数据包是从nit_BTS开始传输的,因此,可以约定ATS_m_n可以根据以下公式(3)确定。Among them, considering that the starting point of data transmission may not be BTS=0, that is to say, the data is allowed to be transmitted from Init_BTS, that is, after the CIS is established on the left and right earbuds of the mobile phone and the TWS headset, the first data packet is from nit_BTS starts transmission, therefore, it can be agreed that ATS_m_n can be determined according to the following formula (3).
ATS_m_n=Init_BTS+ATS_n     公式(3)ATS_m_n=Init_BTS+ATS_n formula (3)
其中,Init_BTS(在实施例中,Init_BTS可以称为初始蓝牙时间戳)为第一个数据包的蓝牙时间戳(第一个数据包在音频时钟上的ATS=0),ATS_n为在音频时钟上的第n个数据包的音频时间戳。Among them, Init_BTS (In the embodiment, Init_BTS may be called the initial Bluetooth timestamp) is the Bluetooth timestamp of the first data packet (ATS=0 of the first data packet on the audio clock), ATS_n is on the audio clock The audio timestamp of the nth packet.
根据上述公式(1),公式(2)和公式(3)可以得到的是:音频数据的CIG播放点,即Render_m_n可以根据下述公式(4)确定。根据公式(4)可知,在确定上述CIG播放点时也是需要考虑音频时钟的同步以及蓝牙时钟的同步的。According to the above formula (1), formula (2) and formula (3) can be obtained: the CIG playback point of the audio data, that is, Render_m_n can be determined according to the following formula (4). According to formula (4), it is necessary to consider the synchronization of the audio clock and the synchronization of the Bluetooth clock when determining the above-mentioned CIG play point.
Render_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delayRender_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delay
公式(4)Formula (4)
由上述公式(4)可知,TWS耳机的左耳塞和右耳塞要实现音频数据的播放级同步,即要确定出Render_m_n,需要分别获知以下参数:It can be seen from the above formula (4) that the left and right earplugs of the TWS earphones need to achieve playback-level synchronization of audio data, that is, to determine Render_m_n, the following parameters need to be obtained separately:
参数(1):传输时延transport_delay。Parameter (1): transmission delay transport_delay.
参数(2):播放时延Presentation_delay。Parameter (2): Presentation delay delay_delay.
参数(3):第一个数据包的蓝牙时间戳Init_BTS。Parameter (3): Bluetooth timestamp Init_BTS of the first data packet.
以及参数(4):包含该音频数据的数据包的音频时间戳ATS_n。And parameter (4): audio timestamp ATS_n of the data packet containing the audio data.
对于上述参数(1)和上述参数(2):For the above parameter (1) and the above parameter (2):
在一些实施例中,传输时延transport_delay和播放时延Presentation_delay可以在手机与TWS耳机的左耳塞和右耳塞建立CIS时,由手机分别发送给TWS耳机的左耳塞和右耳塞。例如,结合图6,手机可以在与左耳塞建立CIS 1的过程中,将传输时延transport_delay和播放时延Presentation_delay发送给左耳塞,如携带在步骤601的空口请求消息LL_CIS_REQ中发送给左耳塞。手机可以在与右耳塞建立CIS 2的过程中,将传输时延transport_delay和播放时延Presentation_delay发送给右耳塞,如携带在步骤604的空口请求消息LL_CIS_REQ中发送给右耳塞。In some embodiments, the transmission delay transport_delay and the playback delay Presentation_delay can be sent from the mobile phone to the left and right earplugs of the TWS headset when the mobile phone establishes a CIS with the left and right earplugs of the TWS headset. For example, referring to FIG. 6, the mobile phone may send the transmission delay transport_delay and the playback delay Presentation_delay to the left earplug in the process of establishing the CIS 1 with the left earplug, such as the air interface request message LL_CIS_REQ carried in step 601 to the left earplug. The mobile phone may send the transmission delay transport_delay and the playback delay Presentation_delay to the right earplug in the process of establishing CIS 2 with the right earplug, for example, the air interface request message LL_CIS_REQ carried in step 604 is sent to the right earplug.
对于上述参数(3)和上述参数(4):For the above parameter (3) and the above parameter (4):
在一些实施例中,Init_BTS和ATS_n可以由手机在传输给该TWS耳机的左耳塞和 右耳塞的数据包中携带。例如,在步骤607中,手机的host对待传输的音频数据进行编码处理后,还可以给进行编码处理后的音频数据增加包头。如,增加包头后的编码音频数据可以称为编码数据包,或称为载荷(playload)。在本实施例中,该包头中可以包括ATS_n和Init_BTS。以该数据包是音频时钟上的第n个数据包为例,该数据包的音频时间戳可以用ATS_n表示。然后,手机的host可以将该编码数据包传输给手机的LL。手机的LL接收到该编码数据包后,该LL所在的控制器可以为该编码数据包增加上述帧头,帧尾,前导等字段中的一个或多个字段,以获得数据包。例如,该数据包的结构可以如图8所示,该数据包依次包括:前导,帧头,包头,音频数据和帧尾。In some embodiments, Init_BTS and ATS_n may be carried by the mobile phone in data packets transmitted to the left and right earplugs of the TWS headset. For example, in step 607, after encoding the audio data to be transmitted, the host of the mobile phone may add a packet header to the audio data after the encoding process. For example, the encoded audio data after adding the packet header may be called an encoded data packet, or called a load (playload). In this embodiment, the packet header may include ATS_n and Init_BTS. Taking the data packet as the nth data packet on the audio clock as an example, the audio time stamp of the data packet can be represented by ATS_n. Then, the host of the mobile phone can transmit the encoded data packet to the LL of the mobile phone. After the LL of the mobile phone receives the coded data packet, the controller where the LL is located may add one or more fields in the above frame header, frame end, preamble, etc. to the coded data packet to obtain the data packet. For example, the structure of the data packet may be as shown in FIG. 8. The data packet includes, in sequence, a preamble, a frame header, a packet header, audio data, and a frame tail.
其中,在一些实施例中,上述Init_BTS可以表示为ISO事件计数(ISO event counter)。在一些实施例中,结合上述ATS n的计算公式,在假设蓝牙时钟和音频时钟的起点对齐,也就是说,假设Timeoffset BTS=0,Timeoffset ATS=0的情况下,上述ATS_n可以以脉冲编码调制(pulse code modulation,PCM)样本(sample)来计数,或者,还可以以蓝牙时钟为单位计数。以ATS_n以PCM sample计数为例,音频时间戳ATS代表的是样点数,每个数据包的ATS的取值为前面所有数据包的采样点数之和。如果以0开始计数,即如果第一个数据包的ATS(即ATS_1)为0,第二个数据包的ATS(即ATS_2)为第一个数据的样点数,第三个数据包的ATS(即ATS_3)为第一个数据包和第二个数据包的采样点数之和。以此类推,第n个数据包的ATS(即ATS_n)为前n-1个数据包的采样点数之和。手机可以根据PCM样本计数来获得当前传输的数据的ATS(如ATS_n),并携带在数据包中发送给TWS耳机的左右耳塞。TWS耳机的左耳塞和右耳塞根据获得的ATS(如ATS_n),并结合采样频率f s(如16ksps,32ksps,44.1ksps,48ksps,96ksps)便可以计算出每个数据包的音频时间。 In some embodiments, the above Init_BTS can be expressed as an ISO event counter (ISO event counter). In some embodiments, in combination with the above calculation formula of ATS n , assuming that the start points of the Bluetooth clock and the audio clock are aligned, that is, assuming Timeoffset BTS =0 and Timeoffset ATS =0, the above ATS_n may be modulated by pulse code (pulse code modulation, PCM) sample (sample) to count, or, can also be counted in units of Bluetooth clock. Taking ATS_n taking PCM sample count as an example, the audio timestamp ATS represents the number of samples, and the value of ATS of each data packet is the sum of the number of sampling points of all previous data packets. If the count starts at 0, that is, if the ATS of the first data packet (ie ATS_1) is 0, the ATS of the second data packet (ie ATS_2) is the number of samples of the first data, and the ATS of the third data packet ( That is, ATS_3) is the sum of the sampling points of the first packet and the second packet. By analogy, the ATS of the nth data packet (that is, ATS_n) is the sum of the sampling points of the first n-1 data packets. The mobile phone can obtain the ATS (such as ATS_n) of the currently transmitted data according to the PCM sample count, and carry the left and right earplugs sent to the TWS headset in the data packet. According to the obtained ATS (such as ATS_n) and the sampling frequency f s (such as 16ksps, 32ksps, 44.1ksps, 48ksps, 96ksps), the left and right earplugs of the TWS earphone can calculate the audio time of each data packet.
在另外一些实施例中,上述Init_BTS也可以不是由手机携带在数据包中通知TWS耳机的左右耳塞的。而是TWS耳机的左右耳塞根据自身维护的ISO事件计数(ISO event count)获得。在一些实施例中,手机可以负责ISO event count的维护,并可以通过空口消息通知TWS耳机的左耳塞和右耳塞,以保证TWS耳机的左耳塞和右耳塞的ISO event count的同步。示例性的,ISO event count可以在手机与TWS耳机的左耳塞和右耳塞建立CIS时,由手机通过空口消息分别发送给TWS耳机的左耳塞和右耳塞。例如,结合图6,手机可以在与左耳塞建立CIS 1的过程中,将ISO event count发送给左耳塞,如携带在步骤603的空口请求消息LL_CIS_IND中发送给左耳塞。手机可以在与右耳塞建立CIS 2的过程中,将ISO event count发送给右耳塞,如携带在步骤606的空口请求消息LL_CIS_IND中发送给右耳塞。另外,手机还可以向TWS耳机的左耳塞和右耳塞发送指示值,TWS耳机的左耳塞和右耳塞在接收到ISO event count和指示值后,还可以根据该指示值对该ISO event count进行维护,以继续确保TWS耳机的左耳塞和右耳塞的ISO event count的同步。TWS耳机的左右耳塞可以根据维护的ISO event count获得在蓝牙时钟上第一数据包的蓝牙时间戳,即获得Init_BTS。In some other embodiments, the Init_BTS may not be carried by the mobile phone in a data packet to notify the left and right earplugs of the TWS headset. Instead, the left and right earplugs of the TWS headset are obtained based on the ISO event count (ISO event count) maintained by the TWS headset. In some embodiments, the mobile phone may be responsible for the maintenance of the ISO event, and may notify the left earplug and the right earplug of the TWS headset through an air interface message to ensure the synchronization of the ISO events of the left earplug and the right earplug of the TWS headset. Exemplarily, when the ISO establishes a CIS between the mobile phone and the left earplug and the right earplug of the TWS headset, the mobile phone sends the left earplug and the right earplug of the TWS headset through an air interface message, respectively. For example, referring to FIG. 6, the mobile phone may send the ISO event to the left earplug during the establishment of the CIS 1 with the left earplug, such as the air interface request message LL_CIS_IND carried in step 603 to the left earplug. The mobile phone may send the ISO event to the right earplug during the establishment of the CIS 2 with the right earplug, for example, the air interface request message LL_CIS_IND carried in step 606 is sent to the right earplug. In addition, the mobile phone can also send the indication value to the left and right earplugs of the TWS headset. After receiving the ISO event and the indication value, the left and right earplugs of the TWS headset can also maintain the ISO event according to the indication value. To continue to ensure the synchronization of the ISO and event of the left earplug and right earplug of the TWS headset. The left and right earbuds of the TWS headset can obtain the Bluetooth timestamp of the first data packet on the Bluetooth clock according to the maintained ISO event, that is, Init_BTS.
另外,在音频时钟和蓝牙时钟基于统一的公共时钟的前提下,根据上述公式(4)可以看到的是,任何数据包,其包含的音频数据的播放时间(即CIG播放点)唯一的和ATS_n,transport_delay以及Presentation_delay有关。也就是说,不论该数据包是在哪个蓝牙时钟的蓝牙时间戳传输的,接收侧设备(如TWS耳机的左右耳塞)接收到 数据包的时间以及播放数据包的时间是与传输时的蓝牙时间戳是无关的。ATS_n与实际传输音频数据时的BTS_m是解耦的,即实现了音频时间戳与蓝牙时间戳的解耦。In addition, on the premise that the audio clock and the Bluetooth clock are based on a unified common clock, according to the above formula (4), it can be seen that the playback time (ie, CIG playback point) of the audio data contained in any data packet is unique and ATS_n, transport_delay and Presentation_delay are related. In other words, regardless of the Bluetooth timestamp of which Bluetooth clock the data packet was transmitted, the time when the receiving device (such as the left and right earbuds of the TWS headset) received the data packet and the time when the data packet was played is the Bluetooth time at the time of transmission The stamp is irrelevant. ATS_n is decoupled from BTS_m when actually transmitting audio data, that is, decoupling of audio timestamp and Bluetooth timestamp is achieved.
在另一些实施例中,由于在实际传输时,会存在抖动,可能会出现TWS耳机的左右耳塞确定出的数据包中音频数据的CIG播放点早于当前实际时间的情况,因此,从音频数据播放的连续性要求考虑,音频数据的数据包的蓝牙时间戳与音频时间戳之间的时间偏移,如用timeoffset_m_n表示(timeoffset_m_n=BTS m-ATS n),需要满足以下条件: In other embodiments, due to jitter during actual transmission, the CIG play point of the audio data in the data packet determined by the left and right earplugs of the TWS earphone may be earlier than the current actual time. Therefore, the audio data The continuity of playback requires consideration. The time offset between the Bluetooth timestamp of the audio data packet and the audio timestamp, as represented by timeoffset_m_n (timeoffset_m_n=BTS m -ATS n ), must meet the following conditions:
条件1:timeoffset_m_n≤transport_delayCondition 1: timeoffset_m_n≤transport_delay
条件2:timeoffset_m_n≤Presentation_delayCondition 2: timeoffset_m_n≤Presentation_delay
条件3:timeoffset_m_n≤transport_delay+Presentation_delayCondition 3: timeoffset_m_n≤transport_delay+Presentation_delay
在确保timeoffset_m_n满足以上三个条件的情况下,就可以保证音频数据在播放级别的连续性。In the case of ensuring that timeoffset_m_n satisfies the above three conditions, the continuity of audio data at the playback level can be guaranteed.
结合以上描述,以TWS耳机的左耳塞确定数据包中音频数据的CIG播放点为例。如图6所示,步骤609具体的可以包括:In conjunction with the above description, the left earplug of the TWS earphone determines the CIG playback point of the audio data in the data packet as an example. As shown in FIG. 6, step 609 may specifically include:
左耳塞的LL接收到数据包后,可以将接收到的数据包通过HCI发送给左耳塞的host。左耳塞的host可以对数据包进行解析,以获得数据包的包头中携带的Init_BTS和ATS_n。这样,左耳塞的host根据数据包中携带的Init_BTS和ATS_n,空口请求消息LL_CIS_REQ中携带的transport_delay,便可以计算出数据包的CIG同步点。然后,根据确定出的CIG同步点和空口请求消息LL_CIS_REQ中携带的Presentation_delay便可以确定出音频数据的CIG播放点。After receiving the data packet, the LL of the left earplug can send the received data packet to the host of the left earplug through the HCI. The host of the left earplug can parse the data packet to obtain Init_BTS and ATS_n carried in the packet header. In this way, the host of the left earplug can calculate the CIG synchronization point of the data packet based on the Init_BTS and ATS_n carried in the data packet, and the transport_delay carried in the air interface request message LL_CIS_REQ. Then, according to the determined CIG synchronization point and the Presentation_delay carried in the air interface request message LL_CIS_REQ, the CIG playback point of the audio data can be determined.
同样的,右耳塞也可以经过上述处理后获得音频数据的CIG播放点。Similarly, the right earplug can also obtain the CIG playback point of the audio data after the above processing.
步骤611:TWS耳机的左耳塞根据确定的CIG播放点播放数据包中音频数据。Step 611: The left earplug of the TWS earphone plays the audio data in the data packet according to the determined CIG play point.
步骤612:TWS耳机的右耳塞根据确定的CIG播放点播放数据包中音频数据。Step 612: The right earplug of the TWS earphone plays the audio data in the data packet according to the determined CIG play point.
在TWS耳机的左耳塞和右耳塞分别确定出CIG播放点后,便可以在确定的CIG播放点处播放各自接收到的数据包的音频数据。例如,TWS耳机的左耳塞和右耳塞的host在确定出CIG播放点后,可以将CIG播放点和音频数据传输给左耳塞和右耳塞的DSP,由DSP对音频数据进行译码处理后在CIG播放点处进行播放。After the left earplug and the right earplug of the TWS earphone respectively determine the CIG play point, the audio data of the received data packets can be played at the determined CIG play point. For example, after the host of the left earplug and the right earplug of the TWS earphone determines the CIG playback point, the CIG playback point and audio data can be transmitted to the DSP of the left earplug and the right earplug, and the DSP decodes the audio data to the CIG Play at the playback point.
采用该技术方案,TWS耳机的左耳塞和右耳塞可以根据同步的蓝牙时钟和同步的音频时钟确定音频数据的CIG同步点和CIG播放点,并利用确定出的CIG播放点实现了音频数据的播放级同步。另外,在本实施例中,蓝牙时钟和音频时钟是解耦独立进行同步的,不需要蓝牙时钟和音频时钟的硬件时钟同步。对于蓝牙时钟,只需在每个数据包中携带第一个数据包的BTS,即Init_BTS,不需要获取每个数据包的BTS,减少负载。对应音频时钟,每个数据包是进行独立标注的,因此,在实现音频数据的播放级同步的同时,还可以支持每个数据包的独立播放。这样,本实施例的技术方案可以适用于单耳塞单独使用,双耳塞同时使用,以及单耳双耳切换等场景中。Using this technical solution, the left earplug and right earplug of the TWS earphone can determine the CIG synchronization point and CIG playback point of audio data according to the synchronized Bluetooth clock and synchronized audio clock, and use the determined CIG playback point to realize the playback of audio data Level synchronization. In addition, in this embodiment, the Bluetooth clock and the audio clock are decoupled and synchronized independently, and no hardware clock synchronization of the Bluetooth clock and the audio clock is required. For the Bluetooth clock, it is only necessary to carry the BTS of the first data packet in each data packet, that is, Init_BTS, and there is no need to obtain the BTS of each data packet to reduce the load. Corresponding to the audio clock, each data packet is independently labeled. Therefore, while achieving playback-level synchronization of audio data, it can also support independent playback of each data packet. In this way, the technical solution of this embodiment can be applied to scenarios where single earplugs are used alone, both earplugs are used simultaneously, and single ear and binaural switching is performed.
在本申请的另一些实施例还提供了一种外围设备,如该外围设备为蓝牙耳机,该蓝牙耳机可以包括至少一个耳塞。如图9所示,该蓝牙耳机的耳塞可以包括:一个或多个处理器901;存储器902;通信接口903;受话器904;麦克风905;以及一个或多个计算机程序906,上述各器件可以通过一个或多个通信总线907连接。其中该一 个或多个计算机程序906被存储在上述存储器902中,并被配置为被该一个或多个处理器901执行,该一个或多个计算机程序906包括指令,上述指令可以用于执行如图6相应实施例中耳塞(如左耳塞,右耳塞)执行的各个步骤。当然,图9所示的蓝牙耳机的耳塞还可以包括如传感器等其他器件,本申请实施例对此不做任何限制。当图9所示的耳塞还包括如传感器等其他器件时,其可以为图2所示的耳塞。In some other embodiments of the present application, a peripheral device is also provided. For example, the peripheral device is a Bluetooth headset, and the Bluetooth headset may include at least one earplug. As shown in FIG. 9, the earbuds of the Bluetooth headset may include: one or more processors 901; a memory 902; a communication interface 903; a receiver 904; a microphone 905; and one or more computer programs 906. Or multiple communication buses 907 are connected. The one or more computer programs 906 are stored in the above-mentioned memory 902, and are configured to be executed by the one or more processors 901. The one or more computer programs 906 include instructions, and the above instructions may be used to execute Each step performed by the earplug (such as the left earplug and the right earplug) in the corresponding embodiment of FIG. 6. Of course, the earbuds of the Bluetooth headset shown in FIG. 9 may also include other devices such as sensors and the like, which are not limited in the embodiments of the present application. When the earplug shown in FIG. 9 further includes other devices such as sensors, it may be the earplug shown in FIG. 2.
本申请另一些实施例还提供了一种电子设备,如图10所示,该电子设备可以包括:触摸屏1001,其中,所述触摸屏1001可以包括触敏表面1006和显示屏1007;一个或多个处理器1002;存储器1003;以及一个或多个计算机程序1004,上述各器件可以通过一个或多个通信总线1005连接。其中该一个或多个计算机程序1004被存储在上述存储器1003中,并被配置为被该一个或多个处理器1002执行,该一个或多个计算机程序1004包括指令,上述指令可以用于执行如图6相应实施例中电子设备执行的各个步骤。当然,图10所示的电子设备还可以如传感器模块、音频模块以及SIM卡接口等其他器件,本申请实施例对此不做任何限制。当图10所示的电子设备还包括如传感器模块、音频模块以及SIM卡接口等其他器件时,其可以为图4所示的电子设备。Other embodiments of the present application also provide an electronic device. As shown in FIG. 10, the electronic device may include: a touch screen 1001, wherein the touch screen 1001 may include a touch-sensitive surface 1006 and a display screen 1007; one or more The processor 1002; the memory 1003; and one or more computer programs 1004. The above devices may be connected through one or more communication buses 1005. The one or more computer programs 1004 are stored in the above-mentioned memory 1003 and are configured to be executed by the one or more processors 1002. The one or more computer programs 1004 include instructions, which can be used to execute Each step performed by the electronic device in the corresponding embodiment of FIG. 6. Of course, the electronic device shown in FIG. 10 may also include other devices such as a sensor module, an audio module, and a SIM card interface, which is not limited in the embodiments of the present application. When the electronic device shown in FIG. 10 further includes other devices such as a sensor module, an audio module, and a SIM card interface, it may be the electronic device shown in FIG. 4.
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在电子设备上运行时,使得该电子设备执行图6中的相关方法步骤,以实现上述实施例中的方法。This embodiment also provides a computer-readable storage medium including instructions. When the above instructions run on an electronic device, the electronic device causes the electronic device to perform the relevant method steps in FIG. 6 to implement the above The method in the examples.
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在蓝牙耳机的耳塞上运行时,使得该蓝牙耳机的耳塞执行图6中的相关方法步骤,以实现上述实施例中的方法。This embodiment also provides a computer-readable storage medium including instructions. When the above instructions run on the earphone of the Bluetooth headset, the earphone of the Bluetooth headset executes the relevant method steps in FIG. 6 To implement the method in the above embodiment.
本实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如图6中的相关方法步骤,以实现上述实施例中的方法。This embodiment also provides a computer program product containing instructions. When the computer program product runs on an electronic device, the electronic device is caused to execute relevant method steps as shown in FIG. 6 to implement the method in the above embodiment.
本实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在蓝牙耳机的耳塞上运行时,使得该蓝牙耳机的耳塞执行如图6中的相关方法步骤,以实现上述实施例中的方法。This embodiment also provides a computer program product containing instructions. When the computer program product runs on the earphone of the Bluetooth headset, the earphone of the Bluetooth headset executes the relevant method steps shown in FIG. 6 to implement the above embodiment The method.
本实施例还提供了一种控制设备,所述控制设备包括处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器执行所述计算机指令时,所述控制设备执行如图6中的相关方法步骤实现上述实施例中的方法。该控制设备可以是一个集成电路IC,也可以是一个片上系统SOC。其中集成电路可以是通用集成电路,也可以是一个现场可编程门阵列FPGA,也可以是一个专用集成电路ASIC。This embodiment also provides a control device. The control device includes a processor and a memory. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions At this time, the control device executes the relevant method steps as shown in FIG. 6 to implement the method in the above embodiment. The control device may be an integrated circuit IC or a system-on-chip SOC. The integrated circuit may be a general-purpose integrated circuit, a field programmable gate array FPGA, or an application-specific integrated circuit ASIC.
本实施例还提供了一种音频数据的同步装置,该装置具有实现上述方法实际中电子设备或蓝牙耳机的耳塞行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。This embodiment also provides a device for synchronizing audio data. The device has a function of realizing the earplug behavior of an electronic device or a Bluetooth headset in the above method. The function can be realized by hardware, or can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
其中,本实施例提供的电子设备、蓝牙耳机的耳塞、计算机存储介质、计算机程序产品、控制设备或音频数据的同步装置均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic device, the earbud of the Bluetooth headset, the computer storage medium, the computer program product, the control device, or the audio data synchronization device provided in this embodiment are all used to execute the corresponding method provided above, therefore, it can achieve For the beneficial effects, please refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的 方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that, for convenience and conciseness of description, only the above-mentioned division of each functional module is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs Completed by different functional modules, that is, dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. For the specific working processes of the system, device and unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本实施例所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this embodiment, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a division of logical functions. In actual implementation, there may be other divisions, for example, multiple units or components may be The combination can either be integrated into another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each of the embodiments of this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The above integrated unit can be implemented in the form of hardware or software function unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment essentially or part of the contribution to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium In it, several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in the various embodiments. The foregoing storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any change or replacement within the technical scope disclosed in this application should be covered within the scope of protection of this application . Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (19)

  1. 一种音频数据的同步方法,其特征在于,应用于电子设备,所述电子设备分别与第一耳塞和第二耳塞建立无线链接,所述方法包括:A method for synchronizing audio data is characterized by being applied to an electronic device, which establishes a wireless link with a first earplug and a second earplug, respectively. The method includes:
    所述电子设备通过基于连接的等时流组(CIG)的第一基于连接的等时音频流(CIS),向所述第一耳塞发送数据包;The electronic device sends a data packet to the first earplug through a first connection-based isochronous stream (CIG) based connection-based isochronous audio stream (CIS);
    所述电子设备通过所述CIG的第二CIS,向所述第二耳塞发送所述数据包;The electronic device sends the data packet to the second earplug through the second CIS of the CIG;
    其中,所述数据包包括:音频数据,所述数据包的音频时间戳,以及初始蓝牙时间戳,所述初始蓝牙时间戳为所述电子设备与所述第一耳塞建立所述第一CIS,与所述第二耳塞建立所述第二CIS后传输的第一个数据包的蓝牙时间戳;所述音频时间戳和所述初始蓝牙时间戳用于所述第一耳塞和所述第二耳塞确定CIG播放点,所述CIG播放点是所述第一耳塞和所述第二耳塞播放所述数据包中的音频数据的时间点。Wherein, the data packet includes: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp establishes the first CIS for the electronic device and the first earbud, Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earplug; the audio timestamp and the initial Bluetooth timestamp are used for the first earplug and the second earplug A CIG play point is determined, and the CIG play point is a time point at which the first earplug and the second earplug play the audio data in the data packet.
  2. 根据权利要求1所述的方法,其特征在于,在所述电子设备向所述第一耳塞发送所述数据包,向所述第二耳塞发送所述数据包之前,所述方法还包括:The method according to claim 1, wherein before the electronic device sends the data packet to the first earplug and the data packet to the second earplug, the method further comprises:
    所述电子设备与所述第一耳塞建立所述CIG的所述第一CIS,与所述第二耳塞建立所述CIG的所述第二CIS。The electronic device establishes the first CIS of the CIG with the first earplug, and establishes the second CIS of the CIG with the second earplug.
  3. 根据权利要求2所述的方法,其特征在于,所述电子设备与所述第一耳塞建立所述CIG的所述第一CIS,与所述第二耳塞建立所述CIG的所述第二CIS,具体包括:The method according to claim 2, wherein the electronic device establishes the first CIS of the CIG with the first earplug, and establishes the second CIS of the CIG with the second earplug , Including:
    所述电子设备向所述第一耳塞发送CIS建立请求消息,接收所述第一耳塞发送的CIS建立响应消息,向所述第一耳塞发送CIS建立消息;The electronic device sends a CIS establishment request message to the first earplug, receives a CIS establishment response message sent by the first earplug, and sends a CIS establishment message to the first earplug;
    所述电子设备向所述第二耳塞发送CIS建立请求消息,接收所述第二耳塞发送的CIS建立响应消息,向所述第二耳塞发送CIS建立消息;The electronic device sends a CIS establishment request message to the second earplug, receives a CIS establishment response message sent by the second earplug, and sends a CIS establishment message to the second earplug;
    其中,所述CIS建立请求消息包括传输时延和播放时延,所述传输时延和所述播放时延用于所述第一耳塞和所述第二耳塞确定所述CIG播放点。Wherein, the CIS establishment request message includes a transmission delay and a playback delay, and the transmission delay and the playback delay are used for the first earplug and the second earplug to determine the CIG play point.
  4. 根据权利要求2或3所述的方法,其特征在于,在所述电子设备与所述第一耳塞建立所述CIG的所述第一CIS,与所述第二耳塞建立所述CIG的所述第二CIS之前,所述方法还包括:The method according to claim 2 or 3, wherein the first CIS that establishes the CIG in the electronic device and the first earplug and the CIG that establishes the CIG with the second earplug Before the second CIS, the method further includes:
    所述电子设备分别与所述第一耳塞和所述第二耳塞进行配对;The electronic device is paired with the first earplug and the second earplug, respectively;
    所述电子设备与所述第一耳塞建立第一异步面向连接(ACL)链路;The electronic device establishes a first asynchronous connection-oriented (ACL) link with the first earplug;
    所述电子设备与所述第二耳塞建立第二ACL链路;The electronic device establishes a second ACL link with the second earplug;
    所述电子设备与所述第一耳塞建立所述CIG的所述第一CIS,与所述第二耳塞建立所述CIG的所述第二CIS,具体包括:The electronic device establishing the first CIS of the CIG with the first earplug and the second CIS establishing the CIG with the second earplug specifically include:
    所述电子设备通过所述第一ACL链路与所述第一耳塞建立所述CIG的所述第一CIS,通过所述第二ACL链路与所述第二耳塞建立所述CIG的所述第二CIS。The electronic device establishes the first CIS of the CIG with the first earplug through the first ACL link, and establishes the CIG of the CIG with the second earplug through the second ACL link Second CIS.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述数据包的音频时间戳与所述数据包的蓝牙时间戳之间的时间偏移满足以下条件中的至少一个:小于或等于传输时延,小于或等于播放时延,小于或等于传输时延与播放时延之和。The method according to any one of claims 1 to 4, wherein the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet satisfies at least one of the following conditions: Less than or equal to transmission delay, less than or equal to playback delay, less than or equal to the sum of transmission delay and playback delay.
  6. 一种音频数据的同步方法,其特征在于,应用于与电子设备建立无线连接的第一耳塞和第二耳塞,所述方法包括:A method for synchronizing audio data is characterized by being applied to a first earplug and a second earplug that establish a wireless connection with an electronic device. The method includes:
    所述第一耳塞通过基于连接的等时流组(CIG)的第一基于连接的等时音频流 (CIS),接收来自所述电子设备的数据包;所述第二耳塞通过所述CIG的第二CIS,接收来自所述电子设备的所述数据包;所述数据包包括:音频数据,所述数据包的音频时间戳,以及初始蓝牙时间戳,所述初始蓝牙时间戳为所述电子设备与所述第一耳塞建立所述第一CIS,与所述第二耳塞建立所述第二CIS后传输的第一个数据包的蓝牙时间戳;The first earplug receives a data packet from the electronic device through a first connection-based isochronous stream (CIG)-based isochronous audio stream (CIS); the second earplug passes through the CIG The second CIS receives the data packet from the electronic device; the data packet includes: audio data, an audio time stamp of the data packet, and an initial Bluetooth time stamp, the initial Bluetooth time stamp is the electronic The device establishes the first CIS with the first earplug and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earplug;
    所述第一耳塞和所述第二耳塞分别根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点;The first earplug and the second earplug determine the CIG play point according to the audio timestamp, the initial Bluetooth timestamp, the transmission delay, and the playback delay, respectively;
    所述第一耳塞和所述第二耳塞分别在所述CIG播放点播放所述数据包中的音频数据。The first earplug and the second earplug respectively play the audio data in the data packet at the CIG play point.
  7. 根据权利要求6所述的方法,其特征在于,在所述第一耳塞接收来自所述电子设备的所述数据包;所述第二耳塞接收来自所述电子设备的所述数据包之前,所述方法还包括:The method of claim 6, wherein before the first earplug receives the data packet from the electronic device; before the second earplug receives the data packet from the electronic device, the The method also includes:
    所述第一耳塞与所述电子设备建立所述CIG的所述第一CIS,所述第二耳塞与所述电子设备建立所述CIG的所述第二CIS。The first earplug and the electronic device establish the first CIS of the CIG, and the second earplug and the electronic device establish the second CIS of the CIG.
  8. 根据权利要求6所述的方法,其特征在于,所述第一耳塞与所述电子设备建立所述CIG的所述第一CIS,所述第二耳塞与所述电子设备建立所述CIG的所述第二CIS,具体包括:The method according to claim 6, wherein the first earplug and the electronic device establish the first CIS of the CIG, and the second earplug and the electronic device establish the location of the CIG The second CIS, including:
    所述第一耳塞接收来自所述电子设备的CIS建立请求消息,向所述电子设备发送CIS建立响应消息,接收来自所述电子设备的CIS建立消息;The first earplug receives a CIS establishment request message from the electronic device, sends a CIS establishment response message to the electronic device, and receives a CIS establishment message from the electronic device;
    所述第二耳塞接收来自所述电子设备的CIS建立请求消息,向所述电子设备发送CIS建立响应消息,接收来自所述电子设备的CIS建立消息;The second earplug receives a CIS establishment request message from the electronic device, sends a CIS establishment response message to the electronic device, and receives a CIS establishment message from the electronic device;
    其中,所述CIS建立请求消息包括所述传输时延和所述播放时延。Wherein, the CIS establishment request message includes the transmission delay and the playback delay.
  9. 根据权利要求7或8所述的方法,其特征在于,在所述第一耳塞与所述电子设备建立所述CIG的所述第一CIS,所述第二耳塞与所述电子设备建立所述CIG的所述第二CIS之前,所述方法还包括:The method according to claim 7 or 8, wherein the first CIS of the CIG is established between the first earplug and the electronic device, and the second earplug and the electronic device establish the Before the second CIS of CIG, the method further includes:
    所述第一耳塞和所述第二耳塞分别与所述电子设备进行配对;The first earplug and the second earplug are paired with the electronic device respectively;
    所述第一耳塞与所述电子设备建立第一异步面向连接(ACL)链路;The first earplug establishes a first asynchronous connection-oriented (ACL) link with the electronic device;
    所述第二耳塞与所述电子设备建立第二ACL链路;The second earplug establishes a second ACL link with the electronic device;
    所述第一耳塞与所述电子设备建立所述CIG的所述第一CIS,所述第二耳塞与所述电子设备建立所述CIG的所述第二CIS,具体包括:The first earplug and the electronic device establish the first CIS of the CIG, and the second earplug and the electronic device establish the second CIS of the CIG, specifically including:
    所述第一耳塞通过所述第一ACL链路与所述电子设备建立所述CIG的所述第一CIS,所述第二耳塞通过所述第二ACL链路与所述电子设备建立所述CIG的所述第二CIS。The first earplug establishes the first CIS of the CIG with the electronic device through the first ACL link, and the second earplug establishes the first CIS with the electronic device through the second ACL link The second CIS of CIG.
  10. 根据权利要求6-9中任一项所述的方法,其特征在于,所述数据包的音频时间戳与所述数据包的蓝牙时间戳之间的时间偏移满足以下条件中的至少一个:小于或等于传输时延,小于或等于播放时延,小于或等于传输时延与播放时延之和。The method according to any one of claims 6-9, wherein the time offset between the audio time stamp of the data packet and the Bluetooth time stamp of the data packet satisfies at least one of the following conditions: Less than or equal to transmission delay, less than or equal to playback delay, less than or equal to the sum of transmission delay and playback delay.
  11. 根据权利要求6-10中任一项所述的方法,其特征在于,所述第一耳塞和所述第二耳塞分别根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,具体包括:The method according to any one of claims 6-10, wherein the first earplug and the second earplug are based on the audio timestamp, the initial Bluetooth timestamp, transmission delay, and playback, respectively The delay determines the CIG play point, which includes:
    所述第一耳塞根据所述音频时间戳,所述初始蓝牙时间戳和所述传输时延确定CIG同步点,所述第一耳塞根据确定的CIG同步点和所述播放时延确定所述CIG播放点;The first earbud determines the CIG synchronization point according to the audio timestamp, the initial Bluetooth timestamp and the transmission delay, and the first earbud determines the CIG according to the determined CIG synchronization point and the playback delay Play point
    所述第二耳塞根据所述音频时间戳,所述初始蓝牙时间戳和所述传输时延确定CIG同步点,所述第一耳塞根据确定的CIG同步点和所述播放时延确定所述CIG播放点。The second earbud determines the CIG synchronization point according to the audio timestamp, the initial Bluetooth timestamp and the transmission delay, and the first earbud determines the CIG according to the determined CIG synchronization point and the playback delay Play point.
  12. 根据权利要求6-11中任一项所述的方法,其特征在于,所述根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,具体包括:The method according to any one of claims 6-11, wherein the determining the CIG play point according to the audio time stamp, the initial Bluetooth time stamp, the transmission delay and the playback delay specifically includes:
    根据Render_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delay确定所述CIG播放点;Determine the CIG play point according to Render_m_n=Init_BTS+transport_delay+ATS_n+Presentation_delay;
    其中,Render_m_n为所述CIG播放点,Init_BTS为所述初始蓝牙时间戳,ATS_n为所述音频时间戳,transport_delay为所述传输时延,Presentation_delay为所述播放时延,m表示包含所述数据包是蓝牙时钟上的第m个数据包,n表示所述数据包是音频时钟上的第n个数据包。Where Render_m_n is the CIG play point, Init_BTS is the initial Bluetooth timestamp, ATS_n is the audio timestamp, transport_delay is the transmission delay, Presentation_delay is the playback delay, and m indicates that the packet is included Is the m-th data packet on the Bluetooth clock, and n indicates that the data packet is the n-th data packet on the audio clock.
  13. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器、无线通信模块以及移动通信模块;其中:An electronic device, characterized by comprising: one or more processors, memory, wireless communication module and mobile communication module; wherein:
    所述存储器、所述无线通信模块以及所述移动通信模块与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1-5中任一项所述的音频数据的同步方法。The memory, the wireless communication module, and the mobile communication module are coupled to the one or more processors. The memory is used to store computer program code. The computer program code includes computer instructions. When the one or When multiple processors execute the computer instructions, the electronic device executes the audio data synchronization method according to any one of claims 1-5.
  14. 一种蓝牙耳机,其特征在于,所述蓝牙耳机包括至少一个耳塞;A Bluetooth headset, characterized in that the Bluetooth headset includes at least one earplug;
    所述耳塞包括:处理器、存储器、无线通信模块、受话器以及麦克风;所述存储器、所述无线通信模块、所述受话器以及所述麦克风与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;The earplug includes: a processor, a memory, a wireless communication module, a receiver, and a microphone; the memory, the wireless communication module, the receiver, and the microphone are coupled to the processor, and the memory is used to store a computer program Code, the computer program code includes computer instructions;
    当所述处理器执行所述计算机指令时,所述耳塞执行如权利要求6-12中任一项所述的音频数据的同步方法。When the processor executes the computer instruction, the earplug executes the audio data synchronization method according to any one of claims 6-12.
  15. 一种蓝牙音频系统,其特征在于,所述蓝牙音频系统包括:电子设备,第一耳塞以及第二耳塞;其中:A Bluetooth audio system, characterized in that the Bluetooth audio system includes: an electronic device, a first earplug and a second earplug; wherein:
    所述电子设备用于通过基于连接的等时流组(CIG)的第一基于连接的等时音频流(CIS),向所述第一耳塞发送数据包,通过所述CIG的第二CIS,向所述第二耳塞发送所述数据包;所述数据包包括:音频数据,所述数据包的音频时间戳,以及初始蓝牙时间戳,所述初始蓝牙时间戳为所述电子设备与所述第一耳塞建立所述第一CIS,与所述第二耳塞建立所述第二CIS后传输的第一个数据包的蓝牙时间戳;The electronic device is configured to send a data packet to the first earplug through a first connection-based isochronous stream (CIS) based connection isochronous stream (CIG), and through a second CIS of the CIG, Sending the data packet to the second earbud; the data packet includes: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is the electronic device and the The first earbud establishes the first CIS, and the Bluetooth timestamp of the first data packet transmitted after establishing the second CIS with the second earbud;
    所述第一耳塞用于接收所述数据包,根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,在所述CIG播放点播放所述数据包中的音频数据;The first earplug is used to receive the data packet, determine a CIG playback point based on the audio timestamp, the initial Bluetooth timestamp, transmission delay and playback delay, and play the data packet at the CIG playback point Audio data in
    所述第二耳塞用于接收所述数据包,根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点,在所述CIG播放点播放所述数据包中的音频数据。The second earplug is used to receive the data packet, determine a CIG playback point based on the audio timestamp, the initial Bluetooth timestamp, transmission delay and playback delay, and play the data packet at the CIG playback point Audio data in.
  16. 一种蓝牙芯片,其特征在于,所述蓝牙芯片包括存储器,处理器和射频模块,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;其中:A Bluetooth chip, characterized in that the Bluetooth chip includes a memory, a processor and a radio frequency module, the memory is used to store computer program code, and the computer program code includes computer instructions; wherein:
    所述处理器执行所述存储器存储的计算机指令控制所述射频模块通过基于连接的等时流组(CIG)的第一基于连接的等时音频流(CIS),向第一耳塞发送数据包,通过所述CIG的第二CIS,向第二耳塞发送所述数据包;The processor executes computer instructions stored in the memory to control the radio frequency module to send a data packet to the first earbud through a first connection-based isochronous stream (CIG) based connection-based isochronous audio stream (CIS), Sending the data packet to the second earplug through the second CIS of the CIG;
    所述数据包包括:音频数据,所述数据包的音频时间戳,以及初始蓝牙时间戳,所述初始蓝牙时间戳为所述电子设备与所述第一耳塞建立所述第一CIS,与所述第二耳塞建立所述第二CIS后传输的第一个数据包的蓝牙时间戳;所述音频时间戳和所述初始蓝牙时间戳用于所述第一耳塞和所述第二耳塞确定CIG播放点,所述CIG播放点是所述第一耳塞和所述第二耳塞播放所述数据包中的音频数据的时间点。The data packet includes: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp establishes the first CIS for the electronic device and the first earbud, and all The Bluetooth timestamp of the first data packet transmitted after the second earbud establishes the second CIS; the audio timestamp and the initial Bluetooth timestamp are used for the first earbud and the second earbud to determine the CIG Play point, the CIG play point is a time point at which the first earplug and the second earplug play the audio data in the data packet.
  17. 一种蓝牙芯片,其特征在于,所述蓝牙芯片包括存储器,处理器和射频模块,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;其中:A Bluetooth chip, characterized in that the Bluetooth chip includes a memory, a processor and a radio frequency module, the memory is used to store computer program code, and the computer program code includes computer instructions; wherein:
    所述处理器执行所述存储器存储的计算机指令控制所述射频模块通过基于连接的等时流组(CIG)的基于连接的等时音频流(CIS),接收来自电子设备的数据包;所述数据包包括:音频数据,所述数据包的音频时间戳,以及初始蓝牙时间戳,所述初始蓝牙时间戳为所述CIS建立后传输的第一个数据包的蓝牙时间戳;根据所述音频时间戳,所述初始蓝牙时间戳,传输时延和播放时延确定CIG播放点;以便包括所述蓝牙芯片的耳塞的麦克风在所述CIG播放点播放所述数据包中的音频数据。The processor executes computer instructions stored in the memory to control the radio frequency module to receive a data packet from an electronic device through a connection-based isochronous stream group (CIG) connection-based isochronous audio stream (CIS); The data packet includes: audio data, an audio timestamp of the data packet, and an initial Bluetooth timestamp, the initial Bluetooth timestamp is the Bluetooth timestamp of the first data packet transmitted after the CIS is established; according to the audio The timestamp, the initial Bluetooth timestamp, the transmission delay and the playback delay determine the CIG playback point; so that the microphone including the earbuds of the Bluetooth chip plays the audio data in the data packet at the CIG playback point.
  18. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-5中任一项所述的音频数据的同步方法。A computer storage medium, characterized by comprising computer instructions, when the computer instructions run on an electronic device, the electronic device is caused to perform the audio data synchronization method according to any one of claims 1-5 .
  19. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在蓝牙耳机的耳塞上运行时,使得所述蓝牙耳机的耳塞执行如权利要求6-12中任一项所述的音频数据的同步方法。A computer storage medium, characterized by comprising computer instructions, when the computer instructions run on the earphone of the Bluetooth headset, the earphone of the Bluetooth headset executes the audio according to any one of claims 6-12 Data synchronization method.
PCT/CN2018/124768 2018-12-28 2018-12-28 Audio data synchronization method and device WO2020133183A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/124768 WO2020133183A1 (en) 2018-12-28 2018-12-28 Audio data synchronization method and device
CN201880100553.0A CN113228701B (en) 2018-12-28 2018-12-28 Audio data synchronization method and device
CN202210871663.5A CN115426064A (en) 2018-12-28 2018-12-28 Audio data synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/124768 WO2020133183A1 (en) 2018-12-28 2018-12-28 Audio data synchronization method and device

Publications (1)

Publication Number Publication Date
WO2020133183A1 true WO2020133183A1 (en) 2020-07-02

Family

ID=71129430

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124768 WO2020133183A1 (en) 2018-12-28 2018-12-28 Audio data synchronization method and device

Country Status (2)

Country Link
CN (2) CN113228701B (en)
WO (1) WO2020133183A1 (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112188344A (en) * 2020-09-30 2021-01-05 安凯(广州)微电子技术有限公司 TWS earphone and control method thereof
CN113613221A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system
EP3843495A4 (en) * 2019-03-18 2021-11-24 Spreadtrum Communications (Shanghai) Co., Ltd. Communication method and apparatus, and device
US20220039041A1 (en) * 2018-12-07 2022-02-03 Huawei Technologies Co., Ltd. Point-to-Multipoint Data Transmission Method and Electronic Device
CN114079898A (en) * 2021-07-22 2022-02-22 珠海市杰理科技股份有限公司 Audio data communication method, device, equipment and system in dual-transmission mode
CN114553351A (en) * 2020-11-24 2022-05-27 华为技术有限公司 Time synchronization method, control device, equipment and storage medium
US20220240017A1 (en) * 2021-01-25 2022-07-28 Dell Products L.P. Contextual latency configuration for isochronous audio transport
EP4061069A1 (en) * 2021-03-18 2022-09-21 Shenzhen Goodix Technology Co., Ltd. Synchronization control method, chip, electronic device and storage medium
CN115103431A (en) * 2022-03-25 2022-09-23 恒玄科技(上海)股份有限公司 Method for realizing synchronous playing of Bluetooth headset equipment and Bluetooth headset equipment thereof
CN115379283A (en) * 2022-08-16 2022-11-22 维沃移动通信有限公司 Video call method and device
CN115474180A (en) * 2021-06-11 2022-12-13 Oppo广东移动通信有限公司 Bluetooth headset box, wireless audio system, communication method and device
CN115567086A (en) * 2022-09-09 2023-01-03 安克创新科技股份有限公司 Audio transmission device, audio playback device, and audio transmission and synchronization system
CN116033597A (en) * 2022-08-08 2023-04-28 荣耀终端有限公司 Bluetooth connection method and device, electronic equipment and storage medium
WO2023185171A1 (en) * 2022-03-31 2023-10-05 哲库科技(上海)有限公司 Data transmission method and apparatus, electronic device and computer-readable storage medium
WO2024016948A1 (en) * 2022-07-21 2024-01-25 Oppo广东移动通信有限公司 Information updating method and apparatus, audio sharing method and system, and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592568A (en) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 Audio playing method and system
US20170078836A1 (en) * 2015-09-12 2017-03-16 Lg Electronics Inc. Method and apparatus for transmitting and receiving audio streams in wireless communication system
CN107333339A (en) * 2017-05-16 2017-11-07 恒玄科技(上海)有限公司 Audio data transmission method and double wireless headsets between a kind of pair of wireless headset
WO2018048268A1 (en) * 2016-09-11 2018-03-15 엘지전자(주) Method and apparatus for connecting device by using bluetooth technology
CN108702720A (en) * 2016-02-24 2018-10-23 高通股份有限公司 Source device broadcasts synchronizing information associated with bluetooth equal ratio channel

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI241828B (en) * 2004-02-18 2005-10-11 Partner Tech Corp Handheld personal data assistant (PDA) for communicating with a mobile in music-playing operation
US9693127B2 (en) * 2014-05-14 2017-06-27 Samsung Electronics Co., Ltd Method and apparatus for communicating audio data
JP6511999B2 (en) * 2015-07-06 2019-05-15 株式会社Jvcケンウッド Out-of-head localization filter generation device, out-of-head localization filter generation method, out-of-head localization processing device, and out-of-head localization processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170078836A1 (en) * 2015-09-12 2017-03-16 Lg Electronics Inc. Method and apparatus for transmitting and receiving audio streams in wireless communication system
CN105592568A (en) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 Audio playing method and system
CN108702720A (en) * 2016-02-24 2018-10-23 高通股份有限公司 Source device broadcasts synchronizing information associated with bluetooth equal ratio channel
WO2018048268A1 (en) * 2016-09-11 2018-03-15 엘지전자(주) Method and apparatus for connecting device by using bluetooth technology
CN107333339A (en) * 2017-05-16 2017-11-07 恒玄科技(上海)有限公司 Audio data transmission method and double wireless headsets between a kind of pair of wireless headset

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220039041A1 (en) * 2018-12-07 2022-02-03 Huawei Technologies Co., Ltd. Point-to-Multipoint Data Transmission Method and Electronic Device
EP3843495A4 (en) * 2019-03-18 2021-11-24 Spreadtrum Communications (Shanghai) Co., Ltd. Communication method and apparatus, and device
CN112188344A (en) * 2020-09-30 2021-01-05 安凯(广州)微电子技术有限公司 TWS earphone and control method thereof
CN114553351B (en) * 2020-11-24 2023-12-08 华为技术有限公司 Time synchronization method, control device, equipment and storage medium
CN114553351A (en) * 2020-11-24 2022-05-27 华为技术有限公司 Time synchronization method, control device, equipment and storage medium
WO2022111419A1 (en) * 2020-11-24 2022-06-02 华为技术有限公司 Time synchronization method, control apparatus, device, and storage medium
US11516586B2 (en) * 2021-01-25 2022-11-29 Dell Products L.P. Contextual latency configuration for isochronous audio transport
US20220240017A1 (en) * 2021-01-25 2022-07-28 Dell Products L.P. Contextual latency configuration for isochronous audio transport
US11853242B2 (en) 2021-03-18 2023-12-26 Shenzhen GOODIX Technology Co., Ltd. Synchronization control method, chip, electronic device and storage medium
EP4061069A1 (en) * 2021-03-18 2022-09-21 Shenzhen Goodix Technology Co., Ltd. Synchronization control method, chip, electronic device and storage medium
CN113613221B (en) * 2021-04-26 2023-09-08 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system
CN113613221A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system
CN115474180A (en) * 2021-06-11 2022-12-13 Oppo广东移动通信有限公司 Bluetooth headset box, wireless audio system, communication method and device
CN114079898A (en) * 2021-07-22 2022-02-22 珠海市杰理科技股份有限公司 Audio data communication method, device, equipment and system in dual-transmission mode
CN115103431A (en) * 2022-03-25 2022-09-23 恒玄科技(上海)股份有限公司 Method for realizing synchronous playing of Bluetooth headset equipment and Bluetooth headset equipment thereof
WO2023185171A1 (en) * 2022-03-31 2023-10-05 哲库科技(上海)有限公司 Data transmission method and apparatus, electronic device and computer-readable storage medium
WO2024016948A1 (en) * 2022-07-21 2024-01-25 Oppo广东移动通信有限公司 Information updating method and apparatus, audio sharing method and system, and electronic device
CN116033597A (en) * 2022-08-08 2023-04-28 荣耀终端有限公司 Bluetooth connection method and device, electronic equipment and storage medium
CN116033597B (en) * 2022-08-08 2023-12-12 荣耀终端有限公司 Bluetooth connection method and device, electronic equipment and storage medium
CN115379283A (en) * 2022-08-16 2022-11-22 维沃移动通信有限公司 Video call method and device
CN115567086A (en) * 2022-09-09 2023-01-03 安克创新科技股份有限公司 Audio transmission device, audio playback device, and audio transmission and synchronization system
CN115567086B (en) * 2022-09-09 2024-03-26 安克创新科技股份有限公司 Audio transmission device, audio playing device and audio transmission and synchronization system

Also Published As

Publication number Publication date
CN113228701B (en) 2022-08-09
CN113228701A (en) 2021-08-06
CN115426064A (en) 2022-12-02

Similar Documents

Publication Publication Date Title
WO2020133183A1 (en) Audio data synchronization method and device
WO2020211733A1 (en) Bluetooth connection method, device and system
CN112868244B (en) Point-to-multipoint data transmission method and device
WO2020107485A1 (en) Bluetooth connection method and device
WO2020113588A1 (en) Point-to-multipoint data transmission method, and electronic device
WO2020133112A1 (en) Method for automatically switching bluetooth audio encoding method and electronic apparatus
WO2020124610A1 (en) Transmission speed control method and device
WO2020124581A1 (en) Audio data transmission method and electronic device
CN112469013B (en) Bluetooth connection method and related device
WO2021082829A1 (en) Bluetooth connection method and related apparatus
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021017909A1 (en) Method, electronic device and system for realizing functions through nfc tag
WO2020113587A1 (en) Method, device and system for calling using bluetooth earpiece
WO2021013196A1 (en) Simultaneous response method and device
CN113039822B (en) Method and equipment for establishing data channel
CN112469011A (en) Bluetooth pairing method and related device
CN115665670A (en) Wireless audio system, audio communication method and equipment
CN114679710A (en) TWS earphone connection method and equipment
CN112740728B (en) Bluetooth communication method and electronic equipment
CN112771828B (en) Audio data communication method and electronic equipment
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2021027623A1 (en) Device capability discovery method and p2p device
EP4336356A1 (en) Screen projection method and related apparatus
WO2022143156A1 (en) Encrypted call method and apparatus, terminal, and storage medium
CN113678481B (en) Wireless audio system, audio communication method and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18944410

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18944410

Country of ref document: EP

Kind code of ref document: A1