Audio playing control method, electronic equipment and readable storage medium

By disconnecting or establishing audio data connections based on the wearable state between the terminal device and the wearable device, the problem of audio playback when the user takes off the wearable device is solved, and automatic switching of the audio playback path and improved user experience are achieved.

CN119544852APending Publication Date: 2025-02-28HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311117216.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When the terminal device and the wearable device play audio, there is an unreasonable playback path, which causes the wearable device to still play audio by the wearable device when the user takes off the wearable device, which has a poor user experience.

Method used

By disconnecting or establishing an audio data connection between the wearable device and the terminal device, switching according to the wearable device's wearable state, ensuring silky switching of the audio playback path is avoiding the problem of audio playback when the user is not wearing the device.

Benefits of technology

It realizes automatic switching of audio playback paths when users wear or take off their wearable devices, ensuring that users can always hear audio, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544852A_ABST
    Figure CN119544852A_ABST
Patent Text Reader

Abstract

The invention provides an audio playing control method, electronic equipment and a readable storage medium, in the method, when a wearable device is switched from a wearing state to a non-wearing state, the wearable device disconnects a first connection with a terminal device, and the first connection is used for transmitting audio data; the terminal equipment stops sending the audio data to the wearable equipment; when the wearable device is switched to the wearing state, the wearable device establishes a first connection with the terminal device; the terminal device sends the first audio data to the wearable device; and the wearable device plays the audio according to the first audio data. In the application, when the user wears the wearable device, the wearable device plays the audio, when the user does not wear the wearable device, the wearable device does not play the audio, and the terminal device can play the audio, so that with the change of the state of the wearable device, smooth switching of an audio playing channel can be realized, and the user can hear the audio; and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an audio playback control method, an electronic device, and a readable storage medium. Background Art

[0002] With the development of smart devices, users are using more and more smart devices in their daily lives. For example, users can connect terminal devices and wearable devices and use wearable devices to play audio.

[0003] In actual application scenarios, there are unreasonable playback paths when terminal devices and wearable devices play audio. For example, when a user takes off a wearable device, the audio is still played by the wearable device, resulting in a poor user experience. Summary of the invention

[0004] The embodiments of the present application provide an audio playback control method, an electronic device, and a readable storage medium. As the wearing state of a wearable device changes, smooth switching of audio playback paths can be achieved, and the user can be ensured to hear the audio, thereby improving the user experience.

[0005] In the first aspect, an embodiment of the present application provides an audio playback control method, and the execution subject of the method can be a wearable device or a chip in the wearable device. The following description takes a wearable device as an example. In the method, when the wearable device switches from a wearing state to a non-wearing state, the first connection with the terminal device is disconnected, and the first connection is used to transmit audio data.

[0006] It should be understood that when the wearable device is in a worn state and has not been switched to a non-worn state, the terminal device can send audio data to the wearable device, and the wearable device can play audio according to the audio data. When the wearable device switches from a worn state to a non-worn state, because the user is not wearing the wearable device, if the terminal device continues to send audio data to the wearable device, the wearable device will continue to play audio, but the user is not wearing the wearable device and the user cannot hear the audio played by the wearable device. Therefore, in order to prevent the terminal device from continuing to send audio data to the wearable device, the wearable device can disconnect the first connection with the terminal device.

[0007] When the wearable device is switched to the wearing state, the wearable device establishes the first connection with the terminal device. Based on the first connection, the wearable device can receive the first audio data from the terminal device and play audio according to the first audio data.

[0008] When the user puts on the wearable device again, in order to facilitate the user to hear audio using the wearable device, the wearable device can establish the first connection with the terminal device, enabling the terminal device to send the first audio data to the wearable device, so that the wearable device can play the audio.

[0009] In the embodiment of the present application, when the user wears the wearable device, the wearable device can play audio, and when the user does not wear the wearable device, the wearable device disconnects the first connection with the terminal device, the wearable device does not play audio, and the terminal device can play audio. As the state of the wearable device changes, the audio playback path can be switched, and the user can also be guaranteed to hear the audio, thereby improving the user experience. Among them, the audio playback path can include the wearable device playing audio or the terminal device playing audio.

[0010] In a possible implementation, in a multimedia audio and video scenario, the first connection is a Bluetooth audio transmission model protocol A2DP connection, and the A2DP connection is used to transmit multimedia audio. In a possible implementation, in an audio and video call scenario, the first connection is a synchronous connection SCO, and the SCO connection is used to transmit call audio.

[0011] The following describes the audio playback control method provided by the embodiment of the present application from these two scenarios:

[0012] First, multimedia audio and video scenes

[0013] When the wearable device and the terminal device establish a Bluetooth connection, the wearable device and the terminal device may first establish an asynchronous connection (asynchronous connectionless link, ACL) link, based on the ACL link, the wearable device and the terminal device may establish an A2DP connection, and the A2DP connection is used to transmit multimedia audio.

[0014] When the wearable device is in a wearing state, the terminal device can send the second audio data to the wearable device. Correspondingly, the wearable device can receive the second audio data from the terminal device, and the wearable device can play audio according to the second audio data. In this way, when the user wears the wearable device, the wearable device can play audio.

[0015] In a possible scenario, when a user wears a wearable device, the wearable device may send a second instruction to the terminal device, where the second instruction is used to instruct the start of audio playback. In response to the second instruction, the terminal device may send a third start instruction to the wearable device, where the third start instruction is used to instruct the terminal device to start sending audio data. After the terminal device sends the third start instruction to the wearable device, the terminal device may send second audio data to the wearable device.

[0016] In some embodiments, when the wearable device switches from a wearing state to a non-wearing state, in order to avoid misoperation, the wearable device can disconnect the first connection with the terminal device after a preset period of time.

[0017] In some embodiments, when the wearable device switches from a wearing state to a non-wearing state, the wearable device may send a first instruction to the terminal device, where the first instruction is used to instruct to pause playing audio.

[0018] In a possible scenario, when the terminal device receives a first instruction from the wearable device but does not respond to the first instruction, the terminal device may not send a pause instruction to the wearable device. In this scenario, the wearable device may disconnect the first connection with the terminal device when a first preset time has passed since the first instruction was sent.

[0019] In a possible scenario, the terminal device receives a first instruction from the wearable device and can respond to the first instruction. In response to the first instruction, the terminal device can send a pause instruction to the wearable device. In this way, the wearable device can determine that the terminal device responds to the first instruction. In this scenario, the wearable device can disconnect the first connection with the terminal device when the first start instruction is received from the terminal device and the second preset time is reached after the first start instruction is received.

[0020] When the terminal device receives the first instruction, it can send a pause instruction to the wearable device, and the terminal device can stop sending audio data to the terminal device. However, in response to the user triggering the operation of playing audio, the terminal device sends a first start instruction to the wearable device, and the first start instruction instructs the terminal device to start sending audio data. In this way, the terminal device can disconnect the first connection with the terminal device in response to the first start instruction when the second preset time length from receiving the first start instruction.

[0021] Thus, in a multimedia audio and video scenario, when the wearable device switches from a worn state to a non-worn state, the wearable device can disconnect the first connection with the terminal device, and the terminal device cannot send audio data to the wearable device through the first connection, so the wearable device does not play audio. After the wearable device disconnects the first connection with the terminal device, the terminal device can play audio, or the user can operate the terminal device to enable the terminal device to play.

[0022] When the wearable device switches from a non-wearing state to a wearing state, the wearable device can establish the first connection with the terminal device, so that the terminal device can continue to send the first audio data to the wearable device, and the wearable device can play audio according to the first audio data.

[0023] Second, audio and video call scenarios

[0024] When the wearable device and the terminal device establish a Bluetooth connection, the wearable device and the terminal device may first establish an asynchronous connection (asynchronous connectionless link, ACL) link, based on the ACL link, the wearable device and the terminal device may establish an A2DP connection, and the A2DP connection is used to transmit multimedia audio.

[0025] When the terminal device receives an incoming call from the other end, the terminal device can establish a SCO connection with the wearable device. Through the SCO connection, the terminal device can send call audio data (second audio data) to the wearable device. The wearable device can play audio based on the call audio data. In this way, when the user wears the wearable device, the wearable device can play audio. In some embodiments, the SCO connection can be referred to as SCO.

[0026] In some embodiments, when the wearable device switches from a wearing state to a non-wearing state, the wearable device may disconnect the first connection with the terminal device.

[0027] In some embodiments, when the wearable device switches from a wearing state to a non-wearing state, in order to avoid misoperation, the wearable device can disconnect the first connection with the terminal device after a preset period of time.

[0028] Thus, in the scenario of an audio or video call, when the wearable device switches from a worn state to a non-worn state, the wearable device can disconnect the first connection with the terminal device, and the terminal device cannot send audio data to the wearable device through the first connection, so the wearable device does not play audio. After the wearable device disconnects the first connection with the terminal device, the terminal device can play audio, or the user can operate the terminal device to enable the terminal device to play.

[0029] When the wearable device switches from the non-wearing state to the wearing state, the wearable device may send a connection request to the terminal device, wherein the connection request is used to request the establishment of SCO. In this way, the wearable device may establish the first connection with the terminal device, and the terminal device may continue to send the first audio data to the wearable device, and the wearable device may play audio according to the first audio data.

[0030] In a second aspect, an embodiment of the present application provides an audio playback control method, and the execution subject of the method may be a terminal device or a chip in the terminal device. The following description will be given using a terminal device as an example.

[0031] When the wearable device switches from a wearing state to a non-wearing state, the terminal device disconnects a first connection with the wearable device, wherein the first connection is used to transmit audio data, and the terminal device stops sending audio data to the wearable device.

[0032] When the wearable device is switched to a wearing state, the terminal device establishes the first connection with the wearable device, and based on the first connection, sends first audio data to the wearable device.

[0033] In a possible implementation manner, the first connection is a Bluetooth audio transmission model protocol A2DP connection, or the first connection is a synchronization oriented connection SCO.

[0034] In a possible implementation, when the first connection is an A2DP connection, before disconnecting the first connection with the wearable device, the method further includes: receiving a first instruction from the wearable device, where the first instruction is used to instruct to pause playing audio.

[0035] In a possible implementation manner, the method further includes: playing audio.

[0036] In a possible implementation, after receiving the first instruction from the wearable device, it also includes: sending a pause instruction to the wearable device; in response to a user triggering an operation to play audio, sending a first start instruction to the wearable device, wherein the first start instruction instructs the terminal device to start sending audio data.

[0037] In a possible implementation, when the first connection is SCO, before establishing the first connection with the wearable device, the method further includes: receiving a connection request from the wearable device, where the connection request is used to request to establish SCO.

[0038] In a third aspect, an embodiment of the present application provides an audio playback control method, when a wearable device switches from a wearing state to a non-wearing state, the wearable device disconnects a first connection with a terminal device, the first connection being used to transmit audio data. The terminal device suspends sending audio data to the wearable device.

[0039] When the wearable device is switched to the wearing state, the wearable device establishes the first connection with the terminal device. The terminal device sends first audio data to the wearable device, and the wearable device plays audio according to the first audio data.

[0040] In a possible implementation manner, the first connection is a Bluetooth audio transmission model protocol A2DP connection, or the first connection is a synchronization oriented connection SCO.

[0041] In a possible implementation, when the first connection is an A2DP connection, before the wearable device disconnects the first connection with the terminal device, the method further includes: the wearable device sends a first instruction to the terminal device, where the first instruction is used to instruct to pause audio playback.

[0042] In a possible implementation, disconnecting the first connection with the wearable device includes: when a first preset time period elapses before sending the first instruction, the wearable device disconnects the first connection with the terminal device.

[0043] In a possible implementation, after sending the first instruction to the terminal device, it also includes: the terminal device sends a pause instruction to the wearable device; in response to a user triggering an operation to play audio, the terminal device sends a first start instruction to the wearable device, and the first start instruction instructs the terminal device to start sending audio data; when a second preset time has passed since receiving the first start instruction, the wearable device disconnects the first connection with the terminal device.

[0044] In a possible implementation, when the first connection is SCO, before the wearable device disconnects the first connection with the terminal device, the method further includes: the wearable device sends a connection request to the terminal device, where the connection request is used to request to establish SCO.

[0045] In a fourth aspect, an embodiment of the present application provides an audio playback control system, the system comprising: a wearable device and a terminal device. The wearable device can execute the method in the first aspect and the steps executed by the wearable device in the third aspect. The terminal device can execute the method in the second aspect and the steps executed by the terminal device in the third aspect.

[0046] In a fifth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory. The memory is used to store computer executable program code, and the program code includes instructions; when the processor executes the instructions, the instructions cause the electronic device to execute the method in the first aspect and the second aspect.

[0047] In a sixth aspect, an embodiment of the present application provides an electronic device, which may include a unit, a module or a circuit for executing the method provided in the first aspect or the second aspect above.

[0048] In a seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods in the first and second aspects above.

[0049] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the methods in the first and second aspects above.

[0050] The beneficial effects of the possible implementation methods of the second to eighth aspects mentioned above can be referred to the beneficial effects brought about by the first aspect mentioned above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of a scenario in which the audio control method provided in an embodiment of the present application is applicable;

[0052] Figure 2 A flowchart of an embodiment of an audio playback control method provided in an embodiment of the present application;

[0053] Figure 3 A flowchart of another embodiment of the audio playback control method provided in the embodiment of the present application;

[0054] Figure 4A A flowchart of another embodiment of the audio playback control method provided in the embodiment of the present application;

[0055] Figure 4B A schematic diagram of a scenario of the audio playback control method provided in an embodiment of the present application;

[0056] Figure 5A A flowchart of another embodiment of the audio playback control method provided in the embodiment of the present application;

[0057] Figure 5B A schematic diagram of another scenario of the audio playback control method provided in an embodiment of the present application;

[0058] Fig. 6A A flowchart of another embodiment of the audio playback control method provided in the embodiment of the present application;

[0059] Figure 6B A schematic diagram of another scenario of the audio playback control method provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The terminal device in the embodiment of the present application may be referred to as user equipment (UE), terminal, etc. For example, the terminal device may be a mobile phone, a portable android device (PAD), a personal digital assistant (PDA), a handheld device with a wireless communication function, a computing device, a vehicle-mounted device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in a smart home, etc. The form of the terminal device is not specifically limited in the embodiment of the present application.

[0062] The wearable device in the embodiment of the present application can be understood as a device that can be worn on the user, and the wearable device and the terminal device are different devices. Wearable devices may include but are not limited to: headphones, glasses, VR terminal devices, AR terminal devices, watches, bracelets, etc. Headphones may include but are not limited to in-ear, head-mounted, etc., and the embodiment of the present application does not limit this.

[0063] In the embodiment of the present application, the terminal device can establish a Bluetooth connection with the wearable device, and the audio playback control method provided in the embodiment of the present application is applicable to the scenario in which the terminal device establishes a Bluetooth connection with the wearable device. In some embodiments, the terminal device and the wearable device can also establish a WI-FI peer-to-peer (P2P) connection, a near field communication (NFC) connection, etc., which is not limited in the embodiment of the present application.

[0064] Taking the terminal device as a mobile phone and the wearable device as a headset as an example, after the mobile phone and the headset establish a Bluetooth connection, the mobile phone can send audio data to the headset, and the headset can play audio according to the audio data.

[0065] Scenario 1: Audio Scenario

[0066] The audio scene can be understood as a scene that includes only audio but not video. Exemplarily, the audio scene includes scenes such as playing music, playing recordings, and playing audio books.

[0067] In some embodiments, when a mobile phone and a headset have established a Bluetooth connection, after the user wears the headset, the headset can trigger the mobile phone to send audio data to the headset. Exemplarily, in response to the user wearing the headset, the headset can send a play instruction to the mobile phone, and the play instruction is used to instruct the start of audio playback. In response to the play instruction, the mobile phone can send audio data to the headset, so that the headset can play audio according to the audio data. When the user takes off the headset, the headset can send a pause instruction to the mobile phone, and the pause instruction instructs the user to pause the audio playback. In response to the pause instruction, the mobile phone can pause sending audio data to the headset. Because the mobile phone does not send audio data to the headset, the headset pauses the audio playback, and the mobile phone can also pause the audio playback. In some embodiments, the play instruction can be an audio video remote control protocol (audio video remote control profile, AVRCP) play instruction, and the pause instruction can be an AVRCP pause instruction.

[0068] In some embodiments, when a mobile phone and a headset have established a Bluetooth connection, after the user wears the headset, the user can trigger the mobile phone to send audio data to the headset. For example, the user can operate a button on the headset to trigger the mobile phone to send audio data to the headset. Alternatively, the user can click an audio play button on the mobile phone to trigger the mobile phone to send audio data to the headset, which is not limited in the embodiments of the present application.

[0069] For example, when a user operates a button on the headset, the headset can send a play command to the mobile phone in response to the user's operation. In response to the play command, the mobile phone can send audio data to the headset, so that the headset can play audio according to the audio data. When the user takes off the headset, the headset can send a pause command to the mobile phone, and the mobile phone can pause sending audio data to the headset. Because the mobile phone does not send audio data to the headset, the headset pauses playing audio, and the mobile phone can also pause playing audio.

[0070] Currently, after the user takes off the earphones, the user can operate on the mobile phone to trigger the mobile phone to continue playing audio. Because the mobile phone is still connected to the earphones, the mobile phone can continue to send audio data to the earphones in response to the user's operation, and the earphones will continue to play audio according to the audio data. However, because the user has taken off the earphones, the user cannot hear the audio played by the earphones, and the method of continuing to play audio by the earphones will result in a poor user experience.

[0071] In some embodiments, the pause instruction may be referred to as a first instruction, and the play instruction may be referred to as a second instruction. The first instruction is used to instruct to pause the playing of the audio, and the second instruction is used to instruct to start playing the audio.

[0072] Scenario 2: Video Scenario

[0073] The video scene can be understood as a scene including audio and video. Exemplarily, the video scene is, for example, a scene such as playing a video or playing a game.

[0074] Similar to the audio scenario, when a Bluetooth connection is established between the mobile phone and the headset, the headset can send a play command to the mobile phone after the user puts on the headset. When the user takes off the headset, the headset can send a pause command to the mobile phone.

[0075] In some embodiments, for example, some video applications and game applications are configured not to respond to play instructions and pause instructions. Take the mobile phone playing video as an example. Because the video application is configured not to respond to play instructions and pause instructions, when the mobile phone receives the play instruction, the mobile phone will not respond to the play instruction, and the mobile phone will not send audio data to the headset. When the mobile phone receives the pause instruction, the mobile phone will not respond to the pause instruction, and the mobile phone will not pause sending audio data to the headset. In this embodiment, after the user wears the headset, the mobile phone receives the play instruction from the headset, but the mobile phone will not send audio data to the headset. The user can operate on the mobile phone to trigger the mobile phone to send audio data to the headset. Exemplary, for example, the user can click the video play button on the mobile phone to trigger the mobile phone to send audio data to the headset. After the user takes off the headset, the headset can send a pause instruction to the mobile phone, but because the video application is configured not to respond to the pause instruction, the mobile phone can continue to send audio data to the headset, and the headset will play audio according to the audio data. However, because the user has taken off the headset, the user cannot hear the audio played by the headset, and the way of continuing to play audio by the headset will lead to poor user experience.

[0076] In some embodiments, for example, some other video applications and game applications are configured to respond to play instructions and pause instructions. When the mobile phone receives the play instruction, the mobile phone can send audio data to the headset, and the headset can play audio according to the audio data. After the user takes off the headset, the headset can send a pause instruction to the mobile phone, the mobile phone can pause sending audio data to the headset, and the mobile phone also pauses playing the video. Currently, after the user takes off the headset, the user can operate on the mobile phone to trigger the continuation of video playback. Because the mobile phone and the headset are still connected, the mobile phone can continue to send audio data to the headset in response to the user's operation, and the headset will play audio according to the audio data. However, because the user has taken off the headset, the user cannot hear the audio played by the headset, and the method of continuing to play audio by the headset will result in a poor user experience.

[0077] Scenario 3: Audio and video call scenario

[0078] Audio and video call scenarios may include, but are not limited to: telephone scenarios, audio call scenarios in social applications, and video call scenarios in social applications.

[0079] When a Bluetooth connection is established between a mobile phone and a headset, no matter the user is wearing or taking off the headset, after receiving the audio data from the other end, the mobile phone will send the audio data to the headset, and the headset can play the audio according to the audio data. Currently, when the user takes off the headset, the audio is still played by the headset, but because the user has taken off the headset, the user cannot hear the audio played by the headset. Continuing to play the audio by the headset will result in a poor user experience. The other end can be understood as a device that makes audio and video calls with the mobile phone.

[0080] In some embodiments, the audio in the audio scene and the audio in the video scene can be referred to as media audio, and the audio in the audio and video call scene can be referred to as call audio.

[0081] In summary, currently when a user takes off a wearable device, the wearable device still plays audio, and the user cannot hear the audio played by the wearable device. There is an unreasonable playback path, resulting in a poor user experience.

[0082] The embodiment of the present application provides an audio playback control method. When a terminal device and a wearable device have established a Bluetooth connection, no matter in an audio scene, a video scene or an audio and video call scene, when the user wears the wearable device, the wearable device can play the audio. When the user takes off the wearable device, the wearable device does not play the audio, but the terminal device can play the audio. In this way, no matter whether the user is wearing the wearable device or taking it off, the user can hear the audio, which can improve the user experience.

[0083] In order to better understand the audio playback control method provided in the embodiment of the present application, the basic principle of establishing a Bluetooth connection between a terminal device and a wearable device is first introduced:

[0084] When the terminal device and the wearable device are connected via Bluetooth for the first time, the terminal device can be paired with the wearable device, and the Bluetooth connection can be performed after the pairing is completed. When the terminal device and the wearable device are subsequently connected via Bluetooth, the Bluetooth connection can be performed directly without pairing.

[0085] The terminal device and the wearable device can establish a Bluetooth link, and the Bluetooth link is used to transmit the data exchanged between the terminal device and the wearable device. The Bluetooth link can include: an asynchronous connectionless link (ACL) link and a synchronous connection oriented (SCO) link. The SCO link is used to transmit data with high time requirements. For example, the SCO link can be used to transmit call audio data. The ACL link can be used to transmit media audio data.

[0086] Among them, when the terminal device and the wearable device are connected via Bluetooth, an ACL link can be established. Based on the ACL link, the terminal device and the wearable device can also establish a Bluetooth audio transmission model protocol (Advanced Audio Distribution Profile, A2DP) connection. Among them, A2DP can be understood as a high-quality audio protocol running on the ACL link. A2DP defines the protocol and process for transmitting high-quality audio such as mono or stereo on the ACL link. The A2DP connection is used to transmit media audio data.

[0087] In some embodiments, when the terminal device and the wearable device are also configured with other protocols such as the Bluetooth serial port profile (SPP), based on the ACL link, the terminal device and the wearable device can also establish other connections such as SPP. The other connections are used to transmit other types of data, which is not described in detail in the embodiments of the present application.

[0088] When the terminal device and the other end are making an audio or video call, a SCO link can be established between the terminal device and the wearable device, and the SCO link is used to transmit the audio data of the call. When the audio or video call between the terminal device and the other end ends, the terminal device and the wearable device can disconnect the SCO link. In some embodiments, the establishment of a SCO link between the terminal device and the wearable device can also be understood as the establishment of a SCO connection between the terminal device and the wearable device.

[0089] In some embodiments, when the terminal device receives a call from the other end, the terminal device can establish a SCO connection with the wearable device. In some embodiments, when the terminal device receives a call from the other end and when the call is connected, the terminal device can establish a SCO connection with the wearable device.

[0090] It should be understood that in the time slot where the SCO link is not reserved, the terminal device and the wearable device can transmit media audio data based on the ACL link. Wherein, the SCO link is not reserved can be understood as: the terminal device and the wearable device disconnect the SCO connection.

[0091] Figure 1 Schematic diagram of a scenario in which the audio control method provided in the embodiment of the present application is applicable. Figure 1 , the scenario includes a terminal device 11 and a wearable device 12.

[0092] The terminal device 11 may include: a processor 111 , a memory 112 , a Bluetooth communication module 113 , an audio module 114 , and a display screen 115 .

[0093] The processor 111 may include one or more processing units, for example, the processor 111 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (displayprocess unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Different processing units may be independent devices or integrated into one or more processors. In some embodiments, the terminal device 11 may also include one or more processors 111.

[0094] In the embodiment of the present application, the processor 111 is used to execute the actions performed by the terminal device 11 in the following embodiment, so as to interact with the wearable device 12 to implement the audio control method provided in the embodiment of the present application.

[0095] The memory 112 is used to store one or more computer programs, which include instructions. The processor 111 can execute the above instructions stored in the memory 112, so that the terminal device 11 performs various functional applications and data processing. In some embodiments, the processor 111 can execute the instructions stored in the memory 112 and / or the instructions stored in the memory provided in the processor 111, so that the terminal device 11 performs various functional applications and data processing.

[0096] The Bluetooth communication module 113 is used to establish a Bluetooth connection between the terminal device 11 and other electronic devices. In the embodiment of the present application, the Bluetooth communication module 113 can be used to establish a Bluetooth connection between the terminal device 11 and the wearable device 12. In some embodiments, the Bluetooth communication module 113 can be a Bluetooth chip.

[0097] The audio module 114 is used to enable the terminal device 11 to play audio. Exemplarily, the audio module 114 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 114 can also be used to encode and decode audio signals. In some embodiments, the audio module 114 can include but is not limited to a speaker, a receiver, and a microphone.

[0098] The display screen 115 is used to display the interface of the terminal device 11, and the interface may include images, videos, etc. In some embodiments, the terminal device 11 may include 1 or N display screens 115, where N is a positive integer greater than 1.

[0099] The wearable device 12 may include: a processor 121, a Bluetooth communication module 122, and an audio module 123. The processor 121, the Bluetooth communication module 122, and the audio module 123 may refer to the description of the processor 111, the Bluetooth communication module 113, and the audio module 114, respectively.

[0100] In the embodiment of the present application, the processor 121 is used to execute the actions performed by the wearable device 12 in the following embodiment, so as to interact with the terminal device 11 to implement the audio control method provided in the embodiment of the present application.

[0101] The Bluetooth communication module 122 can be used to establish a Bluetooth connection between the wearable device 12 and the terminal device 11. In some embodiments, the Bluetooth communication module 122 can be a Bluetooth chip.

[0102] The audio module 123 is used to enable the wearable device 12 to play audio.

[0103] The audio playback control method provided by the embodiment of the present application is described below in conjunction with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0104] Figure 2 This is a flow chart of an embodiment of the audio playback control method provided in the present application. It should be understood that Figure 2 The audio playback control method provided in the embodiment of the present application is introduced from the perspective of terminal devices and wearable devices.

[0105] Reference Figure 2 , the audio playback control method provided in the embodiment of the present application may include:

[0106] S201, when the wearable device switches from a wearing state to a non-wearing state, the wearable device disconnects a first connection with the terminal device, where the first connection is used to transmit audio data.

[0107] The state of a wearable device may include a wearing state and a non-wearing state. The wearing state may be understood as the user wearing the wearable device, and the non-wearing state may be understood as the user taking off the wearable device or the wearable device falling due to misoperation. For example, taking the wearable device as an in-ear headset as an example, the user wears the headset on the ear, and the headset is in the wearing state; the user takes off the headset or the headset falls off, and the headset is in the non-wearing state.

[0108] In some embodiments, when the wearable device is an earphone, and when the earphone includes at least one, such as when the earphone includes a left earphone and a right earphone, in response to the left earphone and the right earphone being switched from a wearing state to a non-wearing state, the wearable device can disconnect the first connection with the terminal device. The wearable device that disconnects the first connection with the terminal device can be the left earphone, the right earphone, or the master earphone of the left earphone and the right earphone. Correspondingly, the wearable device that establishes the first connection with the terminal device in the following S203 can be the left earphone, the right earphone, or the master earphone of the left earphone and the right earphone.

[0109] Among them, the left earphone can detect the status of the left earphone, and the right earphone can detect the status of the right earphone. Taking "the wearable device that disconnects the first connection with the terminal device is the left earphone" as an example, when the right earphone detects that the right earphone switches from a wearing state to a non-wearing state, the right earphone can synchronize the status of the right earphone to the left earphone, and when the left earphone detects that the left earphone switches from a wearing state to a non-wearing state, the left earphone determines that both earphones are switched from a wearing state to a non-wearing state, and the left earphone can disconnect the first connection with the terminal device.

[0110] In some embodiments, when the main earphone detects that both earphones are switched from the wearing state to the non-wearing state, the main earphone can disconnect the first connection with the terminal device. Exemplarily, when the user wears the left earphone and the right earphone, the right earphone can be the main earphone, and the user takes off the right earphone first. Because the user is still wearing the left earphone, the right earphone does not disconnect the first connection with the terminal device at this time, and the left earphone can be switched to the main earphone. When the user takes off the left earphone, both earphones are taken off at this time, and the left earphone as the main earphone can disconnect the first connection with the terminal device. It should be understood that when the user takes off one earphone, regardless of whether the switching operation of the main earphone is performed, the user can use the other earphone worn to listen to audio, and the first connection with the terminal device can be disconnected at this time. When both earphones are taken off, the earphone (the main earphone or the earphone taken off later) can disconnect the first connection with the terminal device.

[0111] The wearable device can detect the state of the wearable device to determine whether the wearable device is in a worn state or a non-worn state. In some embodiments, a sensor can be provided in the wearable device, and the sensor can be used to detect the state of the wearable device. Exemplarily, the sensor can include but is not limited to an infrared sensor, an ultrasonic sensor, and a capacitive sensor, etc. The principle of the sensor detecting the state of the wearable device is not described in detail in the embodiments of the present application.

[0112] In the embodiment of the present application, the terminal device has established a Bluetooth connection with the wearable device, and the wearable device has established an ACL link with the terminal device. In addition, the terminal device can establish a first connection with the wearable device, and the first connection is used to transmit audio data, which can be media audio data or call audio data.

[0113] In some embodiments, the first connection may be an A2DP connection, and the first connection is used to transmit media audio data. Specifically, the first connection is used to send media audio data from the terminal device to the wearable device. After the terminal device and the wearable device establish an ACL link, an A2DP connection may be established. Exemplarily, when the terminal device plays audio or video, the terminal device may send media audio data to the wearable device based on the A2DP connection.

[0114] In some embodiments, the first connection may be a SCO connection, and the first connection is used to transmit call audio data. Specifically, the first connection is used to send call audio data from the terminal device to the wearable device. When the terminal device and the other end conduct an audio or video call, the terminal device may establish a SCO connection with the wearable device. Exemplarily, when the terminal device and the other end conduct an audio or video call, based on the SCO connection, the terminal device may send call audio data to the wearable device.

[0115] When the user takes off the wearable device or the wearable device falls, the wearable device can detect that the state of the wearable device has switched from the wearing state to the non-wearing state. Since the wearable device is still in the first connection with the terminal device, the terminal device can continue to send audio data to the wearable device, so that the wearable device will still play audio. However, because the user is not wearing the wearable device, the user cannot hear the audio played by the wearable device. Therefore, in order to improve the user experience, in some embodiments, when the wearable device switches from the wearing state to the non-wearing state, the wearable device can disconnect the first connection with the terminal device, so that the terminal device will suspend sending audio data to the wearable device, and the wearable device will not play audio.

[0116] In some embodiments, when the wearable device switches from the wearing state to the non-wearing state, the wearable device may send a first request to the terminal device, the first request being used to request disconnection of the first connection. In response to the first request, the terminal device may disconnect the first connection with the wearable device.

[0117] In some embodiments, the user may drop the wearable device due to misoperation, but the user does not intend to take off the wearable device. In this scenario, the user will put on the wearable device again in a short time. In this scenario, in order to avoid the wearable device and the terminal device being disconnected from the first connection by mistake, and it takes time to re-establish the first connection, in the embodiment of the present application, the wearable device can respond to the wearable device switching from the wearing state to the non-wearing state, and the wearable device does not switch to the wearing state within a preset time, and the wearable device can disconnect the first connection with the terminal device.

[0118] S202: The terminal device stops sending audio data to the wearable device.

[0119] Because the first connection between the wearable device and the terminal device is disconnected, the terminal device cannot send audio data to the wearable device through the first connection, and the terminal device can suspend sending audio data to the wearable device. Because the wearable device does not receive audio data from the terminal device, the wearable device does not play audio.

[0120] In some embodiments, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play audio. Exemplarily, in an audio scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play audio. Exemplarily, in a video scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play the audio in the video. Exemplarily, in an audio and video call scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play the call audio.

[0121] In the above example, when the terminal device is playing audio, the terminal device uses the handset to play the audio, or plays the audio externally. Exemplarily, when the terminal device is playing media audio, the terminal device can play the audio externally, and when the terminal device is playing call audio, in order to protect user privacy, the handset can be used to play the call audio.

[0122] In some embodiments, after the first connection between the wearable device and the terminal device is disconnected, the terminal device also pauses playing audio, and the user can trigger the terminal device to play audio. Exemplarily, in audio scenes and video scenes, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can pause playing audio or audio in a video, and the user can click a play button (such as an audio play button or a video play button) on the terminal device to trigger the terminal device to play audio or audio in a video. In this example, the user can trigger the terminal device to play audio, avoiding the problem of the terminal device directly playing audio and interfering with other users.

[0123] In some embodiments, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can pre-configure the way to play audio. The way the terminal device plays audio includes but is not limited to: playing audio using an earpiece, playing audio externally, or triggering the user to play audio.

[0124] In some embodiments, when the terminal device plays audio externally, the terminal device lowers the volume to play the audio. Exemplarily, when the wearable device plays audio at a first volume, the terminal device can play audio at a second volume when the terminal device plays audio externally, and the second volume is lower than the first volume.

[0125] In some embodiments, when the terminal device plays audio, the terminal device can output a prompt message, which is used to prompt the user that the terminal device is playing audio. In some embodiments, the prompt message can also include the volume of the audio.

[0126] In some embodiments, the terminal device may play audio in different ways in different scenarios. For example, in an audio scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device also pauses playing audio, and the user can trigger the terminal device to play audio. For example, in a video scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play the audio in the video. For example, in an audio and video call scenario, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can use the handset to play the call audio.

[0127] In some embodiments, the terminal devices corresponding to different applications may play audio in different ways. Exemplarily, for the first audio application, after the first connection between the wearable device and the terminal device is disconnected, the terminal device also pauses playing audio, and the user can trigger the terminal device to play audio. For the second audio application, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play audio externally. Exemplarily, for the first video application, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can play the audio in the video externally. For the second video application, after the first connection between the wearable device and the terminal device is disconnected, the terminal device can use the handset to play audio.

[0128] In summary, when the wearable device switches from a wearing state to a non-wearing state, the wearable device can disconnect the first connection with the terminal device, the wearable device may not play audio, and the terminal device can play audio, so that when the user takes off the headphones, the user can still hear the audio from the terminal device.

[0129] S203: When the wearable device is switched to the wearing state, the wearable device establishes a first connection with the terminal device.

[0130] When the user puts on the wearable device again, the state of the wearable device can be switched from the non-wearing state to the wearing state. The wearable device responds to the wearable device switching to the wearing state, and it can be determined that the user is using the wearable device again. In order to ensure that the user can hear audio through the wearable device, the wearable device establishes a first connection with the terminal device.

[0131] In some embodiments, when the wearable device is switched to the wearing state, the wearable device may send a second request to the terminal device, where the second request is used to request to establish the first connection. In response to the second request, the terminal device may establish the first connection with the wearable device.

[0132] In some embodiments, when the wearable device switches to the wearing state, the wearable device may send a wearing instruction to the terminal device, the wearing instruction is used to instruct the wearable device to switch to the wearing state, that is, the user has worn the wearable device. Correspondingly, in response to the wearing instruction, the terminal device may send a second request to the wearable device, the second request is used to request to establish a first connection. In response to the second request, the wearable device may establish a first connection with the terminal device.

[0133] S204: The terminal device sends first audio data to the wearable device.

[0134] Correspondingly, the wearable device receives the first audio data from the terminal device.

[0135] When the first connection is an A2DP connection, the first audio data may be media audio data. When the first connection is a SCO connection, the first audio data may be call audio data.

[0136] S205: The wearable device plays audio according to the first audio data.

[0137] In an embodiment of the present application, when the wearable device is switched to a non-wearing state, the wearable device can disconnect the first connection with the terminal device, which can avoid the problem that the terminal device continues to send audio data to the wearable device, the wearable device does not play audio, and the terminal device can play audio. Because the terminal device plays audio when the user is not wearing the wearable device, the problem that the user cannot hear the audio due to the wearable device playing audio can be avoided. When the wearable device is switched to a wearing state, the wearable device can establish a first connection with the terminal device, the terminal device can send audio data to the wearable device, and the wearable device can play audio. Because the user is wearing the wearable device at this time, the wearable device plays audio, which can ensure that the user hears the audio. In an embodiment of the present application, when the user wears the wearable device, the wearable device can play audio, and when the user does not wear the wearable device, the wearable device does not play audio, and the terminal device can play audio. As the state of the wearable device changes, the smooth switching of the audio playback path can be achieved, and the user can also be guaranteed to hear the audio, improving the user experience. Among them, the audio playback path can include playing audio by the wearable device or playing audio by the terminal device.

[0138] Figure 2 The illustrated embodiment describes the interaction process between the terminal device and the wearable device after the wearable device switches from the wearing state to the non-wearing state. In some embodiments, when the wearable device is in the wearing state, the terminal device can also send audio data to the wearable device, and the wearable device can play audio. Figure 3 , before S201, it may also include:

[0139] S201A, when the wearable device is in a wearing state, the terminal device sends second audio data to the wearable device.

[0140] Correspondingly, the wearable device receives the second audio data from the terminal device.

[0141] In some embodiments, when the first connection is an A2DP connection, after the terminal device and the wearable device establish an ACL link, an A2DP connection can be established. When the wearable device is in a wearing state, the user can trigger the mobile phone to send audio data to the headset, and the relevant description in scenario 1 can be referred to. In this example, the audio data sent by the terminal device to the wearable device can be referred to as the second audio data.

[0142] In some embodiments, when the first connection is a SCO connection, when the terminal device receives an incoming call from the other end or answers the incoming call, the terminal device establishes a SCO connection with the wearable device and sends the second audio data to the wearable device.

[0143] S202A: The wearable device plays audio according to the second audio data.

[0144] S201A-S202A may refer to the description of S204-S205.

[0145] In an embodiment of the present application, when the wearable device is in a worn state, the terminal device can send the second audio data to the wearable device, and the wearable device can play the audio. Because the user is wearing the wearable device at this time, the audio is played by the wearable device, which can ensure that the user can hear the audio.

[0146] The following describes the audio playback control method provided by the embodiment of the present application in combination with a specific application scenario:

[0147] Scenario 1: Audio Scenario

[0148] Reference Figure 4A , the audio playback control method provided in the embodiment of the present application may include:

[0149] S401, the wearable device and the terminal device establish an ACL link and an A2DP connection.

[0150] S402, in response to the user wearing the wearable device, the wearable device sends a second instruction to the terminal device, where the second instruction is used to instruct to start playing audio.

[0151] In some embodiments, when the terminal device is not playing audio, the user wears the wearable device, and the wearable device can send a second instruction to the terminal device. The second instruction is used to instruct the terminal device to play audio. In some embodiments, in response to the second instruction, the terminal device can send audio data to the wearable device. Exemplarily, the user can operate a button on the wearable device to trigger the wearable device to send the second instruction to the terminal device, or in response to the user wearing the wearable device, the wearable device can send the second instruction to the terminal device.

[0152] In some embodiments, when the terminal device plays audio, the user wears the wearable device, and in response to the user wearing the wearable device, the wearable device sends a second instruction to the terminal device.

[0153] In some embodiments, when the terminal device plays audio, the user wears a wearable device. Since the terminal device and the wearable device can directly establish a first connection, the terminal device responds to establishing a first connection with the wearable device. The terminal device can directly execute S403, and the wearable device may not perform the operation of "sending a second instruction to the terminal device".

[0154] S403, the terminal device sends a third start instruction to the wearable device, where the third start instruction is used to instruct the terminal device to start sending audio data.

[0155] The third start instruction may be, for example, a start instruction. Specifically, the third start instruction may be an audio video distribution transport protocol (AVDTP) start instruction. The third start instruction is used to instruct the terminal device to start sending audio data.

[0156] S404: The terminal device sends second audio data to the wearable device.

[0157] S405: The wearable device plays audio according to the second audio data.

[0158] S404-S405 may refer to the description in S401A-S402A.

[0159] In some embodiments, after the terminal device sends the third startup instruction to the wearable device, in response to the third startup instruction, the wearable device may send a third startup response to the terminal device, the third startup response indicating that the wearable device has received the third startup instruction. In this example, the terminal device responds to the third startup response from the wearable device, and the terminal device may send the second audio data to the wearable device.

[0160] S406, in response to the wearable device switching from the wearing state to the non-wearing state, the wearable device sends a first instruction to the terminal device, where the first instruction is used to instruct to pause playing audio.

[0161] In response to the wearable device switching from a wearing state to a non-wearing state, for example, the user takes off the wearable device or the wearable device falls, the wearable device sends a first instruction to the terminal device.

[0162] S407, the terminal device sends a pause instruction to the wearable device.

[0163] In response to the first instruction, the terminal device may send a pause instruction to the wearable device. The pause instruction is used to indicate that the terminal device pauses sending audio data to the wearable device.

[0164] In some embodiments, the suspend instruction may be a suspend instruction. Specifically, the suspend instruction may be an AVDTPsuspend instruction.

[0165] It should be understood that because the terminal device pauses sending audio data to the wearable device, the wearable device cannot receive the audio data, so the wearable device will not play the audio.

[0166] S408, in response to the user triggering an operation of playing audio, the terminal device sends a first start instruction to the wearable device, and the first start instruction instructs the terminal device to start sending audio data.

[0167] In some embodiments, in an audio scenario, the audio application is configured such that: the terminal device sends a pause instruction to the wearable device, and the audio application pauses playing the audio. In this example, the terminal device pauses sending audio data to the wearable device, and the terminal device also pauses playing the audio.

[0168] In the scenario where the terminal device pauses playing audio, the user can operate on the terminal device to trigger the continuation of audio playback. For example, the user can operate the audio playback button on the interface of the terminal device to trigger the continuation of audio playback. Because the terminal device and the wearable device still establish a first connection, in response to the user's operation of triggering the playback of audio, the terminal device can send a first start instruction to the wearable device.

[0169] The first start instruction instructs the terminal device to start sending audio data. In some embodiments, the first start instruction may be, for example, a start instruction. Specifically, the first start instruction may be an AVDTP start instruction.

[0170] S409: When the second preset time period elapses after receiving the first start instruction, the wearable device disconnects the A2DP connection with the terminal device.

[0171] In an embodiment of the present application, the user may drop the wearable device due to an incorrect operation, and the user will put on the wearable device again within a short period of time. In order to avoid accidentally triggering the wearable device and the terminal device to disconnect the first connection, the wearable device can disconnect the first connection with the terminal device when the second preset time is within the time of receiving the first start instruction.

[0172] S410: In response to the wearable device switching to the wearing state, the wearable device establishes an A2DP connection with the terminal device.

[0173] S411, the terminal device sends first audio data to the wearable device.

[0174] It should be understood that when the terminal device is playing audio, after the wearable device establishes an A2DP connection with the terminal device, the terminal device may send a second start instruction to the wearable device before sending the first audio data to the wearable device. In some embodiments, when the terminal device pauses playing a video, after the wearable device establishes an A2DP connection with the terminal device, the terminal device responds to the user triggering an operation to play audio, and the terminal device sends a second start instruction to the wearable device, and the second start instruction can refer to the description in S510.

[0175] S412: The wearable device plays audio according to the first audio data.

[0176] S410 - S412 may refer to the description in S203 - S205 .

[0177] Figure 4B A schematic diagram of a scenario of the audio playback control method provided in the embodiment of the present application. Taking the terminal device as a mobile phone and the wearable device as a headset as an example, when the mobile phone and the headset establish an ACL link and an A2DP connection, refer to Figure 4B In a, the user wears the headset, and the headset can send a play instruction (second instruction) to the mobile phone. In response to the play instruction, the mobile phone can send an AVDTP start instruction to the headset, and the mobile phone can send second audio data to the headset, and the headset can play audio according to the second audio data. Figure 4B In b, the user takes off the headset, and the headset can send a pause command (first command) to the mobile phone. In response to the pause command, the mobile phone can send an AVDTP suspend command to the headset, and the mobile phone suspends sending audio data to the headset, and the headset does not play audio, and the mobile phone does not play audio. Figure 4B In c, taking the example of the user operating the audio play button 41 on the audio play interface of the mobile phone, the mobile phone can send an AVDTP start command to the headset. After the second preset time from receiving the AVDTP start command, if the headset is still not in the wearing state, the headset can disconnect the A2DP connection with the mobile phone. After the A2DP connection between the headset and the mobile phone is disconnected, the mobile phone cannot send audio data to the headset, and the headset does not play audio. Figure 4B In d, the user puts on the headset again, and because the A2DP connection between the headset and the mobile phone is disconnected at this time, the headset can re-establish the A2DP connection with the mobile phone. After the headset and the mobile phone re-establish the A2DP connection, the mobile phone can continue to send the first audio data to the headset, and the headset can play audio according to the first audio data.

[0178] In an embodiment of the present application, in an audio scenario, because the audio application is configured to respond to a first instruction and a second instruction, when the terminal device receives the first instruction, the terminal device can suspend sending audio data to the wearable device, and when the terminal device receives the second instruction, the terminal device can send audio data to the wearable device. At present, when the user takes off the wearable device, the terminal device can receive the first instruction from the wearable device, the terminal device can suspend sending audio data to the wearable device, and the wearable device does not play audio. However, if the user triggers the continued playback of audio on the terminal device, because the terminal device and the wearable device still establish an A2DP connection, the terminal device can continue to send audio data to the wearable device, but because the user takes off the wearable device at this time, the audio is played by the wearable device, which will cause the user to be unable to hear the audio. Therefore, in an embodiment of the present application, after the user takes off the wearable device, if the wearable device receives an AVDTP start instruction from the terminal device, the wearable device can disconnect the A2DP connection with the terminal device to prevent the terminal device from sending audio to the wearable device, and the wearable device does not play audio. After the wearable device disconnects the A2DP connection with the terminal device, the terminal device can play audio or the user can trigger the terminal device to play audio. In this way, after the user takes off the wearable device, the user can hear the audio played by the terminal device. In addition, when the user puts on the wearable device again, the wearable device can re-establish the A2DP connection with the terminal device, so that the wearable device can continue to receive audio data from the terminal device, the wearable device can continue to play audio, and the user can also hear the audio played by the wearable device.

[0179] Scenario 2: Video Scenario (for example, the video application is configured not to respond to the first command and the second command)

[0180] Reference Figure 5A , the audio playback control method provided in the embodiment of the present application may include:

[0181] S501, the wearable device and the terminal device establish an ACL link and an A2DP connection.

[0182] S502, in response to the user wearing the wearable device, the wearable device sends a second instruction to the terminal device, where the second instruction is used to instruct to start playing audio.

[0183] S501-S502 may refer to the description in S401-S402.

[0184] S503, in response to the user triggering an operation to play the video, the terminal device sends a third start instruction to the wearable device, where the third start instruction is used to instruct the terminal device to start sending audio data.

[0185] Because the video application is configured not to respond to the second instruction, the terminal device receives the second instruction from the wearable device and may not send audio data to the wearable device. In an embodiment of the present application, a user can trigger the terminal device to send audio data to the wearable device. Exemplarily, the user can operate a video play button on the interface of the terminal device to trigger the terminal device to send audio data to the wearable device. Among them, in response to the user's operation of triggering the video to play, the terminal device can send a third startup instruction to the wearable device.

[0186] S504: The terminal device sends second audio data to the wearable device.

[0187] S505: The wearable device plays audio according to the second audio data.

[0188] S506: In response to the wearable device switching from the wearing state to the non-wearing state, the wearable device sends a first instruction to the terminal device.

[0189] S504-S506 may refer to the description in S403-S405.

[0190] S507: When the first preset time period elapses before the first instruction is sent, the wearable device disconnects the A2DP connection with the terminal device.

[0191] Because the video application is configured not to respond to the first instruction, the terminal device may not suspend sending audio data to the wearable device when receiving the first instruction from the wearable device. However, because the wearable device is in a non-wearing state at this time, even if the wearable device plays audio, the user cannot hear the audio played by the wearable device. In the embodiment of the present application, in order to prevent the wearable device from playing audio, the wearable device can disconnect the A2DP connection with the terminal device, so that the terminal device cannot send audio data to the wearable device, and the wearable device will not play audio.

[0192] In some embodiments, in order to avoid false triggering of the wearable device and the terminal device to disconnect the A2DP connection, the wearable device can disconnect the A2DP connection with the terminal device when the first preset time is within a period of sending the first instruction.

[0193] In some embodiments, the first preset duration may be equal to or different from the second preset duration.

[0194] S508, the terminal device plays the audio externally.

[0195] In an embodiment of the present application, in a video scene, the terminal device can be pre-configured to play audio in the following manner: after the first connection between the wearable device and the terminal device is disconnected, the terminal device plays the audio in the video. Based on this configuration, after the first connection between the wearable device and the terminal device is disconnected, the terminal device plays the audio in the video.

[0196] In some embodiments, in a video scenario, the terminal device may also be configured to play audio in other ways, and reference may be made to the relevant description in S202.

[0197] S509: In response to the wearable device switching to the wearing state, the wearable device establishes an A2DP connection with the terminal device.

[0198] S509 may refer to the description in S410.

[0199] S510, the terminal device sends a second startup instruction to the wearable device.

[0200] The second start instruction is used to instruct the terminal device to start sending audio data. The second start instruction can refer to the description of the third start instruction.

[0201] It should be understood that when the terminal device is playing a video, after the wearable device establishes an A2DP connection with the terminal device, the terminal device can send a second startup instruction to the wearable device. In some embodiments, when the terminal device pauses playing a video, after the wearable device establishes an A2DP connection with the terminal device, the terminal device responds to the user triggering an operation to play the video, and the terminal device sends a second startup instruction to the wearable device, which can refer to the description in S503.

[0202] S511, the terminal device sends first audio data to the wearable device.

[0203] S512: The wearable device plays audio according to the first audio data.

[0204] S511 - S512 may refer to the description in S411 - S412 .

[0205] Figure 5B Another scenario diagram of the audio playback control method provided in the embodiment of the present application. Taking the terminal device as a mobile phone and the wearable device as a headset as an example, when the mobile phone and the headset establish an ACL link and an A2DP connection, refer to Figure 5B In a, the user wears headphones, and the headphones can send a play command to the phone. Because the video application is configured not to respond to the play command, the phone does not send audio data to the headphones. Figure 5B In b, the user operates the video play button 51 on the video play interface of the mobile phone, the mobile phone can send an AVDTP start instruction to the headset, and the mobile phone sends the second audio data to the headset, and the headset can play audio according to the second audio data. Figure 5BIn c, when the user takes off the earphones, the earphones can send a pause command to the mobile phone. Because the video application is configured not to respond to the pause command, the mobile phone can continue to send audio data to the earphones. In the embodiment of the present application, when the user takes off the earphones, in order to prevent the wearable device from playing audio, the earphones can disconnect the A2DP connection with the mobile phone after a first preset time from sending a pause command to the mobile phone, so that the mobile phone will not send audio data to the earphones and the earphones will not play audio. Figure 5B In d, the user puts on the headset again, and because the A2DP connection between the headset and the mobile phone is disconnected at this time, the headset can re-establish the A2DP connection with the mobile phone. After the headset and the mobile phone re-establish the A2DP connection, the mobile phone can continue to send the first audio data to the headset, and the headset can play audio according to the first audio data.

[0206] In an embodiment of the present application, in a video scene, when the video application is configured not to respond to the first instruction and the second instruction, when the terminal device receives the first instruction, the terminal device will not suspend sending audio data to the wearable device, and when the terminal device receives the second instruction, the terminal device will not send audio data to the wearable device. At present, when the user takes off the wearable device, the terminal device can receive the first instruction from the wearable device, and the terminal device will not suspend sending audio data to the wearable device. In order to prevent the terminal device from continuing to send audio data to the wearable device, the wearable device disconnects the A2DP connection with the terminal device at the first preset time after sending the first instruction to the terminal device, so that the terminal device will not send audio data to the wearable device, and the wearable device does not play audio. After the wearable device disconnects the A2DP connection with the terminal device, the terminal device can play audio. In this way, after the user takes off the wearable device, the user can hear the audio played by the terminal device. In addition, when the user puts on the wearable device again, the wearable device can re-establish the A2DP connection with the terminal device, so that the wearable device can continue to receive audio data from the terminal device, the wearable device can continue to play audio, and the user can also hear the audio played by the wearable device.

[0207] It should be understood that in the video scenario, when the video application is configured to respond to the first instruction and the second instruction, the audio playback control method when the user wears and takes off the wearable device can refer to the description in scenario one.

[0208] Scenario 3: Audio and video call scenario

[0209] Reference Fig. 6A , the audio playback control method provided in the embodiment of the present application may include:

[0210] S601: The wearable device and the terminal device establish an ACL link and an A2DP connection.

[0211] S602: In response to an incoming call from the other end, the terminal device establishes a SCO connection with the wearable device.

[0212] In some embodiments, when the terminal device establishes a SCO connection with the wearable device, if the wearable device is in a worn state, S603-S604 may be executed, and if the wearable device is in a non-worn state, the wearable device may disconnect the SCO connection with the terminal device. It should be understood that Fig. 6A The description is made by taking the wearable device in the wearing state as an example.

[0213] S603: The terminal device sends second audio data to the wearable device.

[0214] S604: The wearable device plays audio according to the second audio data.

[0215] S603-S604 may refer to the description in S404-S405.

[0216] S605: In response to the wearable device switching from the wearing state to the non-wearing state, the wearable device disconnects the SCO connection with the terminal device.

[0217] In the embodiment of the present application, when the user takes off the wearable device or the wearable device falls, the wearable device switches from the wearing state to the non-wearing state. In response to the wearable device switching from the wearing state to the non-wearing state, in order to prevent the wearable device from continuing to play audio, the wearable device can disconnect the SCO connection with the terminal device to prevent the terminal device from continuing to send audio data to the wearable device. Because the wearable device does not receive the audio data, the wearable device does not play the audio.

[0218] S606: The terminal device plays audio.

[0219] When the wearable device disconnects the SCO connection with the terminal device, the terminal device can play the audio for the convenience of the user to continue to hear the audio. In some embodiments, in order to protect the privacy of the user, the terminal device can adopt the earpiece to play the audio.

[0220] S607, in response to the wearable device switching to the wearing state, the wearable device sends a connection request to the terminal device, where the connection request is used to request to establish a SCO connection.

[0221] When the user puts on the wearable device again, the wearable device switches from the non-wearing state to the wearing state. In response to the wearable device switching to the wearing state, in order to facilitate the wearable device to continue playing audio, the wearable device can send a connection request to the terminal device to request to establish a SCO connection with the terminal device.

[0222] In some embodiments, the connection request may be an AT command. Specifically, the connection request may include AT+bluetooth codec connection BCC (bluetooth codec connection).

[0223] S608: The terminal device establishes a SCO connection with the wearable device.

[0224] In response to the connection request, the terminal device may establish a SCO connection with the wearable device, and the terminal device may send audio data to the wearable device based on the SCO connection.

[0225] S609: The terminal device sends first audio data to the wearable device.

[0226] S610: The wearable device plays audio according to the first audio data.

[0227] S609-S610 may refer to the description in S411-S412.

[0228] Figure 6B Another scenario diagram of the audio playback control method provided in the embodiment of the present application. Taking the terminal device as mobile phone 1 and the wearable device as earphone as an example, when the mobile phone 1 and the earphone establish an ACL link and an A2DP connection, refer to Figure 6B In a, when the user is wearing headphones, when mobile phone 1 receives a call from another electronic device (such as mobile phone 2), mobile phone 1 can establish a SCO connection with the headphones. The mobile phone can send second audio data to the headphones, and the headphones can play audio according to the second audio data. Figure 6B In b, when the user takes off the headset before the audio or video call ends, in order to prevent the headset from playing audio, the headset can disconnect the SCO connection with mobile phone 1, and mobile phone 1 does not send audio data to the headset. Mobile phone 1 can use the handset to play audio. Figure 6B In c, the user puts on the headset again. Since the headset has disconnected the SCO connection with mobile phone 1, the headset can send a connection request to mobile phone 1. In response to the connection request, mobile phone 1 can establish a SCO connection with the headset. After the headset reestablishes the SCO connection with mobile phone 1, mobile phone 1 can continue to send the first audio data to the headset, and the headset can play audio according to the first audio data. It should be understood that Figure 6B The mobile phone in the figure is mobile phone 1, and mobile phone 2 is not shown.

[0229] In an embodiment of the present application, in an audio and video call scenario, because the audio data in the audio and video call is transmitted based on a SCO connection, the terminal device can establish a SCO connection with the wearable device in response to an incoming call from the other end. When the wearable device is in a worn state, the wearable device can play audio based on the second audio data from the terminal device. When the wearable device switches to a non-wearing state, in order to prevent the wearable device from playing audio, the wearable device can disconnect the SCO connection with the terminal device. The terminal device cannot transmit audio data based on the SCO connection, so the wearable device will not play audio. In order to ensure that the user can hear the audio, the terminal device can use a handset to play audio, so that the user can still hear the audio after taking off the wearable device. When the user puts on the wearable device again, the wearable device can request the terminal device to re-establish the SCO connection. The terminal device can continue to send the first audio data to the wearable device based on the re-established SCO connection, and the wearable device can play audio, so that when the user puts on the wearable device again, the audio played by the wearable device can be heard.

[0230] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0231] In one embodiment, the present application also provides an electronic device, which may be the terminal device or wearable device described in the above embodiment. Figure 7 , the electronic device may include: a processor 701 (such as a CPU), and a memory 702. The memory 702 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. The memory 702 may store various instructions for completing various processing functions and implementing the method steps of the present application.

[0232] Optionally, the electronic device involved in the present application may further include: a power supply 703, a communication bus 704 and a communication port 705. The above-mentioned communication port 705 is used to realize the connection and communication between the electronic device and other peripherals. In the embodiment of the present application, the memory 702 is used to store computer executable program code, and the program code includes instructions; when the processor 701 executes the instruction, the instruction causes the processor 701 of the electronic device to perform the action in the above-mentioned method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0233] It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes, such as a controller. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0234] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0235] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0236] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0237] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims

1. An audio playback control method, characterized in that: Applied to a wearable device, the method comprises: When the wearable device switches from a wearing state to a non-wearing state, disconnecting a first connection with a terminal device, wherein the first connection is used to transmit audio data; When the wearable device is switched to a wearing state, establishing the first connection with the terminal device; Receiving first audio data from the terminal device; The audio is played according to the first audio data.

2. The method according to claim 1, characterized in that The first connection is a Bluetooth audio transmission model protocol A2DP connection, or the first connection is a synchronization oriented connection SCO.

3. The method according to claim 2, characterized in that When the first connection is an A2DP connection, before disconnecting the first connection with the terminal device, the method further includes: A first instruction is sent to the terminal device, where the first instruction is used to instruct to pause playing audio.

4. The method according to claim 3, characterized in that The disconnecting the first connection with the terminal device comprises: When a first preset time period elapses before sending the first instruction, the first connection with the terminal device is disconnected.

5. The method according to claim 3, characterized in that: After sending the first instruction to the terminal device, the method further includes: receiving a pause instruction from the terminal device; receiving a first start instruction from the terminal device, where the first start instruction is sent by the terminal device when a user triggers the terminal device to play audio, and the first start instruction instructs the terminal device to start sending audio data; When a second preset time period has passed since the first start instruction was received, the first connection with the terminal device is disconnected.

6. The method according to any one of claims 3 to 5, characterized in that: After establishing the first connection with the terminal device, the method further includes: A second start instruction is received from the terminal device, where the second start instruction is used to instruct the terminal device to start sending audio data.

7. The method according to claim 2, characterized in that: When the first connection is SCO, before establishing the first connection with the terminal device, the method further includes: A connection request is sent to the terminal device, wherein the connection request is used to request to establish a SCO.

8. The method according to any one of claims 2 to 7, characterized in that: When the wearable device is switched from the wearing state to the non-wearing state, before disconnecting the first connection with the terminal device, the method further includes: When the wearable device is in a wearing state, receiving second audio data from the terminal device; The audio is played according to the second audio data.

9. The method according to claim 8, characterized in that When the first connection is an A2DP connection, before the receiving the second audio data from the terminal device, the method further includes: Establishing the first connection with the terminal device; Sending a second instruction to the terminal device, where the second instruction is used to instruct to start playing audio; A third start instruction is received from the terminal device, where the third start instruction is used to instruct the terminal device to start sending audio data.

10. The method according to claim 8, characterized in that When the first connection is SCO, before receiving the second audio data from the terminal device, the method further includes: Establishing the first connection with the terminal device.

11. An audio playback control method, characterized in that: Applied to a terminal device, the method comprises: When the wearable device is switched from a wearing state to a non-wearing state, disconnecting a first connection with the wearable device, where the first connection is used to transmit audio data; Pause sending audio data to the wearable device; When the wearable device is switched to a wearing state, establishing the first connection with the wearable device; Sending first audio data to the wearable device.

12. The method according to claim 11, characterized in that The first connection is a Bluetooth audio transmission model protocol A2DP connection, or the first connection is a synchronization oriented connection SCO.

13. The method according to claim 12, characterized in that When the first connection is an A2DP connection, before disconnecting the first connection with the wearable device, the method further includes: A first instruction is received from the wearable device, where the first instruction is used to instruct to pause playing audio.

14. The method according to claim 13, characterized in that After disconnecting the first connection with the wearable device, the method further includes: Play audio.

15. The method according to claim 13, characterized in that After receiving the first instruction from the wearable device, the method further includes: Sending a pause instruction to the wearable device; In response to a user triggering an operation of playing audio, a first start instruction is sent to the wearable device, wherein the first start instruction instructs the terminal device to start sending audio data.

16. The method according to claim 12, characterized in that When the first connection is SCO, before establishing the first connection with the wearable device, the method further includes: A connection request is received from the wearable device, where the connection request is used to request to establish a SCO.

17. An audio playback control method, characterized in that: include: When the wearable device switches from a wearing state to a non-wearing state, the wearable device disconnects a first connection with the terminal device, where the first connection is used to transmit audio data; The terminal device suspends sending audio data to the wearable device; When the wearable device is switched to a wearing state, the wearable device establishes the first connection with the terminal device; The terminal device sends first audio data to the wearable device; The wearable device plays audio according to the first audio data.

18. The method according to claim 17, characterized in that The first connection is a Bluetooth audio transmission model protocol A2DP connection, or the first connection is a synchronization oriented connection SCO.

19. The method according to claim 18, characterized in that When the first connection is an A2DP connection, before the wearable device disconnects the first connection with the terminal device, the method further includes: The wearable device sends a first instruction to the terminal device, where the first instruction is used to instruct to pause playing audio.

20. The method according to claim 19, characterized in that The disconnecting the first connection with the wearable device comprises: When a first preset time period elapses from sending the first instruction, the wearable device disconnects the first connection with the terminal device.

21. The method according to claim 18, characterized in that After the wearable device sends the first instruction to the terminal device, the method further includes: The terminal device sends a pause instruction to the wearable device; In response to a user triggering an operation of playing audio, the terminal device sends a first start instruction to the wearable device, where the first start instruction instructs the terminal device to start sending audio data; When the second preset time period from receiving the first start instruction reaches a time period corresponding to the first start instruction, the wearable device disconnects the first connection with the terminal device.

22. The method according to claim 18, characterized in that When the first connection is SCO, before the wearable device disconnects the first connection with the terminal device, the method further includes: The wearable device sends a connection request to the terminal device, where the connection request is used to request to establish a SCO.

23. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 16.

24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Method for processing connection request, bluetooth earphone, wearable equipment and system

    CN108650668A

  • Application control method and associated device

    CN108769387A

  • Bluetooth earphone connection control method, system and device and storage medium

    CN114143397A

  • Electronic apparatus and output destination switchover method of content data

    JP2004120652A

  • Method of auto-pausing audio / video content while using headphones

    US20160353194A1