[go: up one dir, main page]

CN108810860B - An audio transmission method, terminal device and main earphone - Google Patents

An audio transmission method, terminal device and main earphone Download PDF

Info

Publication number
CN108810860B
CN108810860B CN201810494204.3A CN201810494204A CN108810860B CN 108810860 B CN108810860 B CN 108810860B CN 201810494204 A CN201810494204 A CN 201810494204A CN 108810860 B CN108810860 B CN 108810860B
Authority
CN
China
Prior art keywords
audio data
channel
channel audio
data packet
earphone
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
CN201810494204.3A
Other languages
Chinese (zh)
Other versions
CN108810860A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810494204.3A priority Critical patent/CN108810860B/en
Publication of CN108810860A publication Critical patent/CN108810860A/en
Application granted granted Critical
Publication of CN108810860B publication Critical patent/CN108810860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • 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
    • 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

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本发明提供一种音频传输方法、终端设备及主耳机,所述终端设备与主耳机建立无线通信连接,该方法包括:获取音频数据,并将所述音频数据分离成第一声道音频数据和第二声道音频数据;分别对所述第一声道音频数据和所述第二声道音频数据进行打包,得到第一声道音频数据包和第二声道音频数据包;依序向所述主耳机发送所述第一声道音频数据包和所述第二声道音频数据包。这样,由于终端设备向主耳机发送的音频数据包为分离后的单声道音频数据包,从而使得主耳机在接收到音频数据包后,无需再进行分离工作,进而可以达到降低主耳机的功耗的目的。

Figure 201810494204

The present invention provides an audio transmission method, a terminal device and a main earphone. The terminal device establishes a wireless communication connection with the main earphone. The method includes: acquiring audio data, and separating the audio data into first channel audio data and The second channel audio data; the first channel audio data and the second channel audio data are packaged respectively to obtain the first channel audio data packet and the second channel audio data packet; The main earphone sends the first channel audio data packet and the second channel audio data packet. In this way, since the audio data packets sent by the terminal device to the main earphone are separated monophonic audio data packets, the main earphone does not need to perform separation work after receiving the audio data packets, thereby reducing the function of the main earphone. consumption purpose.

Figure 201810494204

Description

Audio transmission method, terminal equipment and main earphone
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an audio transmission method, a terminal device, and a main earphone.
Background
The dual bluetooth headset is a wireless headset which is composed of two bluetooth headsets and can transmit left and right channel stereo sound, for example: a real Wireless Stereo (TWS) Bluetooth earphone consists of a main earphone and a slave earphone. At present, a TWS headset usually adopts a one-to-two technology, that is, a terminal device is connected with a master headset through a bluetooth wireless mode, and then the master headset is connected with a slave headset through the bluetooth wireless mode. However, in the prior art, the terminal device usually sends stereo audio data to the master earphone, so that the master earphone does not only need to separate audio data corresponding to its own channel from the stereo audio data for playing, but also needs to send the stereo audio data to the slave earphone, thereby resulting in higher power consumption of the master earphone.
Therefore, the existing audio transmission method has the problem of high power consumption of the main earphone.
Disclosure of Invention
The embodiment of the invention provides an audio transmission method and terminal equipment, and aims to solve the problem that a main earphone is high in power consumption.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an audio transmission method, which is applied to a terminal device, where the terminal device establishes a wireless communication connection with a main headset, and the method includes:
acquiring audio data and separating the audio data into first channel audio data and second channel audio data;
respectively packaging the first channel audio data and the second channel audio data to obtain a first channel audio data packet and a second channel audio data packet;
and sequentially sending the first channel audio data packet and the second channel audio data packet to the master earphone so as to enable the master earphone to play target channel audio data and send channel audio data except the target channel audio data to the slave earphone, wherein the target channel audio data is the first channel audio data or the second channel audio data.
In a second aspect, an embodiment of the present invention provides another audio transmission method, which is applied to a master earphone, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone also establishes a wireless communication connection with a slave earphone, where the method includes:
receiving a first channel audio data packet and a second channel audio data packet which are sequentially sent by the terminal equipment;
transmitting the first channel audio data packet or the second channel audio data packet to the slave headset.
In a third aspect, an embodiment of the present invention provides a terminal device, where the terminal device establishes a wireless communication connection with a main headset, and the terminal device includes:
the separation module is used for acquiring audio data and separating the audio data into first channel audio data and second channel audio data;
the packaging module is used for respectively packaging the first channel audio data and the second channel audio data to obtain a first channel audio data packet and a second channel audio data packet;
a sending module, configured to send the first channel audio data packet and the second channel audio data packet to the master earphone in sequence, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to a slave earphone, where the target channel audio data is the first channel audio data or the second channel audio data.
In a fourth aspect, an embodiment of the present invention provides a master earphone, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone further establishes a wireless communication connection with a slave earphone, where the master earphone includes:
the receiving module is used for receiving a first sound channel audio data packet and a second sound channel audio data packet which are sequentially sent by the terminal equipment;
a sending module, configured to send the first channel audio data packet or the second channel audio data packet to the slave earphone.
In a fifth aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps in the audio transmission method provided in the first aspect.
In a sixth aspect, an embodiment of the present invention provides a master earphone, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps in the audio transmission method provided in the second aspect.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps in the audio transmission method provided in the first aspect.
In an eighth aspect, the embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps in the audio transmission method provided in the second aspect.
In the embodiment of the invention, when the terminal device establishes wireless communication connection with the master earphone and prepares to transmit audio data, the terminal device obtains a first channel audio data and a second channel audio data by separating the audio data to be transmitted, and obtains a first channel audio data packet and a second channel audio data packet by respectively packaging the first channel audio data and the second channel audio data, and finally sequentially sends the first channel audio data packet and the second channel audio data packet to the master earphone, so that the master earphone plays target channel audio data, and sends channel audio data except the target channel audio data to the slave earphone. Therefore, the audio data packet sent to the main earphone by the terminal equipment is the separated single-channel audio data packet, so that the main earphone does not need to perform separation work after receiving the audio data packet, and the purpose of reducing the power consumption of the main earphone can be achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of an audio transmission method according to an embodiment of the present invention;
fig. 2 is a flowchart of another audio transmission method according to an embodiment of the present invention;
fig. 3 is a flow chart of another audio transmission method provided by the embodiment of the invention;
fig. 4 is a flow chart of another audio transmission method provided by the embodiment of the invention;
fig. 5 is a schematic diagram of a frame structure of an audio transmission system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a workflow of a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of the working process of the primary earphone provided by the embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another terminal device provided in the embodiment of the present invention;
fig. 10 is a schematic structural diagram of another terminal device provided in the embodiment of the present invention;
fig. 11 is a schematic structural diagram of another terminal device provided in the embodiment of the present invention;
fig. 12 is a schematic structural diagram of a main earphone according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of another primary earphone according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an audio transmission method provided in an embodiment of the present invention, and is applied to a terminal device, where the terminal device establishes a wireless communication connection with a master earphone, as shown in fig. 1, the method includes the following steps:
step 101, obtaining audio data, and separating the audio data into first channel audio data and second channel audio data.
In this embodiment of the present invention, the main earphone may be a main earphone in a dual wireless earphone, for example: the primary earphone in the TWS headset may also be an earphone connected with the terminal device to serve as the primary earphone in two independent wireless headsets, for example: and two Bluetooth headsets, wherein one Bluetooth headset is connected with the terminal equipment and serves as a master headset, and the other Bluetooth headset is connected with the master headset and serves as a slave headset.
The audio data may be multi-channel audio data including at least two channels, for example: binaural audio data including left and right channels, or dolby stereo audio data including front left, front right, and rear surround channels, or the like.
If the audio data is two-channel stereo audio data, the first channel audio data may be audio data of one channel of left channel audio data and right channel audio data, and the second channel audio data may be audio data of the other channel of left channel audio data and right channel audio data; if the audio data is audio data of at least three channels, the first channel audio data may be audio data of a first channel of the audio data of at least three channels, and the second channel audio data may be audio data of a second channel of the audio data of at least three channels.
In this embodiment, the acquiring of the audio data may be acquiring audio data currently played or to be played by the terminal device, for example: when the terminal device plays music through the music player, audio data of the music currently played by the terminal device may be acquired, or when the terminal device opens the music player and is located in a music interface to be played, audio data of the music displayed on the music interface to be played may be acquired.
The separating of the audio data into the first channel audio data and the second channel audio data may be performed by decoding the obtained audio data, then determining the audio data belonging to the first channel and the audio data belonging to the second channel in the audio data by identifying an identifier in the decoded audio data, or according to information such as frequency, intensity, and phase difference of signals in the decoded audio data, and then extracting the audio data of the first channel and the audio data of the second channel from the determined audio data, thereby separating the audio data into the first channel audio data and the second channel audio data.
And 102, respectively packaging the first channel audio data and the second channel audio data to obtain a first channel audio data packet and a second channel audio data packet.
The above separately packing the first channel audio data and the second channel audio data may be adding information such as an address, a dock, or an identifier to the first channel audio data and the second channel audio data, and then separately packing the first channel audio data and the second channel audio data to which the information is added, thereby making a first channel audio data packet and a second channel audio data packet.
It should be noted that, because the terminal device generally has a limit on the size of the transmitted audio data when transmitting audio data with the main earphone, if the size of the separated first channel audio data and the second channel audio data exceeds the maximum data size that can be received by the main earphone, the first channel audio data and the second channel audio data need to be sequentially grouped to respectively divide the first channel audio data and the second channel audio data into a plurality of groups of audio data, and then each group of audio data needs to be respectively packed, so as to obtain a plurality of groups of first channel audio data packets and a plurality of groups of second channel audio data packets. Or, when the audio data is obtained, if the audio data played by the terminal device is large, only the audio data with a fixed size is obtained each time, so as to ensure that the size of the separated first channel audio data and the second channel audio data does not exceed the maximum data size that can be received by the main earphone, for example: if the duration of the music played by the terminal device is 1 minute, audio data with the duration of 10 seconds can be acquired each time.
Step 103, sequentially sending the first channel audio data packet and the second channel audio data packet to the master earphone, so that the master earphone plays target channel audio data, and sending channel audio data other than the target channel audio data to the slave earphone, wherein the target channel audio data is the first channel audio data or the second channel audio data.
After the first channel audio data and the second channel audio data are respectively packed, the first channel audio data packet and the second channel audio data packet can be sequentially sent to the main earphone, such that after the master earphone receives the first channel audio data packet and the second channel audio data packet, selecting the audio data packet which is in conformity with the self audio channel in the first audio channel audio data packet and the second audio channel audio data packet for decoding, and converting the audio data packet into an acoustic wave signal for playing, meanwhile, the audio data packets which are not matched with the own sound channel in the first sound channel audio data packet and the second sound channel audio data packet can be sent to the slave earphone which establishes wireless communication connection with the slave earphone, and then the slave earphone decodes the received audio data packets and converts the audio data packets into sound wave signals for playing. In this way, the master earphone and the slave earphone respectively play the first channel audio data and the second channel audio data, thereby obtaining a relatively real stereo audio playing effect.
For example: if the sound channel configured by the master earphone is the first sound channel and the sound channel configured by the slave earphone is the second sound channel, after receiving the first sound channel audio data packet and the second sound channel audio data packet, the master earphone decodes the first sound channel audio data packet, converts the first sound channel audio data packet into a sound wave signal for playing, sends the second sound channel audio data packet to the slave earphone, and decodes the second sound channel audio data packet by the slave earphone, converts the second sound channel audio data packet into a sound wave signal for playing.
Specifically, the sending of the first channel audio data packet and the second channel audio data packet to the main earphone in sequence may be that the terminal device sends the first channel audio data packet and the second channel audio data packet to the main earphone in sequence according to a sending rule agreed with the main earphone. In this way, the master earphone will receive the first channel audio data packet and the second channel audio data packet sent by the terminal device in sequence, and can determine whether to decode the first received audio data packet or send the first received audio data packet to the slave earphone according to the agreed sending rule and the configured channel information.
For example: the sound channel configured by the master earphone is a first sound channel, if the agreed sending rule is that a first sound channel audio data packet is sent first and then a second sound channel audio data packet is sent, the master earphone decodes the first sound channel audio data packet received first, and sends the second sound channel audio data packet received later to the slave earphone; if the agreed sending rule is that a second channel audio data packet is sent first and then a first channel audio data packet is sent, the master earphone sends the first received second channel audio data packet to the slave earphone, and the first channel audio data packet received later is decoded.
In this embodiment of the present invention, the terminal device may be any device having a storage medium, for example: terminal devices such as computers (Computer), Mobile phones, Tablet Personal computers (Tablet Personal Computer), Laptop computers (Laptop Computer), Personal Digital Assistants (PDA), Mobile Internet Devices (MID), and Wearable devices (Wearable Device).
In the audio transmission method in this embodiment, when the terminal device establishes a wireless communication connection with the master earphone and prepares to transmit audio data, the terminal device obtains first channel audio data and second channel audio data by separating the audio data to be transmitted, and obtains a first channel audio data packet and a second channel audio data packet by respectively packing the first channel audio data and the second channel audio data, and finally sequentially sends the first channel audio data packet and the second channel audio data packet to the master earphone, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to the slave earphone. Therefore, the audio data packet sent to the main earphone by the terminal equipment is the separated single-channel audio data packet, so that the main earphone does not need to perform separation work after receiving the audio data packet, and the purpose of reducing the power consumption of the main earphone can be achieved.
Referring to fig. 2, fig. 2 is a flowchart of another audio transmission method provided in an embodiment of the present invention, which is applied to a terminal device, where the terminal device establishes a wireless communication connection with a main headset, and in this embodiment, on the basis of the embodiment shown in fig. 1, a step of sequentially grouping first channel audio data and second channel audio data is added, and how to respectively pack the first channel audio data and the second channel audio data, and how to sequentially send the first channel audio data packet and the second channel audio data packet to the main headset are further defined, so that a rule of how to send the grouped audio data packets to the main headset is defined, so that the main headset can distinguish audio data packets of different channels according to a received sequence. As shown in fig. 2, the method comprises the steps of:
step 201, obtaining audio data, and separating the audio data into first channel audio data and second channel audio data.
The specific implementation of this step may refer to the implementation of step 101 in the method embodiment shown in fig. 1, and is not described here again to avoid repetition.
Step 202, sequentially grouping the first channel audio data and the second channel audio data to obtain N groups of first channel audio data and N groups of second channel audio data, where N is an integer greater than or equal to 1.
In this embodiment, the first channel audio data and the second channel audio data may be respectively and sequentially grouped, so as to ensure that the size of each group of audio data does not exceed the maximum data size that can be received by the main earphone at one time, and N groups of the first channel audio data and N groups of the second channel audio data after grouping are numbered sequentially. Specifically, the first channel audio data may be divided into N groups of first channel audio data with the same size, and the second channel audio data may be divided into N groups of second channel audio data with the same size, or the first channel audio data may be divided into N groups of first channel audio data with the same audio duration, and the second channel audio data may be divided into N groups of second channel audio data with the same audio duration; the first channel audio data may also be grouped in sequence according to the size of the maximum audio data packet allowed to be transmitted, so that the size of the first channel audio data packets in the first N-1 groups is the size of the maximum audio data packet, and the size of the first channel audio data packets in the last group does not exceed the size of the maximum audio data packet, wherein the grouping mode of the second channel audio data packets is the same as the grouping mode of the first channel audio data packets.
For example: the size of the first channel audio data is 5M, the audio duration is 5 minutes, and the size of the maximum audio data allowed to be transmitted is 1.1M, so that the first channel audio data can be divided into 5 groups of first channel audio data with the sizes of 1M; or the first channel audio data can be divided into 5 groups of first channel audio data with audio time lengths of 1 minute, wherein the sizes of the 5 groups of first channel audio data with audio time lengths of 1 minute do not exceed 1.1M; or the first channel audio data may be divided into 4 groups of first channel audio data each having a size of 1.1M and 1 group of first channel audio data having a size of 0.6M.
Optionally, before step 203, the method further includes:
and respectively converting the formats of the first channel audio data and the second channel audio data into target formats, wherein the target formats are formats with the best audio quality in at least two audio formats supported by the terminal equipment and the main earphone.
In this embodiment, if the terminal device and the main earphone both support at least two audio formats, before the N sets of first channel audio data and the N sets of second channel audio data are packaged, format conversion may be performed on the N sets of first channel audio data and the N sets of second channel audio data, respectively, so as to convert the N sets of first channel audio data and the N sets of second channel audio data into a format with the best audio quality in the at least two audio formats, so as to ensure that the audio played by the main earphone has better sound quality. Specifically, the format conversion may be performed by decoding the N groups of first channel audio data and the N groups of second channel audio data, and then encoding the decoded N groups of first channel audio data and N groups of second channel audio data into the audio data in the target format.
For example: if the terminal device and the main earphone not only support a sub-band Coding (SBC) Audio format but also support an Advanced Audio Coding (ACC) Audio format, the ACC Audio format can be used as the target format to ensure that the Audio played by the main earphone has better tone quality because the tone quality of the Audio in the ACC Audio format is better than that of the Audio in the SBC Audio format; if the terminal device and the main earphone also support an Apt-X audio format, the Apt-X audio format is a lossless audio format, and the tone quality of the audio in the Apt-X audio format is better than that of the audio in an ACC audio format, so that the Apt-X audio format can be used as the target format to ensure that the audio played by the main earphone has better tone quality.
Of course, the same can be applied to the embodiment shown in fig. 1 and the same advantageous effects can be achieved.
Step 203, respectively packaging the N groups of first channel audio data to obtain N groups of first channel audio data packets, and respectively packaging the N groups of second channel audio data to obtain N groups of second channel audio data packets.
After the first channel audio data and the second channel audio data are respectively and sequentially grouped, the N groups of first channel audio data may be respectively packed to obtain N groups of first channel audio data packets, and the N groups of second channel audio data may be respectively packed to obtain N groups of second channel audio data packets.
Optionally, after step 203 and before step 204, the method further includes:
and adding a first channel identifier to the first channel audio data packet, and adding a second channel identifier to the second channel audio data packet.
In this embodiment, after the first channel audio data are sequentially grouped and packed, a first channel identifier may be added to each group of first channel audio data packets, and a second channel identifier may be added to each group of second channel audio data packets, where the first channel identifier and the second channel identifier may both adopt simple numbers, letters, or symbols, for example: the number 1 (corresponding to binary "01") is used as the first channel identifier, and the number 2 (corresponding to binary "10") is used as the second channel identifier, so that the first channel identifier "01" can be added to each group of first channel audio packets, and the second channel identifier "10" can be added to each group of second channel audio packets.
Specifically, the terminal device may agree with the master earphone by a protocol to obtain a first channel identifier and a second channel identifier, and thus, the terminal device may add corresponding channel identifiers to each group of first channel audio data packets and each group of second channel audio data packets according to the agreed channel identifiers, and the master earphone may check each group of received first channel audio data packets and each group of second channel audio data packets according to the agreed channel identifiers, so as to decode the audio data packets whose channel identifiers match the channel identifiers corresponding to the master earphone, convert the audio data packets into sound wave signals to be played, and send the audio data packets whose channel identifiers do not match the channel identifiers corresponding to the slave earphone to be played through the slave earphone.
In this way, in this embodiment, by adding the first channel identifier to the first channel audio data packet and adding the second channel identifier to the second channel audio data packet, it can be ensured that the slave earphone can conveniently and accurately determine the audio data packet conforming to its own channel through the channel identifier added to each group of audio data packets, and determine the audio data packet to be sent to the slave earphone, and it can avoid the problem that the audio playing effect is poor due to the fact that the master earphone cannot accurately distinguish the first channel audio data packet from the second channel audio data packet when the terminal device loses packets in the sending process.
Of course, the same can be applied to the embodiment shown in fig. 1 and the same advantageous effects can be achieved.
And 204, sequentially and alternately sending the N groups of first channel audio data packets and the N groups of second channel audio data packets to the main earphone.
In this embodiment, when sending the audio data packet to the main earphone, a 1 st group of first channel audio data packets and a 1 st group of second channel audio data packets may be sent to the main earphone in sequence, and then a 2 nd group of first channel audio data packets and a 2 nd group of second channel audio data packets may be sent to the main earphone until the N th group of first channel audio data packets and the N nd group of second channel audio data packets are sent to the main earphone.
Specifically, the terminal device may pre-define a sending rule, that is, may pre-define whether to send the first channel audio data packet to the main earphone first or send the second channel audio data packet first, so that the terminal device may send the N groups of first channel audio data packets and the N groups of second channel audio data packets to the main earphone alternately in sequence according to the pre-defined sending rule. For example: the method may further include sending a 1 st group of first channel audio data packets to the main earphone, sending a 1 st group of second channel audio data packets to the main earphone, sending a 2 nd group of first channel audio data packets to the main earphone, and sending a 2 nd group of second channel audio data packets to the main earphone, so that the N groups of first channel audio data packets and the N groups of second channel audio data packets are all sent to the main earphone in sequence and alternately.
The main earphone may receive the 1 st group of first channel audio data packets and the 1 st group of second channel audio data packets sent by the terminal device, and then receive the 2 nd group of first channel audio data packets and the 2 nd group of second channel audio data packets sent by the terminal device, until receiving the N th group of first channel audio data packets and the N th group of second channel audio data packets sent by the terminal device.
Specifically, since the terminal device may sequentially and alternately send the N groups of first channel audio data packets and the N groups of second channel audio data packets to the master earphone according to a predefined sending rule, the master earphone may also sequentially and alternately receive the N groups of first channel audio data packets and the N groups of second channel audio data packets, so that the master earphone may determine, according to the receiving order, a channel corresponding to each group of received audio data packets, so as to decode only an audio data packet whose channel matches itself and convert the audio data packet into an acoustic wave signal for playing, and send an audio data packet whose channel does not match itself to the slave earphone, so as to play audio data of another channel through the slave earphone.
For example: if the sound channel configured by the master earphone is a first sound channel and the sound channel configured by the slave earphone is a second sound channel, the master earphone sequentially receives a 1 st group of first sound channel audio data packets, a 1 st group of second sound channel audio data packets, a 2 nd group of first sound channel audio data packets, a 2 nd group of second sound channel audio data packets … …, an nth group of first sound channel audio data packets and an nth group of second sound channel audio data packets sent by the terminal device, and when 2N groups of audio data packets are total, the master earphone can decode and convert the received 1 st group, 3 rd group, 5 th group … … 2N-3 group and 2N-1 group audio data packets into sound wave signals respectively according to the receiving sequence, so as to play the audio data of the first sound channel through the master earphone, and simultaneously send the received 2 nd group, 4 th group, 6 th group … … nd 2N-2 group and 2N group audio data packets to the slave earphone, by playing the audio data of the second channel from the headphones.
It should be noted that, in this embodiment, the execution timing of step 202, step 203, and step 204 is not limited, that is, the terminal device may package a group of first channel audio data and a group of second channel audio data after completing a group of first channel audio data and a group of second channel audio data, and sequentially send the packaged group of first channel audio data and group of second channel audio data to the main earpiece, and then enter the next grouping, packaging, and sending process until the audio transmission is completed; or after all the packets are grouped, respectively packing the obtained N groups of first channel audio data and N groups of second channel audio data, and then sequentially and alternately sending the N groups of first channel audio data packets and the N groups of second channel audio data packets to the main earphone.
In this way, in this step, by sequentially and alternately sending the N groups of first channel audio data packets and the N groups of second channel audio data packets to the master earphone, it can be ensured that the master earphone can distinguish the first channel audio data packets and the second channel audio data packets according to the receiving sequence, and the problem of audio asynchrony or delay occurring when the master earphone and the slave earphone play the audio data of their respective channels can be avoided.
In this embodiment, on the basis of the embodiment shown in fig. 1, a step of sequentially grouping the first channel audio data and the second channel audio data, respectively, is added, and further limitation is performed on how to pack the first channel audio data and the second channel audio data, and how to sequentially send the first channel audio data packet and the second channel audio data packet to the main earphone, so that a rule of how to send the grouped audio data packets to the main earphone is defined, so that the main earphone can distinguish audio data packets of different channels according to a receiving sequence. In addition, in this embodiment, various optional embodiments are added on the basis of the embodiment shown in fig. 1, and these optional embodiments may be implemented in combination with each other or separately, and all the technical effects of reducing the power consumption of the main earphone can be achieved.
Referring to fig. 3, fig. 3 is a flowchart of another audio transmission method provided in an embodiment of the present invention, which is applied to a master earphone, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone further establishes a wireless communication connection with a slave earphone, as shown in fig. 3, the method includes the following steps:
step 301, receiving a first channel audio data packet and a second channel audio data packet sequentially sent by the terminal device.
Step 302, sending the first channel audio data packet or the second channel audio data packet to the slave earphone.
It should be noted that, this embodiment is used as an implementation of the main earphone corresponding to the embodiment shown in fig. 1, and specific implementation of the embodiment may refer to relevant descriptions in the embodiment shown in fig. 1, and in order to avoid repeated descriptions, the embodiment is not described again.
In the audio transmission method in this embodiment, when the master earphone establishes wireless communication connection with the terminal device and transmits audio data, the master earphone receives the separated monaural audio data packet transmitted by the terminal device, and thus the master earphone does not need to separate the received audio data packet, and the power consumption of the master earphone can be reduced.
Referring to fig. 4, fig. 4 is a flowchart of another audio transmission method provided in an embodiment of the present invention, which is applied to a master earphone, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone also establishes a wireless communication connection with a slave earphone, and in this embodiment, on the basis of the embodiment shown in fig. 3, steps of receiving a first channel audio data packet and a second channel audio data packet sequentially sent by the terminal device are refined, so as to define an order of receiving the audio data packets sent by the terminal device, so that the master earphone can distinguish the audio data packets of different channels according to the received order, and the phenomenon that the audio played by the master earphone and the audio played by the slave earphone are not synchronized can be avoided. As shown in fig. 4, the method comprises the steps of:
step 401, receiving N groups of first channel audio data packets and N groups of second channel audio data packets, where N is an integer greater than or equal to 1, which are alternately sent by the terminal device in sequence.
Step 402, sending the N groups of first channel audio data packets or the N groups of second channel audio data packets to the slave earphone.
It should be noted that, this embodiment is used as an implementation manner of the main earphone corresponding to the embodiment shown in fig. 2, and specific implementation manners thereof may refer to relevant descriptions in the embodiment shown in fig. 2, and in order to avoid repeated descriptions, the detailed description of this embodiment is not repeated.
It should be noted that, in this embodiment, it is not limited that the master earphone must perform step 402 after receiving all N sets of first channel audio data packets and N sets of second channel audio data packets, that is, after receiving one set of first channel audio data packets and one set of second channel audio data packets, the master earphone may send one set of audio data packets, which is not matched with its own channel, of the two sets of received audio data packets to the slave earphone.
In this embodiment, on the basis of the embodiment shown in fig. 3, the step of receiving the first channel audio data packet and the second channel audio data packet sent by the terminal device is detailed, so that the order of receiving the audio data packets sent by the terminal device is defined, the master earphone can distinguish the audio data packets of different channels according to the receiving order, and the phenomenon that the audio played by the master earphone and the slave earphone is not synchronized can be avoided. In addition, in this embodiment, various optional embodiments are added on the basis of the embodiment shown in fig. 3, and these optional embodiments may be implemented in combination with each other or separately, and all the technical effects of reducing the power consumption of the main earphone can be achieved.
The embodiments described in the above examples are described below by way of example with reference to fig. 5, 6 and 7:
as shown in fig. 5, an audio transmission System includes a terminal device, a master earphone and a slave earphone, where the terminal device includes a bluetooth module, a Micro Control Unit (MCU) and a CODEC (CODEC), the master earphone includes a bluetooth module, a System on a Chip (SOC), a CODEC and a speaker module, the slave earphone includes a bluetooth module, a CODEC and a speaker module, the terminal device and the master earphone establish a wireless communication connection through their respective bluetooth modules, and the master earphone and the slave earphone establish a wireless communication connection through their respective bluetooth modules.
As shown in fig. 6, the terminal device first obtains audio data, and performs channel separation on the audio data through the MCU to obtain left channel audio data and right channel audio data; the left channel audio data and the right channel audio data are then encoded by the CODEC to convert the formats of the left channel audio data and the right channel audio data into formats supported by the master earphone and the slave earphone, respectively, such as: an SBC format, an ACC format, or an Apt-X format; then, the encoded left channel audio data and the encoded right channel audio data are sequentially grouped and packed to obtain a plurality of groups of left channel audio data packets and a plurality of groups of right channel audio data packets, and a channel identifier can be added to each group of audio data packets to identify the channel information of each group of audio data packets; and finally, sending a plurality of groups of left channel audio data packets and a plurality of groups of right channel audio data packets to the master earphone in sequence, specifically, sending a group of right channel audio data packets after sending a group of left channel audio data packets, then sending the next group of left channel audio data packets and right channel audio data packets in sequence, and sending the packets in sequence alternately until all packets are sent, so that the problem that the left channel audio and the right channel audio are not synchronous or delay is large when the master earphone and the slave earphone play the audio can be avoided.
As shown in fig. 7, the master earphone receives a plurality of groups of left channel audio data packets and a plurality of groups of right channel audio data packets sent by the terminal device, specifically, each time a group of audio data packets is received, and when each group of audio data packets is received, the SOC checks the channel identifier of the group of audio data packets, if the channel identified by the channel identifier of the group of audio data packets matches the channel of the slave earphone, the group of audio data packets is decoded by the CODEC and played by the speaker module, if the channel identified by the channel identifier of the group of audio data packets does not match the channel of the slave earphone, the group of audio data packets is sent to the slave earphone, and after the slave earphone receives the group of audio data packets, the group of audio data packets is decoded by the CODEC and played by the speaker module.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device establishes a wireless communication connection with a main headset, and as shown in fig. 8, the terminal device 800 includes:
a separation module 801, configured to acquire audio data and separate the audio data into first channel audio data and second channel audio data;
a packing module 802, configured to separately pack the first channel audio data and the second channel audio data to obtain a first channel audio data packet and a second channel audio data packet;
a sending module 803, configured to send the first channel audio data packet and the second channel audio data packet to the master earphone in sequence, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to a slave earphone, where the target channel audio data is the first channel audio data or the second channel audio data.
Optionally, as shown in fig. 9, the terminal device 800 further includes:
a grouping module 804, configured to sequentially group the first channel audio data and the second channel audio data to obtain N groups of first channel audio data and N groups of second channel audio data, where N is an integer greater than or equal to 1;
the packing module 802 is configured to pack the N groups of first channel audio data to obtain N groups of first channel audio data packets, and pack the N groups of second channel audio data to obtain N groups of second channel audio data packets;
the sending module 803 is configured to sequentially and alternately send the N groups of first channel audio data packets and the N groups of second channel audio data packets to the master earphone.
Optionally, as shown in fig. 10, the terminal device 800 further includes:
an adding module 805, configured to add a first channel identifier to the first channel audio data packet, and add a second channel identifier to the second channel audio data packet.
Optionally, as shown in fig. 11, the terminal device 800 further includes:
a converting module 806, configured to convert formats of the first channel audio data and the second channel audio data into target formats, respectively, where the target formats are formats with the best audio quality among at least two audio formats supported by both the terminal device and the main headset.
The terminal device 800 can implement each process implemented by the terminal device in the method embodiments of fig. 1 and fig. 2, and is not described here again to avoid repetition. When the terminal device 400 of the embodiment of the present invention establishes a wireless communication connection with a master earphone and prepares to transmit audio data, the terminal device obtains a first channel audio data and a second channel audio data by separating the audio data to be transmitted, and obtains a first channel audio data packet and a second channel audio data packet by respectively packaging the first channel audio data and the second channel audio data, and finally sequentially sends the first channel audio data packet and the second channel audio data packet to the master earphone, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to a slave earphone. Therefore, the audio data packet sent to the main earphone by the terminal equipment is the separated single-channel audio data packet, so that the main earphone does not need to perform separation work after receiving the audio data packet, and the purpose of reducing the power consumption of the main earphone can be achieved.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a master earphone according to an embodiment of the present invention, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone further establishes a wireless communication connection with a slave earphone, as shown in fig. 12, the master earphone 1200 includes:
a receiving module 1201, configured to receive a first channel audio data packet and a second channel audio data packet that are sequentially sent by the terminal device;
a sending module 1202, configured to send the first channel audio data packet or the second channel audio data packet to the slave headset.
Optionally, the receiving module 1201 is configured to receive N groups of first channel audio data packets and N groups of second channel audio data packets that are alternately sent by the terminal device in sequence, where N is an integer greater than or equal to 1.
Optionally, a first channel identifier is added to the first channel audio data packet, and a second channel identifier is added to the second channel audio data packet;
the sending module 1202 is configured to send, to the slave earphone, an audio data packet whose channel identifier is not in accordance with the channel identifier corresponding to the master earphone in the first channel audio data packet and the second channel audio data packet.
The main earphone 1200 can implement each process implemented by the main earphone in the method embodiments of fig. 3 and fig. 4, and is not described here again to avoid repetition. When the main earphone of the embodiment of the invention establishes wireless communication connection with the terminal equipment and transmits audio data, the main earphone receives the separated single-channel audio data packet sent by the terminal equipment, so that the main earphone does not need to separate the received audio data packet, and the purpose of reducing the power consumption of the main earphone can be further achieved.
Fig. 13 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where the terminal device establishes a wireless communication connection with a master earphone, and the terminal device 1300 includes, but is not limited to: a radio frequency unit 1301, a network module 1302, an audio output unit 1303, an input unit 1304, a sensor 1305, a display unit 1306, a user input unit 1307, an interface unit 1308, a memory 1309, a processor 1310, a power supply 1311, and the like. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 13 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein the processor 1310 is configured to obtain audio data and separate the audio data into first channel audio data and second channel audio data;
respectively packaging the first channel audio data and the second channel audio data to obtain a first channel audio data packet and a second channel audio data packet;
a radio frequency unit 1301, configured to send the first channel audio data packet and the second channel audio data packet to the master earphone in sequence, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to a slave earphone, where the target channel audio data is the first channel audio data or the second channel audio data;
optionally, the processor 1310 is further configured to: sequentially grouping the first channel audio data and the second channel audio data respectively to obtain N groups of first channel audio data and N groups of second channel audio data, wherein N is an integer greater than or equal to 1;
respectively packaging the N groups of first channel audio data to obtain N groups of first channel audio data packets, and respectively packaging the N groups of second channel audio data to obtain N groups of second channel audio data packets;
the radio frequency unit 1301 is further configured to: and sequentially and alternately sending the N groups of first channel audio data packets and the N groups of second channel audio data packets to the main earphone.
Optionally, the processor 1310 is further configured to: and adding a first channel identification to the first channel audio data packet, and adding a second channel identification to the second channel audio data packet.
Optionally, the processor 1310 is further configured to: and respectively converting the formats of the first channel audio data and the second channel audio data into target formats, wherein the target formats are formats with the best audio quality in at least two audio formats supported by the terminal equipment and the main earphone.
The terminal device 1300 can implement each process implemented by the terminal device in the foregoing embodiments, and details are not described here to avoid repetition. When the terminal device 1300 of the embodiment of the present invention establishes a wireless communication connection with a master earphone and prepares to transmit audio data, the terminal device obtains a first channel audio data and a second channel audio data by separating the audio data to be transmitted, and obtains a first channel audio data packet and a second channel audio data packet by respectively packaging the first channel audio data and the second channel audio data, and finally sends the first channel audio data packet and the second channel audio data packet to the master earphone, so that the master earphone plays target channel audio data, and sends channel audio data other than the target channel audio data to a slave earphone. Therefore, the audio data packet sent to the main earphone by the terminal equipment is the separated single-channel audio data packet, so that the main earphone does not need to perform separation work after receiving the audio data packet, and the purpose of reducing the power consumption of the main earphone can be achieved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 1301 may be configured to receive and transmit signals during a message transmission or call process, and specifically, receive downlink data from a base station and then process the received downlink data to the processor 1310; in addition, the uplink data is transmitted to the base station. In general, radio unit 1301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 1301 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 1302, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 1303 can convert audio data received by the radio frequency unit 1301 or the network module 1302 or stored in the memory 1309 into an audio signal and output as sound. Also, the audio output unit 1303 can also provide audio output related to a specific function performed by the terminal apparatus 1300 (e.g., a call signal reception sound, a message reception sound, and the like). The audio output unit 1303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 1304 is used to receive audio or video signals. The input Unit 1304 may include a Graphics Processing Unit (GPU) 13041 and a microphone 13042, and the Graphics processor 13041 processes image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 1306. The image frames processed by the graphic processor 13041 may be stored in the memory 1309 (or other storage medium) or transmitted via the radio frequency unit 1301 or the network module 1302. The microphone 13042 can receive sounds and can process such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 1301 in case of a phone call mode.
The terminal device 1300 also includes at least one sensor 1305, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 13061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 13061 and/or backlight when the terminal device 1300 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 1305 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 1306 is used to display information input by a user or information provided to the user. The Display unit 1306 may include a Display panel 13061, and the Display panel 13061 may be configured as a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 1307 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 1307 includes a touch panel 13071 and other input devices 13072. Touch panel 13071, also referred to as a touch screen, can collect touch operations by a user on or near it (such as user operations on touch panel 13071 or near touch panel 13071 using a finger, stylus, or any other suitable object or attachment). The touch panel 13071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1310, and receives and executes commands sent from the processor 1310. In addition, the touch panel 13071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 1307 may include other input devices 13072 in addition to the touch panel 13071. In particular, the other input devices 13072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 13071 can be overlaid on the display panel 13061, and when the touch panel 13071 detects a touch operation thereon or nearby, the touch operation can be transmitted to the processor 1310 to determine the type of touch event, and then the processor 1310 can provide a corresponding visual output on the display panel 13061 according to the type of touch event. Although in fig. 13, the touch panel 13071 and the display panel 13061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 13071 and the display panel 13061 may be integrated to implement the input and output functions of the terminal device, and are not limited herein.
The interface unit 1308 is an interface for connecting an external device to the terminal apparatus 1300. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 1308 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 1300 or may be used to transmit data between the terminal apparatus 1300 and an external device.
The memory 1309 may be used to store software programs as well as various data. The memory 1309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1309 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1310 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 1309 and calling data stored in the memory 1309, thereby performing overall monitoring of the terminal device. Processor 1310 may include one or more processing units; preferably, the processor 1310 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1310.
The terminal device 1300 may further include a power supply 1311 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 1311 may be logically connected to the processor 1310 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the terminal device 1300 includes some functional modules that are not shown, and are not described herein again.
Preferably, an embodiment of the present invention further provides a terminal device, which includes a processor 1310, a memory 1309, and a computer program stored in the memory 1309 and capable of running on the processor 1310, where the computer program, when executed by the processor 1310, implements each process of the method embodiments in fig. 1 and fig. 2, and can achieve the same technical effect, and is not described herein again to avoid repetition.
Referring to fig. 14, fig. 14 is a schematic structural diagram of another master earphone according to an embodiment of the present invention, where the master earphone establishes a wireless communication connection with a terminal device, and the master earphone further establishes a wireless communication connection with a slave earphone. As shown in fig. 14, the main earphone 1400 includes: a processor 1401, a memory 1402 and a computer program stored on and executable on said memory 1402, the various components in the main headset 1400 being coupled together by a bus system 1403. It is understood that bus system 1403 is used to enable connection communication between these components.
Wherein processor 1401 is configured to: receiving a first channel audio data packet and a second channel audio data packet which are sequentially sent by the terminal equipment;
transmitting the first channel audio data packet or the second channel audio data packet to the slave headset.
Optionally, the processor 1401 is further configured to: and receiving N groups of first channel audio data packets and N groups of second channel audio data packets which are sequentially and alternately sent by the terminal equipment, wherein N is an integer greater than or equal to 1.
Optionally, a first channel identifier is added to the first channel audio data packet, and a second channel identifier is added to the second channel audio data packet;
processor 1401 is further configured to: and sending the audio data packet of which the sound channel identifier is not consistent with the sound channel identifier corresponding to the master earphone in the first sound channel audio data packet and the second sound channel audio data packet to the slave earphone.
The main headset 1400 can implement each process implemented by the cloud server in the embodiments shown in fig. 3 and fig. 4, and is not described herein again to avoid repetition. When the main earphone 1400 of the embodiment of the present invention establishes wireless communication connection with the terminal device and transmits audio data, since the main earphone receives the separated monaural audio data packet transmitted by the terminal device, the main earphone does not need to separate the received audio data packet, and the power consumption of the main earphone can be reduced.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the method embodiments in fig. 1 and fig. 2, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiment of the present invention further provides another computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the method embodiments in fig. 3 and fig. 4, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer readable storage medium is, for example, ROM, RAM, magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (5)

1.一种音频传输方法,应用于主耳机,其特征在于,所述主耳机与终端设备建立无线通信连接,所述主耳机还与从耳机建立无线通信连接,所述方法包括:1. An audio transmission method, applied to a main earphone, is characterized in that, the main earphone establishes a wireless communication connection with a terminal device, and the main earphone also establishes a wireless communication connection with a slave earphone, and the method comprises: 接收所述终端设备依序发送的第一声道音频数据包和第二声道音频数据包;receiving the first-channel audio data packet and the second-channel audio data packet sequentially sent by the terminal device; 向所述从耳机发送所述第一声道音频数据包或所述第二声道音频数据包;sending the first channel audio data packet or the second channel audio data packet to the slave earphone; 所述接收所述终端设备依序发送的第一声道音频数据包和第二声道音频数据包,包括:The receiving the first channel audio data packet and the second channel audio data packet sequentially sent by the terminal device includes: 接收所述终端设备依序交替发送的N组第一声道音频数据包和N组第二声道音频数据包,其中,N为大于或等于1的整数;Receive N groups of first-channel audio data packets and N groups of second-channel audio data packets alternately sent by the terminal device in sequence, where N is an integer greater than or equal to 1; 其中,所述主耳机每次接收一组音频数据包,并在每接收到一组音频数据包时,检验该组音频数据包的声道标识,若该组音频数据包的声道标识所标识的声道与自身声道相符,则对该组音频数据包进行解码,并播放;若该组音频数据包的声道标识所标识的声道与自身声道不相符,则将该组音频数据包发送至所述从耳机,以使所述从耳机在接收到该组音频数据包后,对该组音频数据包进行解码,并播放。Wherein, the main earphone receives a group of audio data packets each time, and when receiving a group of audio data packets, checks the channel identification of the group of audio data packets, if the channel identification of the group of audio data packets is identified If the channel identified by the channel identifier of the group of audio data packets does not match its own channel, then the group of audio data packets will be decoded and played; The packet is sent to the slave earphone, so that after the slave earphone receives the group of audio data packets, the group of audio data packets is decoded and played. 2.根据权利要求1所述的方法,其特征在于,所述第一声道音频数据包添加有第一声道标识,所述第二声道音频数据包添加有第二声道标识;2. The method according to claim 1, wherein the first channel audio data packet is added with a first channel identification, and the second channel audio data packet is added with a second channel identification; 所述向所述从耳机发送所述第一声道音频数据包或所述第二声道音频数据包,包括:The sending the first channel audio data packet or the second channel audio data packet to the slave headset includes: 向所述从耳机发送所述第一声道音频数据包和所述第二声道音频数据包中声道标识与所述主耳机对应的声道标识不相符的音频数据包。Send the audio data packets whose channel identifiers do not match the channel identifiers corresponding to the master earphones in the first channel audio data packet and the second channel audio data packet to the slave earphone. 3.一种主耳机,其特征在于,所述主耳机与终端设备建立无线通信连接,所述主耳机还与从耳机建立无线通信连接,所述主耳机包括:3. A master headset, characterized in that the master headset establishes a wireless communication connection with a terminal device, the master headset also establishes a wireless communication connection with a slave headset, and the master headset comprises: 接收模块,用于接收所述终端设备依序发送的第一声道音频数据包和第二声道音频数据包;a receiving module, configured to receive the first-channel audio data packet and the second-channel audio data packet sequentially sent by the terminal device; 发送模块,用于向所述从耳机发送所述第一声道音频数据包或所述第二声道音频数据包;a sending module, configured to send the first channel audio data packet or the second channel audio data packet to the slave headset; 所述接收模块用于接收所述终端设备依序交替发送的N组第一声道音频数据包和N组第二声道音频数据包,其中,N为大于或等于1的整数;The receiving module is configured to receive N groups of first-channel audio data packets and N groups of second-channel audio data packets alternately sent by the terminal device in sequence, where N is an integer greater than or equal to 1; 所述主耳机还包括处理模块,用于每次接收一组音频数据包,并在每接收到一组音频数据包时,检验该组音频数据包的声道标识,若该组音频数据包的声道标识所标识的声道与自身声道相符,则对该组音频数据包进行解码,并播放;若该组音频数据包的声道标识所标识的声道与自身声道不相符,则将该组音频数据包发送至所述从耳机,以使所述从耳机在接收到该组音频数据包后,对该组音频数据包进行解码,并播放。The main earphone also includes a processing module for receiving a group of audio data packets each time, and when receiving a group of audio data packets, checking the channel identification of the group of audio data packets, if the audio data packets of the group are If the channel identified by the channel identifier matches its own channel, the group of audio data packets is decoded and played; if the channel identified by the channel identifier of the group of audio data packets does not match its own channel, then The group of audio data packets is sent to the slave earphone, so that after the slave earphone receives the group of audio data packets, the group of audio data packets is decoded and played. 4.根据权利要求3所述的主耳机,其特征在于,所述第一声道音频数据包添加有第一声道标识,所述第二声道音频数据包添加有第二声道标识;4. The main earphone according to claim 3, wherein the first channel audio data packet is added with a first channel identification, and the second channel audio data packet is added with a second channel identification; 所述发送模块用于向所述从耳机发送所述第一声道音频数据包和所述第二声道音频数据包中声道标识与所述主耳机对应的声道标识不相符的音频数据包。The sending module is configured to send the audio data whose channel identifier does not match the channel identifier corresponding to the master earphone in the first channel audio data packet and the second channel audio data packet to the slave earphone Bag. 5.一种主耳机,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1或2所述的音频传输方法中的步骤。5. A main earphone, characterized in that, comprising a processor, a memory and a computer program stored on the memory and running on the processor, the computer program being executed by the processor to achieve as claimed in the right Steps in the audio transmission method described in claim 1 or 2.
CN201810494204.3A 2018-05-22 2018-05-22 An audio transmission method, terminal device and main earphone Active CN108810860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810494204.3A CN108810860B (en) 2018-05-22 2018-05-22 An audio transmission method, terminal device and main earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810494204.3A CN108810860B (en) 2018-05-22 2018-05-22 An audio transmission method, terminal device and main earphone

Publications (2)

Publication Number Publication Date
CN108810860A CN108810860A (en) 2018-11-13
CN108810860B true CN108810860B (en) 2022-05-17

Family

ID=64091323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810494204.3A Active CN108810860B (en) 2018-05-22 2018-05-22 An audio transmission method, terminal device and main earphone

Country Status (1)

Country Link
CN (1) CN108810860B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109817232A (en) * 2019-01-30 2019-05-28 维沃移动通信有限公司 A kind of transmission method, terminal device and apparatus for processing audio
CN111370018B (en) * 2020-02-28 2023-10-24 维沃移动通信有限公司 Audio data processing methods, electronic devices and media
CN113488062B (en) 2020-03-16 2024-08-27 维沃移动通信有限公司 Audio transmission method and electronic device
CN113676820B (en) * 2021-09-18 2024-10-22 合肥中感微电子有限公司 Wireless multi-channel audio transmission method, device and electronic device
CN113573202A (en) * 2021-09-23 2021-10-29 深圳市外星人创新电子有限公司 Data transmission control method and system of Bluetooth headset
US12170867B2 (en) 2022-05-16 2024-12-17 Microsoft Technology Licensing, Llc Earbud location detection based on acoustical signature with user-specific customization
US12375844B2 (en) 2022-12-13 2025-07-29 Microsoft Technology Licensing, Llc Earbud for authenticated sessions in computing devices

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060708A (en) * 2016-05-30 2016-10-26 努比亚技术有限公司 Terminal and method of playing audio
CN106658291A (en) * 2016-12-21 2017-05-10 捷开通讯(深圳)有限公司 Audio device and method for switching stereo and single track external play
CN107124674A (en) * 2017-06-20 2017-09-01 歌尔科技有限公司 A kind of audio-frequency inputting method of bluetooth earphone, device and bluetooth earphone
CN107333339A (en) * 2017-05-16 2017-11-07 恒玄科技(上海)有限公司 Audio data transmission method and double wireless headsets between a kind of pair of wireless headset

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201216725A (en) * 2010-10-06 2012-04-16 Cotron Corp Earphone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060708A (en) * 2016-05-30 2016-10-26 努比亚技术有限公司 Terminal and method of playing audio
CN106658291A (en) * 2016-12-21 2017-05-10 捷开通讯(深圳)有限公司 Audio device and method for switching stereo and single track external play
CN107333339A (en) * 2017-05-16 2017-11-07 恒玄科技(上海)有限公司 Audio data transmission method and double wireless headsets between a kind of pair of wireless headset
CN107124674A (en) * 2017-06-20 2017-09-01 歌尔科技有限公司 A kind of audio-frequency inputting method of bluetooth earphone, device and bluetooth earphone

Also Published As

Publication number Publication date
CN108810860A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108810860B (en) An audio transmission method, terminal device and main earphone
CN110324124B (en) Aperiodic sounding reference signal SRS transmission method and terminal equipment
CN109089330B (en) Audio data transmission method and terminal
CN108347529B (en) Audio playing method and mobile terminal
CN110149132A (en) A kind of switching method of transmitting antenna and terminal equipment
CN113223539B (en) Audio transmission method and electronic equipment
CN108319445B (en) A kind of audio playback method and mobile terminal
US12224792B2 (en) Audio transmission method and electronic device
CN111093137B (en) A volume control method, device and computer-readable storage medium
US12335700B2 (en) Bluetooth speaker control method and system, storage medium, and mobile terminal
CN110034876A (en) PUCCH resource instruction, processing method, network side equipment, user terminal
CN107889044B (en) Audio data processing method and device
CN110299936A (en) A kind of switching method and terminal device of transmitting antenna
WO2019184763A1 (en) Processing method for communication range information and terminal
WO2020228537A1 (en) Resource determination method, resource indication method, terminal and network side device
CN108377483A (en) A kind of processing method and mobile terminal of bluetooth channel
WO2021018227A1 (en) Uplink control information transmission method, terminal device, and storage medium
CN108319440B (en) Audio output method and mobile terminal
CN111836266A (en) SRS sending method, configuration method, terminal and network side device
WO2020164584A1 (en) Message sending method, message receiving method, terminal device and network device
CN110324129B (en) Uplink transmission method and terminal
CN110138529A (en) The configuration method of SR, network side equipment, terminal side equipment
US12262189B2 (en) Audio transmission method and electronic device
CN106454420A (en) Clock synchronization method and device
CN113411447B (en) A channel switching method and electronic device

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