CN115776628B - Method for accurate synchronization of two-ear recording of TWS Bluetooth headset - Google Patents

Method for accurate synchronization of two-ear recording of TWS Bluetooth headset Download PDF

Info

Publication number
CN115776628B
CN115776628B CN202310102823.4A CN202310102823A CN115776628B CN 115776628 B CN115776628 B CN 115776628B CN 202310102823 A CN202310102823 A CN 202310102823A CN 115776628 B CN115776628 B CN 115776628B
Authority
CN
China
Prior art keywords
ear
bluetooth
recording
mobile terminal
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310102823.4A
Other languages
Chinese (zh)
Other versions
CN115776628A (en
Inventor
李波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Ambi Technology Co ltd
Chengdu Anbi Technology Co ltd
Original Assignee
Chongqing Ambi Technology Co ltd
Chengdu Anbi Technology Co ltd
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 Chongqing Ambi Technology Co ltd, Chengdu Anbi Technology Co ltd filed Critical Chongqing Ambi Technology Co ltd
Priority to CN202310102823.4A priority Critical patent/CN115776628B/en
Publication of CN115776628A publication Critical patent/CN115776628A/en
Application granted granted Critical
Publication of CN115776628B publication Critical patent/CN115776628B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for accurate synchronization of binaural recording of a TWS (two way communication) Bluetooth headset, which relates to the technical field of Bluetooth headsets and comprises the following steps: the mobile terminal sends a recording request to the Bluetooth headset; after receiving the recording requests from the main ear and the auxiliary ear of the Bluetooth headset, configuring the parameters of each hardware module; the master ear and the slave ear set a future and same Bluetooth time to trigger the DMA controller to start recording; the slave ear encodes each frame of MIC data collected and adds the frame number and the position information to transmit to the master ear; the main ear encodes each frame of MIC data and adds a frame number, and then packages the same data frames received from the secondary ear together and transmits the same data frames to the mobile terminal through a Bluetooth protocol; the mobile terminal decodes the data transmitted by the Bluetooth protocol and then respectively transmits the audio data with the same frame number to the left and right sound channels of the sound generating unit of the mobile terminal according to the position information to be played; the invention can accurately realize MIC synchronous acquisition of the two earphones.

Description

Method for accurate synchronization of two-ear recording of TWS Bluetooth headset
Technical Field
The invention relates to the technical field of Bluetooth earphones, in particular to a method for accurately synchronizing double-ear recording of a TWS Bluetooth earphone.
Background
At present, the market of TWS (TWS: true Wireless Stereo) earphones with a recording function is increasing, and the microphone of the TWS earphone is mainly used for making a call, weChat voice and the like. In this case, the speech signals received by the MIC are transmitted to the handset via the bluetooth SCO/ESCO (SCO/ESCO: a transmission protocol of bluetooth, which belongs to a logical link layer and is usually used for time-limited data transmission, and is mainly used for transmitting speech signals in bluetooth) link, as shown in fig. 1.
As can be seen from fig. 1, on such a link, either the left ear and the handset establish an SCO/ESCO link, or the right ear and the handset establish an SCO/ESCO link, so that the voice transmission on such a link is monophonic, that is, the voice signal transmitted to the handset end on the link is either the voice signal received by the left ear MIC or the voice signal received by the right ear MIC, and if the recording is performed by using the recording function of the left ear or the handset, the recording is obviously monophonic.
Fig. 2 shows a data path for MIC recording acquisition, which includes an analog microphone AMIC, an analog amplifier PGA, an analog-to-digital converter ADC, a down-sampling converter decimeters, an asynchronous sampling converter ASRC, a direct Memory access DMA controller, a Memory, and a main control MCU, which are connected in sequence.
The acquisition process of the typical DMA for the MIC sound signal is shown in FIG. 3: the MCU sets a source address for the DMA of the MIC acquisition path, the source address is the output FIFO address of the ASRC, and also sets two destination addresses, the two addresses are the starting address of the Ping Buffer and the starting address of the Pang Buffer, the size of the Ping Buffer is the same as that of the Ping Buffer, the two buffers are positioned in the Memory, and the size of one-time moving data volume is also set, which is called fragment size, the fragment size and the Ping/Pang Buffer are the same. When the DMA of the MIC acquisition channel is started, the DMA firstly moves the output FIFO data of the ASRC to the Ping Buffer, when the data of a fragment size is moved, the DMA generates an interrupt to the MCU and informs the moved Memory address signal, and the MCU receives the interrupt and then sends the corresponding Memory address data for processing. Meanwhile, the DMA starts to move the output FIFO data of the ASRC to the Pang Buffer, and similarly, after the data of a fragment size is moved, the DMA can generate an interrupt to the MCU and tell the moved Memory address signal. Then, the data is moved to the Ping Buffer, and then the Pang Buffer is used, so that the operation is repeated and circulated consistently; here, it is agreed that the data of one fragment size is one frame data.
The mono audio recording signal obviously loses spatial information when played back. With the increasing demand for high-quality headphone recording functions in more and more applications (e.g., live broadcast, karaoke, etc.), the experience brought by such monaural recording is poor, and the requirement for binaural recording is stronger and stronger because it is obvious that binaural recording can better restore the spatial characteristics of speech. The architecture of binaural recording is generally shown in fig. 4, which is implemented by the steps of:
1. the mobile phone sends a recording request through a Bluetooth SPP protocol (SPP: abbreviation of Serial Port Profile, which defines the protocol and process that should be used by devices using Bluetooth to perform RS232 (or similar) Serial cable simulation, in short, virtual Serial ports are established between Bluetooth devices to perform data communication); other bluetooth protocols are also possible, exemplified here by the common SPP protocol;
2. after a left ear (assuming that the left ear is a master ear, in a TWS system, an earphone distinguishes a master ear from a slave ear, the master ear establishes a Bluetooth link with a mobile phone, the slave ear establishes the Bluetooth link with the master ear, and the slave ear can monitor Bluetooth transmission information between the mobile phone and the master ear) receives a recording request of the mobile phone, parameters of each hardware module are configured firstly, wherein the parameters comprise PGA/ADC/decimeters/ASRC/DMA, then the DMA is started to start MIC data acquisition, and meanwhile, the message of the recording request is transmitted to a right ear;
3. after receiving the message of the recording request of the main ear, the right ear configures parameters of each hardware module according to the same steps, and then starts DMA to start MIC data acquisition;
4. the right ear encodes each frame of MIC data collected, and then adds a frame number (the data collected by the first frame is 1, the second frame is 2, and so on) and position information (for example, the right ear is agreed to be 1, and the left ear is 2) to be transmitted to the left ear through a Bluetooth ACL (ACL: a transmission protocol of Bluetooth between the two ears, which belongs to a logical link layer and is usually used for transmitting music and other data with not high time requirements) link layer;
5. the left ear encodes each frame of MIC data collected and adds frame numbers, and then the same data frames received by the right ear are packed together and transmitted to the mobile phone through the SPP of the Bluetooth;
6. after receiving the data decoding transmitted by the SPP, the mobile phone respectively transmits the audio data with the same frame number to the left and right sound channels of the sound generating unit of the mobile phone according to the position information to play.
The function of binaural recording is achieved according to this design. However, the existing binaural recording has some defects, and cannot realize accurate MIC data acquisition synchronization, and it can be seen from the above steps that there is a certain time difference between the opening of MIC data acquisition channels by the left and right ears. (left ear ahead of right ear for a while) because the left ear opens its MIC acquisition channel by passing the message of the recording request to the right ear, he does not know when the recording request was received by the right ear. Later, some improved schemes exist, for example, the left ear transmits a message of a recording request to the right ear and receives a response message of the right ear and then opens a local recording, although this mechanism alleviates the asynchronization of binaural recording to some extent, it is still impossible to perform accurate synchronization, for example, the right ear sends a response message to the left ear, but the right ear does not know what time point the left ear receives the response message, so the right ear opens its MIC acquisition after sending the response message, so the right ear is ahead of the left ear at this time. The asynchronism of the left and right ear MIC data acquisition can bring some defects in experience sense, mainly including inconsistency of spatial information, and inconsistency of spatial information played back by a mobile phone and actual spatial information.
Disclosure of Invention
In order to solve the problems in the prior art, the invention aims to provide a method for accurately synchronizing binaural recording of a TWS Bluetooth headset.
In order to achieve the purpose, the invention adopts the technical scheme that: a method for accurate synchronization of TWS Bluetooth headset binaural recordings includes the following steps:
step 1, the mobile terminal sends a recording request to a Bluetooth earphone through a Bluetooth protocol;
step 2, after the main ear and the auxiliary ear of the Bluetooth headset receive the recording requests, configuring parameters of each hardware module;
step 3, the master ear and the slave ear set a future and same Bluetooth time to trigger the DMA controller to start recording;
step 4, after each frame of MIC data collected from the ears are coded, frame numbers and position information are added, and the frame numbers and the position information are transmitted to the main ears through a Bluetooth ACL link layer between the ears;
step 5, the main ear encodes each frame of MIC data and adds a frame number, and then packages the same data frames received from the auxiliary ears together and transmits the same data frames to the mobile terminal through a Bluetooth protocol;
and 6, the mobile terminal decodes the data transmitted by the Bluetooth protocol, and then respectively transmits the audio data with the same frame number to the left and right sound channels of the sound generating unit of the mobile terminal according to the position information to be played.
As a further improvement of the present invention, in step 2, the method for receiving the recording request from the ear comprises:
after receiving the recording information, the master ear transmits the recording request to the slave ear through a Bluetooth ACL link layer; or the slave ear monitors the master ear through a Bluetooth protocol and monitors a recording request sent by the mobile terminal to the master ear.
As a further development of the invention, in step 3, the set future and same time is counted with a bluetooth clock Bt _ clock and the slave ear listens for bluetooth information transmitted between the master ear and the mobile terminal.
As a further improvement of the invention, in step 3, the time for triggering the DMA controller to start recording is set in the hardware by means of writing a register, and the hardware automatically starts the DMA controller to start recording after the set time based on the timing of the Bluetooth clock Bt _ clock.
As a further improvement of the invention, the Bluetooth protocol is a Bluetooth SPP protocol.
As a further improvement of the present invention, the mobile terminal is a mobile phone or a tablet computer.
The invention has the beneficial effects that:
the invention triggers DMA based on the same clock timing through hardware, the clock is the same clock, and the timing hardware automatically starts DMA, can realize that the left ear and the right ear synchronously start to collect MIC signals through the method, and leads the mobile phone to restore the space sense of MIC recording more really when playing back the MIC signals.
Drawings
Fig. 1 is a link diagram of a connection established between an earphone MIC and a mobile phone;
FIG. 2 is a data path diagram for MIC recording acquisition;
FIG. 3 is a diagram of the DMA controller's process of acquiring MIC sound signals;
FIG. 4 is an architectural diagram of a conventional binaural recording;
fig. 5 is an architecture diagram of a binaural recording according to an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 5, a method for accurately synchronizing binaural recording of a TWS bluetooth headset is described in this embodiment by taking a mobile phone as an example, and the implementation steps are as follows:
1. the mobile phone sends a recording request through a bluetooth SPP protocol (or other bluetooth protocols, which is listed as a common SPP protocol in this embodiment);
2. after a left ear (in this embodiment, it is assumed that the left ear is a master ear and the right ear is a slave ear) receives a recording request of a mobile phone, parameters of each hardware module, including PGA/ADC/decimatrices/ASRC/DMA, are configured first, and a message of the recording request is transmitted to the right ear (the right ear can actually monitor an SPP recording request message sent by the mobile phone to the left ear, and if the right ear adopts a monitoring mode, the left ear does not need to send the recording request message to the right ear);
3. after the right ear receives the message of the recording request of the main ear (if the monitoring mode is adopted, the SPP recording request message sent to the left ear by the mobile phone is monitored by the right ear at the moment), configuring parameters of each hardware module according to the same steps;
4. setting a future and same time for triggering the DMA to start recording by the left/right ear (the time is counted by a Bluetooth clock Bt _ clock, and the Bt _ clock between the left ear and the mobile phone can be monitored by the right ear); the triggering time is generally set into hardware in a register writing mode, and after the hardware reaches the set time based on the timing of Bt _ clock, the DMA is automatically started to start recording; each linked bluetooth system has an internal system clock that determines the transceiver's timing and frequency hopping. The clock is synchronous for each Bluetooth device in the Bluetooth system, for example, the mobile phone and the Bluetooth headset establish a Bluetooth link, the mobile phone and the headset form a Bluetooth system, and a synchronous Bluetooth clock Bt _ clock exists between the mobile phone and the headset;
5. the right ear encodes the acquired MIC data of each frame, adds the frame number and the position information and transmits the frame number and the position information to the left ear through a Bluetooth ACL link layer between the two ears;
6. the left ear encodes each frame of MIC data collected and adds frame numbers, and then the same data frames received by the right ear are packed together and transmitted to the mobile phone through the SPP of the Bluetooth;
7. after receiving the data decoding transmitted by the SPP, the mobile phone respectively transmits the audio data with the same frame number to the left and right sound channels of the sound generating unit of the mobile phone according to the position information to play.
The above embodiments only express specific embodiments of the present invention, and the description is specific and detailed, but not to be understood as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (4)

1. A method for accurate synchronization of binaural recording of TWS Bluetooth earphones is characterized by comprising the following steps:
step 1, the mobile terminal sends a recording request to a Bluetooth headset through a Bluetooth protocol;
step 2, after the main ear and the auxiliary ear of the Bluetooth headset receive the recording requests, configuring parameters of each hardware module;
step 3, the master ear and the slave ear set a future and same Bluetooth time to trigger the DMA controller to start recording; counting the set future and same Bluetooth time by a Bluetooth clock Bt _ clock, and monitoring Bluetooth information mutually transmitted between the main ear and the mobile terminal by the auxiliary ear; the time for triggering the DMA controller to start recording is set in hardware in a register writing mode, the hardware is timed based on a Bluetooth clock Bt _ clock, and the DMA controller is automatically started to start recording after the set time;
step 4, after each frame of MIC data collected from the ears are coded, frame numbers and position information are added, and the frame numbers and the position information are transmitted to the main ears through a Bluetooth ACL link layer between the ears;
step 5, the main ear encodes each frame of MIC data and adds a frame number, and then packages the same data frames received from the auxiliary ears together and transmits the same data frames to the mobile terminal through a Bluetooth protocol;
and 6, the mobile terminal decodes the data transmitted by the Bluetooth protocol, and then respectively transmits the audio data with the same frame number to the left and right sound channels of the sound generating unit of the mobile terminal according to the position information for playing.
2. Method for accurate synchronization of TWS bluetooth headset binaural recordings according to claim 1, characterized in that in step 2 the method of receiving the recording request from the ear comprises:
after receiving the recording information, the master ear transmits the recording request to the slave ear through a Bluetooth ACL link layer; or the slave ear monitors the master ear through a Bluetooth protocol and monitors a recording request sent by the mobile terminal to the master ear.
3. The method for TWS bluetooth headset binaural recording fine synchronization of claim 1, wherein the bluetooth protocol is the bluetooth SPP protocol.
4. The method for accurate synchronization of TWS bluetooth headset binaural recordings according to claim 1, characterized in that the mobile terminal is a mobile phone or a tablet.
CN202310102823.4A 2023-02-13 2023-02-13 Method for accurate synchronization of two-ear recording of TWS Bluetooth headset Active CN115776628B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310102823.4A CN115776628B (en) 2023-02-13 2023-02-13 Method for accurate synchronization of two-ear recording of TWS Bluetooth headset

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310102823.4A CN115776628B (en) 2023-02-13 2023-02-13 Method for accurate synchronization of two-ear recording of TWS Bluetooth headset

Publications (2)

Publication Number Publication Date
CN115776628A CN115776628A (en) 2023-03-10
CN115776628B true CN115776628B (en) 2023-04-14

Family

ID=85393570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310102823.4A Active CN115776628B (en) 2023-02-13 2023-02-13 Method for accurate synchronization of two-ear recording of TWS Bluetooth headset

Country Status (1)

Country Link
CN (1) CN115776628B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020249098A1 (en) * 2019-06-14 2020-12-17 华为技术有限公司 Bluetooth communication method, tws bluetooth headset, and terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006014022A1 (en) * 2006-03-27 2007-10-11 Siemens Audiologische Technik Gmbh Hearing aid system with binaural data logging and corresponding procedure
WO2008150918A1 (en) * 2007-05-29 2008-12-11 Livescribe, Inc. Binaural recording for smart pen computing systems
CN104540061B (en) * 2014-12-31 2018-05-22 中科创达软件股份有限公司 A kind of bluetooth headset way of recording and device
US10825480B2 (en) * 2017-05-31 2020-11-03 Apple Inc. Automatic processing of double-system recording
CN108924683A (en) * 2018-06-06 2018-11-30 歌尔科技有限公司 A kind of daily record data store method, device and TWS earphone
CN111817811B (en) * 2020-06-22 2022-10-11 芯原微电子(上海)股份有限公司 TWS earphone audio frequency synchronous playing method and system, TWS earphone
CN112020136B (en) * 2020-10-13 2021-02-09 恒玄科技(上海)股份有限公司 Audio system and wireless earphone pair
CN113542479B (en) * 2021-07-26 2023-03-31 Oppo广东移动通信有限公司 Recording method, recording device, wireless earphone and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020249098A1 (en) * 2019-06-14 2020-12-17 华为技术有限公司 Bluetooth communication method, tws bluetooth headset, and terminal

Also Published As

Publication number Publication date
CN115776628A (en) 2023-03-10

Similar Documents

Publication Publication Date Title
US11039411B2 (en) Synchronization method for synchronizing clocks of a Bluetooth device
US11375312B2 (en) Method, device, loudspeaker equipment and wireless headset for playing audio synchronously
CN111918261A (en) Bluetooth audio equipment synchronous playing method and system and Bluetooth audio master and slave equipment
WO2023005412A1 (en) Recording method and apparatus, wireless earphones and storage medium
US20230075802A1 (en) Capturing and synchronizing data from multiple sensors
CN114982369A (en) Audio data transmission method, device, chip and electronic equipment
CN115776628B (en) Method for accurate synchronization of two-ear recording of TWS Bluetooth headset
CN113473319A (en) Bluetooth multi-channel audio playing method, device and system
CN115175159B (en) Bluetooth headset playing method and equipment
CN113115281B (en) Bluetooth audio device, bluetooth audio system and operation method thereof
CN113329382A (en) Bluetooth-based time point synchronizing method, device and system
CN115499814A (en) Bluetooth equipment system
US20240022783A1 (en) Multimedia playback synchronization
CN113613221A (en) TWS master device, TWS slave device, audio device and system
CN110971744B (en) Method and device for controlling voice playing of Bluetooth sound box
WO2022141552A1 (en) Wireless headphones and audio device
US20230102871A1 (en) Bluetooth voice communication system and related computer program product for generating stereo voice effect
WO2024007974A1 (en) Clock synchronization method and electronic device
TWI826159B (en) Method for performing audio enhancement, earphone, earphone system and user equipment
CN220108215U (en) Wireless earphone
TWI700953B (en) A wireless transmission system and method
EP4266711A1 (en) Wireless communication method and system
US20220417637A1 (en) Method and system for wireless transmission of audio data
CN112235685A (en) Sound box networking method and sound box system
TW202414387A (en) Method for performing audio enhancement, earphone, earphone system and user equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant