CN112669859B - Communication mode control method and device - Google Patents

Communication mode control method and device Download PDF

Info

Publication number
CN112669859B
CN112669859B CN201910984158.XA CN201910984158A CN112669859B CN 112669859 B CN112669859 B CN 112669859B CN 201910984158 A CN201910984158 A CN 201910984158A CN 112669859 B CN112669859 B CN 112669859B
Authority
CN
China
Prior art keywords
low
delay
audio data
coder
decoder
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
CN201910984158.XA
Other languages
Chinese (zh)
Other versions
CN112669859A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910984158.XA priority Critical patent/CN112669859B/en
Publication of CN112669859A publication Critical patent/CN112669859A/en
Application granted granted Critical
Publication of CN112669859B publication Critical patent/CN112669859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the application discloses a communication mode control method and device, wherein the method comprises the following steps: the user equipment creates a fast track thread when detecting a low-delay communication request for the wireless earphone; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode. The method and the device are beneficial to reducing the audio delay of the user equipment end and the earphone end and improving the user experience.

Description

Communication mode control method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling a communication mode.
Background
Currently, wireless headphones are more and more popular, and people use the wireless headphones in various occasions to get rid of the constraint of the wired headphones and enjoy music entertainment and communication freely.
In the field of game electronic contests and in the process of watching live videos and the like, audio delay between a wireless earphone and user equipment is a disadvantage, and the delay refers to the total shared time when audio streams at the user equipment end are played to a loudspeaker at the wireless earphone end. When the delay is too large, the situation that the picture of the user equipment is inconsistent with the sound heard by the user can occur, and the game experience and the video watching experience of the user can be influenced.
Disclosure of Invention
The embodiment of the application provides a communication mode control method and device, so as to reduce audio delay of a user equipment end and an earphone end and improve user experience.
In a first aspect, an embodiment of the present application provides a communication mode control method, which is applied to a user equipment, where the user equipment is in communication connection with a wireless headset; the method comprises the following steps:
creating a fast track thread upon detecting a low latency communication request for the wireless headset;
reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data;
when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay;
And sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
In a second aspect, an embodiment of the present application provides a communication mode control method, which is applied to a wireless headset, where the wireless headset is communicatively connected to a user device, and the method includes:
receiving a low-delay mode switching notification sent by the user equipment, wherein the low-delay mode switching notification is sent by the user equipment after the following operations are performed: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay;
and switching the working mode of the local terminal to a low-delay working mode.
In a third aspect, an embodiment of the present application provides a communication mode control device, which is applied to a user equipment, where the user equipment is in communication connection with a wireless headset; the apparatus comprises a processing unit and a communication unit, wherein,
The processing unit is used for creating a fast track thread when a low-delay communication request for the wireless earphone is detected; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
In a fourth aspect, an embodiment of the present application provides a communication mode control device, which is applied to a wireless headset, where the wireless headset is in communication connection with a user device; the apparatus comprises a processing unit and a communication unit, wherein,
the processing unit is configured to receive a low-delay mode switching notification sent by the user equipment, where the low-delay mode switching notification is sent by the user equipment after: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and switching the working mode of the local terminal to a low-delay working mode.
In a fifth aspect, embodiments of the present application provide a user equipment comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
In a sixth aspect, embodiments of the present application provide a wireless headset comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by the processor, the programs comprising instructions for performing steps in any of the methods of the second aspect of embodiments of the present application.
In a seventh aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to perform some or all of the steps as described in any of the methods of the first or second aspects of the embodiments of the present application.
In an eighth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in any of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
In the embodiment of the application, when the user equipment detects a low-delay communication request aiming at the wireless earphone, a quick track thread is created; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; the method comprises the steps of sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode, and therefore, user equipment reduces delay and simultaneously sends the low-delay mode switching notification to the wireless earphone, the user equipment and a mobile phone are optimized together, audio delay of the user equipment and the earphone is reduced, and user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a communication mode control system in which a communication mode control device according to an embodiment of the present application is located;
fig. 2 is a schematic flow chart of a communication mode control method according to an embodiment of the present application;
fig. 3 is a flow chart of another communication mode control method according to an embodiment of the present application;
fig. 4 is a flowchart of another communication mode control method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a user equipment according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a wireless earphone according to an embodiment of the present application;
fig. 7 is a functional unit composition block diagram of a communication mode control apparatus provided in the embodiment of the present application;
fig. 8 is a functional unit block diagram of another communication mode control apparatus provided in the embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The User Equipment according to the embodiments of the present application may be an electronic device with communication capability, where the User Equipment may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various types of User Equipment (UE), mobile Station (MS), terminal device (terminal device), and so on.
The wireless earphone mentioned in the embodiment of the application is that the earphone wire in the middle is replaced by electric waves, and is connected to the transmitting end from the audio outlet of the audio playing device, and then the transmitting end sends the electric waves to the earphone of the receiving end, and the receiving end is equivalent to a radio. The wireless earphone may be classified into an infrared wireless earphone, a meter wave wireless earphone (FM frequency modulation earphone) and a decimeter wave wireless earphone (bluetooth earphone).
At present, when the audio delay between the wireless earphone and the user equipment is too large in the scenes of games, live broadcasting watching, video watching and the like, the situation that the pictures of the user equipment are inconsistent with the sounds heard by the user can be caused, and the experience of the user is seriously affected.
In view of the foregoing, embodiments of the present application provide a method and an apparatus for controlling a communication mode, and the embodiments of the present application are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the communication mode control system 100 described in the present application includes: a user device 101 and a wireless headset 102, said user device 101 and said wireless headset 102 being capable of establishing a communication connection.
Referring to fig. 2, fig. 2 is a flow chart of a communication mode control method provided in an embodiment of the present application, which is applied to a user equipment, where the user equipment is in communication connection with a wireless headset; as shown in the figure, the present communication mode control method includes the following operations:
S201, the user equipment creates a fast track thread when detecting a low delay communication request for the wireless headset.
The user equipment may be a mobile phone, and whether there is a low latency requirement may be determined by identifying whether an application program at the mobile phone end invokes an AUDIO processing interface OpenSL ES, or whether an audio_output_flag_fast (AUDIO stream needs to be quickly OUTPUT to the AUDIO device) FLAG is set when an AUDIO track is created, or whether there is a low latency requirement may also be detected by using a whitelist of the mobile phone.
In order to better realize low delay, an application program with low delay requirement acquires the sampling rate of the user equipment before creating the audio track program, and then provides corresponding audio data according to the acquired sampling rate.
S202, the user equipment reduces the audio data buffer area through the fast track thread, and cancels the operations of resampling the target audio data and/or processing the sound effect of the target audio data.
The user equipment may be a mobile phone, and when the mobile phone detects that there is a low-delay application demand, the mobile phone may create a fast track thread through an audio module of the mobile phone, and the fast track thread reduces an audio data buffer area, cancels resampling of target audio data, cancels processing of sound effects of the target audio data, and reduces processing time of an audio stream at a mobile phone end, thereby reducing delay.
S203, when the user equipment detects that the audio codec selected by the user equipment is a first codec with non-low delay, the first codec is switched to a second codec with low delay.
For example, also taking a mobile phone as an example, when the audio module of the mobile phone recognizes a low-delay requirement, the requirement can be submitted to the bluetooth module of the mobile phone, and if the previously selected audio codec is not the low-delay audio codec, the bluetooth module of the mobile phone switches the previous audio codec to the low-delay audio codec.
S204, the user equipment sends a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone to a low-delay mode.
The wireless earphone in the embodiment of the application may be a Bluetooth (Bluetooth) earphone, and may be connected to the user equipment through Bluetooth technology. Bluetooth is a wireless technology standard that enables short-range data exchange between fixed devices, mobile devices, and building personal area networks.
For example, taking a mobile phone and a bluetooth headset as an example, the mobile phone and the bluetooth headset establish communication connection through respective bluetooth modules, and then the bluetooth module at the mobile phone end sends a low-delay mode switching notification to the bluetooth headset to notify the bluetooth headset to enter a low-delay mode, wherein the bluetooth headset can be notified to enter the low-delay mode through a reconfiguration instruction reconfig or other customized commands.
In the embodiment of the application, when the user equipment detects a low-delay communication request aiming at the wireless earphone, a quick track thread is created; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; the method comprises the steps of sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode, and therefore, user equipment reduces delay and simultaneously sends the low-delay mode switching notification to the wireless earphone, the user equipment and a mobile phone are optimized together, audio delay of the user equipment and the earphone is reduced, and user experience is improved.
In one possible example, the detecting a low-latency communication request for the wireless headset includes: detecting that an application program of a local terminal calls an audio processing interface OpenSL ES; or detecting that an application program of the local end creates a sound track program audioTrack to set a preset mark bit, wherein the preset mark bit is used for identifying that the audio stream needs to be quickly output to audio equipment; or detecting by means of a mobile phone application white list.
For example, taking a mobile phone as an example, when detecting that an application program in an application program installed in the mobile phone invokes an AUDIO processing interface OpenSL ES, or when detecting that an application program in the mobile phone creates an AUDIO track, an audio_output_flag_fast (AUDIO stream needs to be quickly OUTPUT to an AUDIO device) FLAG is set, or when detecting that an application program in an application whitelist of the mobile phone, determining that the mobile phone has a low-delay communication request for a wireless earphone, and creating a quick AUDIO track thread.
In order to better realize low delay, an application program with low delay requirement acquires the sampling rate of the user equipment before creating the audio track program, and then provides corresponding audio data according to the acquired sampling rate.
In this example, the user equipment side identifies the low-delay requirement scene, so that when the low-delay requirement scene is identified, the user equipment side switches to the low-delay mode to reduce the audio delay between the user equipment and the wireless earphone, and whether the application program calls the OpenSL ES or whether a preset mark bit for identifying that the audio stream needs to be quickly output to the audio equipment is set when the audioTrack is created or whether the application program and the wireless earphone are set or not is more convenient to identify the low-delay requirement of the local application program and the wireless earphone for audio data by a mode of a mobile phone application white list.
In one possible example, the sending a low-latency mode switch notification to the wireless headset includes: the low-delay mode switching notification is sent by a reconfiguration instruction reconfig.
For example, the user equipment may be a mobile phone, the wireless headset may be a bluetooth headset, the mobile phone and the bluetooth headset establish a communication connection through respective bluetooth modules, and the bluetooth module of the mobile phone may send a reconfiguration instruction reconfig to the bluetooth headset, where the instruction is used to notify the bluetooth headset end to enter a low-delay mode, so that the bluetooth headset end enters the low-delay mode after receiving the reconfiguration instruction reconfig sent by the mobile phone.
It can be seen that in this example, the low-delay mode switch notification is sent to the wireless headset by a reconfiguration instruction reconfig.
In one possible example, after the detecting the low-latency communication request for the wireless headset, the method further comprises: and when the audio data buffer area is detected to be smaller, adjusting the size of the Bluetooth transmission packet to be a preset size according to the size of the audio data buffer area.
For example, after detecting that there is a low-delay communication request for the wireless earphone, the ue detects whether the audio data buffer is reduced, and if so, according to the size of the reduced audio data buffer, the ue may correspondingly reduce the bluetooth data transmission packet, use packet data transmission, and increase the bluetooth interference-free capability.
Therefore, in this example, since the buffer size adjustment affects the anti-interference capability and the pull-apart capability, when entering the low-delay mode, the user can improve the anti-interference capability of bluetooth by adjusting the size of the bluetooth transmission packet, thereby improving the stability of bluetooth data transmission.
In one possible example, the method further comprises: determining the interference intensity of a scene where the local terminal is located; and adjusting the compression rate of the audio coding to be a preset compression rate according to the interference intensity so as to reduce the transmission code rate of Bluetooth to be a preset code rate.
For example, the wireless earphone may be a bluetooth earphone, the user equipment may be a mobile phone, the two are communicated through respective bluetooth modules, the user equipment determines the interference intensity of the scene where the local end is located, and adjusts the compression rate of the audio code to a corresponding compression rate according to different interference intensities, for example, when the user equipment is in a strong interference environment, the corresponding compression rate of the code is higher than that when the user equipment is in a weak interference environment, and the transmission code rate of bluetooth is reduced by increasing the compression rate of the code.
In this example, the compression rate of the audio code is adjusted according to the different interference intensities of the scene where the user equipment is located, so as to reduce the code rate of bluetooth transmission and improve the stability of bluetooth transmission.
Referring to fig. 3, fig. 3 is a flow chart of another communication mode control method provided in an embodiment of the present application, which is applied to a wireless headset, where the wireless headset is in communication connection with a user equipment; as shown in the figure, the present communication mode control method includes the following operations:
s301, the wireless earphone receives a low-delay mode switching notification sent by the user equipment.
Wherein the low-latency mode switch notification is sent by the user equipment after: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; and switching the first coder-decoder to a second coder-decoder with low delay when the selected audio coder-decoder at the local end is detected to be the first coder-decoder with non-low delay.
S302, the wireless earphone switches the working mode of the local terminal to a low-delay working mode.
The wireless earphone in the embodiment of the application may be a bluetooth earphone, and may be connected to the user equipment through bluetooth technology. Bluetooth is a wireless technology standard that enables short-range data exchange between fixed devices, mobile devices, and building personal area networks.
In the embodiment of the application, the wireless earphone receives a low-delay mode switching notification sent by user equipment; wherein the low-latency mode switch notification is sent by the user equipment after: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; the working mode of the local terminal is switched to be a low-delay working mode, and as seen in that the wireless earphone receives the low-delay mode switching notification from the user equipment, the working mode of the local terminal is switched to be the low-delay working mode, the user equipment terminal and the mobile phone terminal are optimized together, the audio delay of the user equipment terminal and the earphone terminal is reduced, and the user experience is improved.
In one possible example, the method further comprises: reducing an audio data buffer area of the earphone so that the buffer time is smaller than a first preset threshold value; the size of the target audio data decoded at a time is adjusted to a preset size to reduce the direct memory access (Direct Memory Access, DMA) switching time.
After receiving a notification sent by a user equipment end that the notification enters a low-delay mode, the wireless earphone end reduces the own audio data buffer area so as to reduce the buffer time, wherein the first preset threshold value can be 100 milliseconds, namely the buffer time is within a range of tens of milliseconds; the earphone end also adjusts the data size of the audio data decoded at one time so as to reduce the Direct Memory Access (DMA) switching time, thereby reducing the delay of the earphone end.
It can be seen that, in this example, by adjusting the size of the target audio data decoded at a time and by adjusting the audio data buffer area of the earphone end, the delay of the earphone end can be reduced.
In one possible example, the method further comprises: detecting the size of the cache data of the target audio data; and fine-tuning the playing speed of the earphone according to the size of the cache data of the target audio data.
For example, the earphone end may detect the size of the buffered data of the target audio data in the audio buffer area of the earphone end, and fine tune the earphone playing speed according to the size of the buffered data, for example, when the size of the buffered data is smaller, the earphone playing speed may be properly adjusted down, and when the buffered data is larger, the earphone playing speed may be properly adjusted up.
In this example, the playing speed of the earphone is finely adjusted according to the size of the buffered data of the target audio data, so that the playing speed of the earphone is adapted to the size of the buffered data, which is beneficial to maintaining the buffer balance.
In one possible example, the method further comprises: counting the stability of receiving the target audio data by the Bluetooth at the home terminal; and dynamically adjusting an audio data buffer area of the earphone according to the stability of the local Bluetooth for receiving the target audio data.
The wireless earphone can be a Bluetooth earphone and can be connected with the user equipment through Bluetooth technology.
For example, taking a bluetooth headset as an example, the bluetooth headset may count the stability of receiving the target audio data by the bluetooth headset, and dynamically adjust the size of the audio data buffer of the bluetooth headset according to the counted stability, for example, when the stability is weak, the size of the audio data buffer is appropriately adjusted to improve the stability under the interference environment.
In this example, the stability of the earphone in the interference environment is improved by dynamically adjusting the audio data buffer area of the earphone according to the stability of the counted local bluetooth receiving the target audio data.
Referring to fig. 4, fig. 4 is a flowchart of another communication mode control method according to an embodiment of the present application. As shown in the figure, the communication mode control method includes the steps of:
s401, the user equipment creates a fast track thread when detecting a low delay communication request for the wireless headset.
The user equipment may be a mobile phone, and whether there is a low latency requirement may be determined by identifying whether an application program at the mobile phone end invokes an AUDIO processing interface OpenSL ES, or whether an audio_output_flag_fast (AUDIO stream needs to be quickly OUTPUT to the AUDIO device) FLAG is set when an AUDIO track is created, or whether there is a low latency requirement may also be detected by using a whitelist of the mobile phone.
In order to better realize low delay, an application program with low delay requirement acquires the sampling rate of the user equipment before creating the audio track program, and then provides corresponding audio data according to the acquired sampling rate.
S402, the user equipment reduces the audio data buffer area through the fast track thread, and cancels the operations of resampling the target audio data and/or processing the sound effect of the target audio data.
The fast track thread reduces the audio data buffer area, cancels resampling of target audio data, cancels processing of sound effect of the target audio data, and reduces processing time of audio stream at the mobile phone end, thereby reducing delay.
S403, when the user equipment detects that the audio codec selected by the user equipment is a first codec with non-low delay, the first codec is switched to a second codec with low delay.
For example, taking a mobile phone as an example, when an audio module of the mobile phone recognizes a low-delay requirement, the requirement can be submitted to a bluetooth module of the mobile phone, and if the previously selected audio codec is not the low-delay audio codec, the bluetooth module of the mobile phone switches the previous audio codec to the low-delay audio codec.
S404, the user equipment sends a low-delay mode switching notification to the wireless earphone.
The low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
S405, the wireless earphone receives a low-delay mode switching notification sent by the user equipment.
The wireless earphone in the embodiment of the application may be a bluetooth earphone, and may be connected to the user equipment through bluetooth technology.
S406, the wireless earphone switches the working mode of the local terminal to a low-delay working mode.
In the embodiment of the application, when the user equipment detects a low-delay communication request aiming at the wireless earphone, a quick track thread is created; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; the user equipment sends a low-delay mode switching notification to the wireless earphone; the wireless earphone receives a low-delay mode switching notification sent by user equipment; the wireless earphone switches the working mode of the local terminal to a low-delay working mode. Therefore, when the user equipment detects that the low-delay requirement exists, the user equipment reduces the delay and simultaneously sends a low-delay mode switching notice to the wireless earphone, when the wireless earphone receives the notice, the wireless earphone enters a low-delay mode, the delay of the earphone end is reduced, and through common optimization of the user equipment end and the earphone end, the total time from the user equipment to the playing of the sound of the wireless earphone is reduced, so that the problem that a user feels that the picture and the sound are not synchronous is solved, and better experience is obtained by using the wireless earphone in the scenes of playing, watching live broadcast, video and the like.
In accordance with the embodiment shown in fig. 2, please refer to fig. 5, fig. 5 is a schematic structural diagram of a ue according to an embodiment of the present application. As shown, the user device 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, wherein the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and wherein the one or more programs 521 include instructions for performing any of the above-described method embodiments.
In one possible example, the one or more programs 521 include instructions for performing the steps of: creating a fast track thread upon detecting a low latency communication request for the wireless headset; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
In one possible example, in terms of the detection of a low latency communication request for the wireless headset, the instructions in the program 521 are specifically for: detecting that an application program of a local terminal calls an audio processing interface OpenSL ES; or detecting that an application program of the local end creates a sound track program audioTrack to set a preset mark bit, wherein the preset mark bit is used for identifying that the audio stream needs to be quickly output to audio equipment; or detecting by means of a mobile phone application white list.
In one possible example, in terms of the sending of a low-latency mode switch notification to the wireless headset, the instructions in the program 521 are specifically for: the low-delay mode switching notification is sent by a reconfiguration instruction reconfig.
In one possible example, after the detection of the low latency communication request aspect for the wireless headset, the program 521 further includes instructions for: and when the audio data buffer area is detected to be smaller, adjusting the size of the Bluetooth transmission packet to be a preset size according to the size of the audio data buffer area.
In one possible example, the program 521 further includes instructions for: determining the interference intensity of a scene where the local terminal is located; and adjusting the compression rate of the audio coding to be a preset compression rate according to the interference intensity so as to reduce the transmission code rate of Bluetooth to be a preset code rate.
In accordance with the embodiment shown in fig. 3, please refer to fig. 6, fig. 6 is a schematic structural diagram of a wireless earphone according to an embodiment of the present application. As shown, the wireless headset 600 includes an application processor 610, a memory 620, a communication interface 630, and one or more programs 621, wherein the one or more programs 621 are stored in the memory 620 and configured to be executed by the application processor 610, and wherein the one or more programs 621 include instructions for performing any of the method embodiments described above.
In one possible example, the one or more programs 621 include instructions for performing the following steps: receiving a low-delay mode switching notification sent by the user equipment, wherein the low-delay mode switching notification is sent by the user equipment after the following operations are performed: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and switching the working mode of the local terminal to a low-delay working mode.
In one possible example, the program 621 further includes instructions for: reducing an audio data buffer area of the earphone so that the buffer time is smaller than a first preset threshold value; and adjusting the size of the target audio data decoded at one time to be a preset size so as to reduce the Direct Memory Access (DMA) switching time.
In one possible example, the program 621 further includes instructions for: detecting the size of the cache data of the target audio data; and fine-tuning the playing speed of the earphone according to the size of the cache data of the target audio data.
In one possible example, the program 621 further includes instructions for: counting the stability of receiving the target audio data by the Bluetooth at the home terminal; and dynamically adjusting an audio data buffer area of the earphone according to the stability of the local Bluetooth for receiving the target audio data.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the user equipment, in order to implement the above-described functions, comprises corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional units of the user equipment according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
Referring to fig. 7, fig. 7 is a block diagram showing functional units of a communication mode control apparatus 700 according to an embodiment of the present application. The communication mode control device 700 is applied to a user equipment, and the user equipment is in communication connection with a wireless earphone; the communication mode control device 700 includes a processing unit 701 and a communication unit 702, where the processing unit 701 is configured to perform any step in the above method embodiments, and when performing data transmission such as sending, the communication unit 702 is selectively invoked to complete a corresponding operation. The following is a detailed description.
The processing unit 701 is configured to create a fast track thread when a low-latency communication request for the wireless headset is detected; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling the target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
In one possible example, in the aspect of detecting the low-delay communication request for the wireless headset, the processing unit 701 is specifically configured to: detecting that an application program of a local terminal calls an audio processing interface OpenSL ES; or detecting that an application program of the local end creates a sound track program audioTrack to set a preset mark bit, wherein the preset mark bit is used for identifying that the audio stream needs to be quickly output to audio equipment; or detecting by means of a mobile phone application white list.
In one possible example, in the aspect of sending the low-delay mode switching notification to the wireless headset, the processing unit 701 is specifically configured to: the low-delay mode switching notification is sent by a reconfiguration instruction reconfig.
In one possible example, after the detection of the low-latency communication request aspect for the wireless headset, the processing unit 701 is further configured to: and when the audio data buffer area is detected to be smaller, adjusting the size of the Bluetooth transmission packet to be a preset size according to the size of the audio data buffer area.
In one possible example, the processing unit 701 is further configured to: determining the interference intensity of a scene where the local terminal is located; and adjusting the compression rate of the audio coding to be a preset compression rate according to the interference intensity so as to reduce the transmission code rate of Bluetooth to be a preset code rate.
The communication mode control device 700 may further comprise a storage unit 703 for storing program codes and data of the user equipment. The processing unit 701 may be a processor, the communication unit 702 may be a touch display screen or a transceiver, and the storage unit 703 may be a memory.
Referring to fig. 8, fig. 8 is a block diagram showing functional units of another communication mode control apparatus 800 according to an embodiment of the present application. The communication mode control device 800 is applied to a wireless earphone, and the wireless earphone is in communication connection with user equipment; the communication mode control device 800 includes a processing unit 801 and a communication unit 802, where the processing unit 801 is configured to perform any step in the above method embodiments, and when performing data transmission such as transmission, the communication unit 802 is selectively called to complete a corresponding operation. The following is a detailed description.
The processing unit 801 is configured to receive a low-latency mode switching notification sent by the user equipment, where the low-latency mode switching notification is sent by the user equipment after: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the fast track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and switching the working mode of the local terminal to a low-delay working mode.
In one possible example, the processing unit 801 is further configured to: reducing an audio data buffer area of the earphone so that the buffer time is smaller than a first preset threshold value; and adjusting the size of the target audio data decoded at one time to be a preset size so as to reduce the Direct Memory Access (DMA) switching time.
In one possible example, the processing unit 801 is further configured to: detecting the size of the cache data of the target audio data; and fine-tuning the playing speed of the earphone according to the size of the cache data of the target audio data.
In one possible example, the processing unit 801 is further configured to: counting the stability of receiving the target audio data by the Bluetooth at the home terminal; and dynamically adjusting an audio data buffer area of the earphone according to the stability of the local Bluetooth for receiving the target audio data.
It can be understood that, since the method embodiment and the apparatus embodiment are in different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be adapted to the apparatus embodiment portion synchronously, which is not described herein.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program makes a computer execute part or all of the steps of any one of the method embodiments described in the method embodiment, and the computer includes a user equipment or a wireless earphone.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising user equipment.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (14)

1. A communication mode control method, which is characterized by being applied to user equipment, wherein the user equipment is in communication connection with a wireless earphone; the method comprises the following steps:
creating a fast track thread upon detecting a low latency communication request for the wireless headset;
Reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling target audio data and/or processing the sound effect of the target audio data;
when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay;
and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
2. The method of claim 1, wherein the detecting a low-latency communication request for the wireless headset comprises:
detecting that an application program of a local terminal calls an audio processing interface OpenSL ES; or,
detecting that an application program of a local end creates a sound track program audioTrack, and setting a preset mark bit, wherein the preset mark bit is used for identifying that an audio stream needs to be rapidly output to audio equipment; or,
and detecting by using a white list mode through the mobile phone.
3. The method of claim 1 or 2, wherein the sending a low-latency mode switch notification to the wireless headset comprises:
The low-delay mode switching notification is sent by a reconfiguration instruction reconfig.
4. The method according to claim 1 or 2, wherein after the detection of a low delay communication request for the wireless headset, the method further comprises:
and when the audio data buffer area is detected to be smaller, adjusting the size of the Bluetooth transmission packet to be a preset size according to the size of the audio data buffer area.
5. The method according to claim 4, wherein the method further comprises:
determining the interference intensity of a scene where the local terminal is located;
and adjusting the compression rate of the audio coding to be a preset compression rate according to the interference intensity so as to reduce the transmission code rate of Bluetooth to be a preset code rate.
6. The communication mode control method is characterized by being applied to a wireless earphone, wherein the wireless earphone is in communication connection with user equipment; the method comprises the following steps:
receiving a low-delay mode switching notification sent by the user equipment, wherein the low-delay mode switching notification is sent by the user equipment after the following operations are performed: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the rapid audio track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay;
And switching the working mode of the local terminal to a low-delay working mode.
7. The method of claim 6, wherein the method further comprises:
reducing an audio data buffer area of the earphone so that the buffer time is smaller than a first preset threshold value;
and adjusting the size of the target audio data decoded at one time to be a preset size so as to reduce the Direct Memory Access (DMA) switching time.
8. The method of claim 7, wherein the method further comprises:
detecting the size of the cache data of the target audio data;
and fine-tuning the playing speed of the earphone according to the size of the cache data of the target audio data.
9. The method of claim 8, wherein the method further comprises:
counting the stability of receiving the target audio data by the Bluetooth at the home terminal;
and dynamically adjusting an audio data buffer area of the earphone according to the stability of the local Bluetooth for receiving the target audio data.
10. A communication mode control device, characterized by being applied to a user equipment, wherein the user equipment is in communication connection with a wireless earphone; the apparatus comprises a processing unit and a communication unit, wherein,
the processing unit is used for creating a fast track thread when a low-delay communication request for the wireless earphone is detected; reducing an audio data buffer area through the fast track thread, and canceling the operations of resampling target audio data and/or processing the sound effect of the target audio data; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and sending a low-delay mode switching notification to the wireless earphone, wherein the low-delay mode switching notification is used for notifying the wireless earphone to switch the working mode of the wireless earphone into a low-delay mode.
11. A communication mode control device, characterized in that it is applied to a wireless earphone, where the wireless earphone is in communication connection with a user device; the apparatus comprises a processing unit and a communication unit, wherein,
the processing unit is configured to receive a low-delay mode switching notification sent by the user equipment, where the low-delay mode switching notification is sent by the user equipment after: creating a fast track thread upon detecting a low latency communication request for the wireless headset; the audio data buffer area is reduced through the rapid audio track thread, and the operations of resampling the target audio data and/or processing the sound effect of the target audio data are canceled; when detecting that the audio coder/decoder selected by the local terminal is a first coder/decoder with non-low delay, switching the first coder/decoder into a second coder/decoder with low delay; and switching the working mode of the local terminal to a low-delay working mode.
12. A user equipment with communication mode control, characterized by comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
13. A wireless headset comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 6-9.
14. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5 or 6-9.
CN201910984158.XA 2019-10-16 2019-10-16 Communication mode control method and device Active CN112669859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910984158.XA CN112669859B (en) 2019-10-16 2019-10-16 Communication mode control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910984158.XA CN112669859B (en) 2019-10-16 2019-10-16 Communication mode control method and device

Publications (2)

Publication Number Publication Date
CN112669859A CN112669859A (en) 2021-04-16
CN112669859B true CN112669859B (en) 2024-04-02

Family

ID=75400564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910984158.XA Active CN112669859B (en) 2019-10-16 2019-10-16 Communication mode control method and device

Country Status (1)

Country Link
CN (1) CN112669859B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115580850A (en) * 2021-06-21 2023-01-06 Oppo广东移动通信有限公司 Bluetooth data processing method and device, equipment and storage medium
CN114615536A (en) * 2022-02-25 2022-06-10 海信视像科技股份有限公司 Display device and sound effect processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108551358A (en) * 2018-03-16 2018-09-18 恒玄科技(上海)有限公司 A kind of method of adjustment of bluetooth headset difference model subaudio frequency data
CN108988909A (en) * 2018-07-25 2018-12-11 Oppo(重庆)智能科技有限公司 Audio-frequency processing method and device, electronic equipment, computer readable storage medium
CN109151194A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Data transmission method, device, electronic equipment and storage medium
CN109144463A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Transfer control method, device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2432758B (en) * 2005-11-26 2008-09-10 Wolfson Ltd Auto device and method
US9210358B2 (en) * 2012-07-02 2015-12-08 Kevin Griffin Dual-mode communication devices and methods for communicating with an entertainment system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108551358A (en) * 2018-03-16 2018-09-18 恒玄科技(上海)有限公司 A kind of method of adjustment of bluetooth headset difference model subaudio frequency data
CN108988909A (en) * 2018-07-25 2018-12-11 Oppo(重庆)智能科技有限公司 Audio-frequency processing method and device, electronic equipment, computer readable storage medium
CN109151194A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Data transmission method, device, electronic equipment and storage medium
CN109144463A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Transfer control method, device and electronic equipment

Also Published As

Publication number Publication date
CN112669859A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
CN103888818B (en) A kind of television program playing method, equipment and system
US9832578B2 (en) Enabling concurrent proprietary audio and Bluetooth low energy using enhanced LE link layer for hearing device
JP3905509B2 (en) Apparatus and method for processing audio signal during voice call in mobile terminal for receiving digital multimedia broadcast
US20170034026A1 (en) Jitter buffer control based on monitoring of delay jitter and conversational dynamics
US7860458B2 (en) Audio transmitting apparatus and mobile communication terminal
WO2017215657A1 (en) Sound effect processing method, and terminal device
KR20090003809A (en) Method for playing data using networks and device using the same
CN112669859B (en) Communication mode control method and device
CN107465824B (en) Volume adjusting method and device, mobile terminal and storage medium
CN109165005B (en) Sound effect enhancement method and device, electronic equipment and storage medium
US10950238B2 (en) Bluetooth speaker base, method and system for controlling thereof
MX2011005782A (en) Audio/video data play control method and apparatus.
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
US20220358965A1 (en) Method for audio mixing, terminal device, and non-transitory computer-readable medium
CN103795950A (en) Television audio signal processing device
CN104254007A (en) Method and device for processing audio
WO2020048209A1 (en) Sound effect processing method and apparatus, and electronic device and storage medium
CN112135285A (en) Real-time audio interaction method of multiple Bluetooth audio devices
CN107526570B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2019033942A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
CN109117110B (en) Data processing method and device for dynamic voice fusion
CN110799936A (en) Volume adjusting method and device, terminal equipment and storage medium
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN104867296A (en) Sound volume adjustment method and 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