Electronic equipment, multi-A2DP Bluetooth equipment volume adjusting method and medium

By using preset flags in electronic devices to determine the absolute volume control function of A2DP devices, the problem that Android smart TV software cannot adjust the volume of A2DP devices of multiple brands is solved, and unified volume adjustment of multiple devices and improved audio transmission quality is achieved.

CN120215868APending Publication Date: 2025-06-27HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311798522.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Android smart TV software cannot adjust the volume of multiple A2DP Bluetooth devices of different brands at the same time, especially when the device does not support the AVRCP absolute volume control protocol, it lacks an effective volume adjustment mechanism.

Method used

By introducing preset flags into the electronic device, it is determined whether at least one A2DP device supports the Bluetooth absolute volume control function. When supported, an audio stream with the maximum volume gain is output; when not supported, an audio stream with the current volume gain is output and sent to an A2DP device for volume adjustment.

Benefits of technology

The unified adjustment of the volume of multiple A2DP devices is achieved to ensure consistent volume control between devices and improve the quality and stability of audio transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215868A_ABST
    Figure CN120215868A_ABST
Patent Text Reader

Abstract

The invention relates to electronic equipment, a method for adjusting the volume of multiple A2DP Bluetooth equipment and a medium. The electronic equipment comprises a controller which is configured to obtain a current volume value of the electronic equipment in response to a volume adjustment operation of a user; the Bluetooth module is configured to judge whether a preset flag bit is true or not; the controller is further configured to output a first audio stream when the preset flag bit is true; when the preset flag bit is false, outputting a second audio stream; the Bluetooth module is further configured to send the current volume value and the first audio stream to the at least one A2DP device when the preset flag bit is true, so that the at least one A2DP device performs volume adjustment based on the current volume value and the maximum volume gain of the electronic device; and when the preset flag bit is false, sending the second audio stream to the at least one A2DP device, so that the at least one A2DP device performs volume adjustment based on the current volume gain corresponding to the current volume value of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of volume adjustment, and in particular, to an electronic device, a method for adjusting the volume of multiple A2DP Bluetooth devices, and a medium. Background Art

[0002] The most common scenario in life is to use electronic devices such as mobile phones, TVs, and computers to connect to Bluetooth headsets or speakers to play music, and adjust the volume of the Bluetooth headsets or speakers by adjusting the multimedia volume on these electronic devices. For example, in one scenario, User 1 is in the living room and User 2 is in the bedroom. A Bluetooth speaker is connected in the living room and the bedroom respectively, and both User 1 and User 2 can hear the audio played by the TV.

[0003] Currently, Android smart TV software can only support one classic A2DP (Advanced Audio Distribution Profile) device or a pair of TWS (True Wireless Stereo) headsets to output sound and adjust the volume. For connecting two speaker devices of different brands and outputting sound simultaneously, both devices may not support AVRCP (Audio / Video Remote Control Profile) absolute volume. For such a scenario of adjusting the volume of two or more Bluetooth devices, Android does not provide a relevant mechanism to adjust the volume of Bluetooth devices. Summary of the Invention

[0004] To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an electronic device, a method for adjusting the volume of multiple A2DP Bluetooth devices, and a medium.

[0005] In a first aspect, the present disclosure provides an electronic device, which is connected to at least one Advanced Audio Distribution Protocol (A2DP) device, including:

[0006] A controller, configured to:

[0007] In response to a user's volume adjustment operation, obtain the current volume value of the electronic device;

[0008] A Bluetooth module, configured to:

[0009] Determine whether a preset flag bit is true; the preset flag bit is used to indicate whether the at least one A2DP device supports the Bluetooth absolute volume control function;

[0010] The controller is further configured to:

[0011] When the preset flag bit is true, output a first audio stream; the audio gain of the first audio stream is the maximum volume gain of the electronic device;

[0012] When the preset flag bit is false, output a second audio stream; the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device;

[0013] The Bluetooth module is further configured to:

[0014] When the preset flag bit is true, send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device;

[0015] When the preset flag bit is false, send the second audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device.

[0016] As an optional implementation manner of an embodiment of the present invention, the Bluetooth module is specifically configured to:

[0017] Judging whether the preset flag bit is true includes:

[0018] When each A2DP device in the at least one A2DP device supports the Bluetooth absolute volume control function, determine that the preset flag bit is true;

[0019] When there is one A2DP device in the at least one A2DP device that does not support the Bluetooth absolute volume control function, determine that the preset flag bit is false.

[0020] As an optional implementation manner of an embodiment of the present invention, the electronic device further includes:

[0021] A display, configured to:

[0022] Before judging whether the preset flag bit is true, further include:

[0023] In response to a Bluetooth function enabling operation, display the A2DP devices to be connected of the electronic device.

[0024] As an optional implementation manner of an embodiment of the present invention, the Bluetooth module is further configured to:

[0025] After displaying the A2DP devices to be connected of the electronic device in response to the Bluetooth function enabling operation, further include:

[0026] In response to a Bluetooth pairing operation, pair with the to-be-connected A2DP device to obtain function information of the to-be-connected A2DP device; the function information is used to indicate whether the to-be-connected A2DP device supports the Bluetooth absolute volume control function.

[0027] As an optional implementation manner of an embodiment of the present invention, the controller is further configured to:

[0028] After the step of pairing with the to-be-connected A2DP device in response to a Bluetooth pairing operation to obtain function information of the to-be-connected A2DP device, the method further includes:

[0029] When the to-be-connected A2DP device supports the Bluetooth absolute volume control function, store the function information of the to-be-connected A2DP device into a preset function list.

[0030] As an optional implementation manner of an embodiment of the present invention, the Bluetooth module is specifically configured to:

[0031] The step of, when the preset flag bit is true, sending the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device, includes:

[0032] When the preset flag bit is true, send the current volume value of the electronic device to the at least one A2DP device through an audio-video remote control protocol;

[0033] Send the first audio stream to the at least one A2DP device, so that the at least one A2DP device outputs the volume based on the superimposed value of the maximum volume gain and the current volume value.

[0034] As an optional implementation manner of an embodiment of the present invention, the controller is further configured to:

[0035] Before sending the second audio stream to the at least one A2DP device, the method further includes:

[0036] When the preset flag bit is false, in response to a user's volume adjustment operation, adjust the original volume gain corresponding to the original volume value of the electronic device to obtain the current volume gain corresponding to the current volume value of the electronic device.

[0037] As an optional implementation manner of an embodiment of the present invention, the preset function list includes: the unique identification information of the to-be-connected A2DP device and the function information of the to-be-connected A2DP device.

[0038] Second aspect, a method for adjusting the volume of multiple A2DP Bluetooth devices is provided, which is applied to an electronic device. The electronic device is connected to at least one Advanced Audio Distribution Profile (A2DP) device. The method includes:

[0039] In response to a user's volume adjustment operation, obtain the current volume value of the electronic device;

[0040] Determine whether a preset flag bit is true; the preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function;

[0041] When the preset flag bit is true, output a first audio stream, and send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device; the audio gain of the first audio stream is the maximum volume gain of the electronic device;

[0042] When the preset flag bit is false, output a second audio stream, and send the second audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device; the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device.

[0043] As an optional implementation manner of an embodiment of the present invention, determining whether the preset flag bit is true includes:

[0044] When each A2DP device in the at least one A2DP device supports the Bluetooth absolute volume control function, determine that the preset flag bit is true;

[0045] When there is one A2DP device in the at least one A2DP device that does not support the Bluetooth absolute volume control function, determine that the preset flag bit is false.

[0046] As an optional implementation manner of an embodiment of the present invention, before determining whether the preset flag bit is true, it further includes:

[0047] In response to a Bluetooth function enabling operation, display the A2DP devices to be connected to the electronic device.

[0048] As an optional implementation manner of an embodiment of the present invention, after displaying the A2DP devices to be connected to the electronic device in response to the Bluetooth function enabling operation, it further includes:

[0049] In response to a Bluetooth pairing operation, pair with the to-be-connected A2DP device to obtain function information of the to-be-connected A2DP device; the function information is used to indicate whether the to-be-connected A2DP device supports the Bluetooth absolute volume control function.

[0050] As an optional implementation manner of an embodiment of the present invention, after the step of in response to a Bluetooth pairing operation, pair with the to-be-connected A2DP device to obtain function information of the to-be-connected A2DP device, the method further includes:

[0051] When the to-be-connected A2DP device supports the Bluetooth absolute volume control function, store the function information of the to-be-connected A2DP device into a preset function list.

[0052] As an optional implementation manner of an embodiment of the present invention,

[0053] The step of when the preset flag bit is true, send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device, includes:

[0054] When the preset flag bit is true, send the current volume value of the electronic device to the at least one A2DP device through an audio-video remote control protocol;

[0055] Send the first audio stream to the at least one A2DP device, so that the at least one A2DP device outputs the volume based on the superimposed value of the maximum volume gain and the current volume value..

[0056] As an optional implementation manner of an embodiment of the present invention,

[0057] Before the step of sending the second audio stream to the at least one A2DP device, the method further includes:

[0058] When the preset flag bit is false, in response to a user's volume adjustment operation, adjust the original volume gain corresponding to the original volume value of the electronic device to obtain the current volume gain corresponding to the current volume value of the electronic device.

[0059] As an optional implementation manner of an embodiment of the present invention, the preset function list includes: the unique identification information of the to-be-connected A2DP device and the function information of the to-be-connected A2DP device.

[0060] In a third aspect, a computer-readable storage medium is provided, including: a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the multi-A2DP Bluetooth device volume adjustment method as shown in the second aspect is implemented.

[0061] In a fourth aspect, a computer program product is provided, including: when the computer program product runs on a computer, enabling the computer to implement the multi-A2DP Bluetooth device volume adjustment method as shown in the second aspect.

[0062] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art: in response to a user's volume adjustment operation, obtain the current volume value of the electronic device, and determine whether a preset flag bit is true, where the preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function. When the preset flag bit is true, output a first audio stream, where the audio gain of the first audio stream is the maximum volume gain of the electronic device, and send the current volume value and the first audio stream to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device. When the preset flag bit is false, output a second audio stream, where the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device, and send the second audio stream to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device. For multiple A2DP devices, when they support the Bluetooth absolute volume control function, their volume is adjusted through the maximum volume gain output of the electronic device and the current volume value; when they do not support the Bluetooth absolute volume control function, their volume is adjusted through the output of the current volume gain corresponding to the current volume value of the electronic device. That is, the volume of multiple A2DP devices can be adjusted simultaneously through the value of the preset flag bit. Description of the Drawings

[0063] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.

[0064] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0065] Figure 1 It is a schematic diagram of the application scenario of a method for adjusting the volume of multiple A2DP Bluetooth devices of an electronic device provided by the embodiments of the present disclosure;

[0066] Figure 2 It is a block diagram of the hardware configuration of an electronic device according to one or more embodiments of the present disclosure;

[0067] Figure 3AOne of the software configuration diagrams of an electronic device according to one or more embodiments of the present disclosure;

[0068] Figure 3B Another software configuration diagram of an electronic device according to one or more embodiments of the present disclosure;

[0069] Figure 3C Schematic diagram of the icon control page display of an application program of an electronic device according to one or more embodiments of the present disclosure;

[0070] Figure 4 One of the flow diagrams of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure;

[0071] Figure 5 Another flow diagram of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure;

[0072] Figure 6 Another flow diagram of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure;

[0073] Figure 7 Another flow diagram of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure;

[0074] Figure 8 Another flow diagram of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure; Detailed implementation manners

[0075] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0076] Many specific details are set forth in the following description in order to provide a thorough understanding of the present disclosure, but the present disclosure may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.

[0077] The terms "first", "second", "third", etc. in the specification, claims, and the above drawings of the present application are used to distinguish similar or like objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances.

[0078] The terms "comprising", "having" and any variations thereof are intended to cover inclusion without exclusivity. For example, a product or device that comprises a series of components need not be limited to all the components clearly listed, but may include other components not clearly listed or inherent to such products or devices.

[0079] Absolute volume refers to the way in which devices negotiate volume control through a protocol in Bluetooth audio transmission. Traditionally, volume control is carried out by the audio source device (such as a mobile phone, computer), and the audio receiving device (such as a Bluetooth headset, A2DP device, etc.) only adjusts the volume according to the volume instructions sent by the audio source device. However, there are some problems with this method. For example, the volume ranges of different devices are different, and unified volume control between devices cannot be achieved. To solve these problems, the Bluetooth Special Interest Group has proposed the absolute volume protocol. Through this protocol, the audio source device and the audio receiving device can communicate with each other, negotiate and synchronize volume control, so as to achieve unified volume control between devices. The absolute volume protocol can ensure that the volume control methods of different devices are the same, enabling users to seamlessly switch between different devices, while improving the quality and stability of audio transmission.

[0080] Audio gain refers to increasing the intensity or volume of sound by increasing the level or volume of an audio signal. In audio processing, gain is usually used to adjust the volume of an audio signal to better meet the needs of the listener. Gain is usually expressed in decibels (dB), where every 3 dB increase represents a doubling of the volume. Gain can be achieved by adjusting the volume control of an audio device or through a digital signal processing (DSP) algorithm.

[0081] A2DP (Advanced Audio Distribution Profile) is the audio transmission protocol of Bluetooth. Core overview of the A2DP protocol: Based on the Bluetooth core protocol, two Bluetooth devices are connected to the same piconet through the upper-layer A2DP protocol to achieve the function of Bluetooth audio stream transmission.

[0082] AVRCP (Audio / Video Remote Control Profile) is similar to other Bluetooth protocols. It also divides the two ends of a device into two roles, namely: CT (controller), which is a device that starts a transaction by sending a command frame to a target device, such as headphones, speakers, in-vehicle Bluetooth devices, etc.; TG (target), which is a device that receives the command frame sent by the controller and generates a corresponding response frame, such as a mobile phone. Usually, CT and TG appear in pairs in the same piconet. However, there can be multiple CT devices in the same piconet. For example, the same mobile phone (TG) can be connected to multiple headphones (CT) simultaneously, or the same smart TV (TG) can be connected to multiple Bluetooth speakers (CT) simultaneously.

[0083] The most common scenario in life is to use electronic devices such as mobile phones, TVs, and computers to connect to Bluetooth headphones or speakers to play music, and to adjust the volume of the Bluetooth headphones or speakers by adjusting the multimedia volume on these electronic devices. For example, in one scenario, User 1 is in the living room and User 2 is in the bedroom. They each connect a Bluetooth speaker in the living room and the bedroom respectively, and both User 1 and User 2 can hear the audio played by the TV.

[0084] Currently, the Android smart TV software can only support one classic A2DP (Advanced Audio Distribution Profile) device or a pair of TWS (True Wireless Stereo) headphones to produce sound and adjust the volume. For connecting two speaker devices of different brands and having them produce sound simultaneously, both devices may not support the absolute volume of AVRCP (Audio / Video Remote Control Profile). For this scenario, Android does not provide a relevant mechanism to adjust the volume of Bluetooth devices.

[0085] In view of this problem, the present disclosure provides a method for adjusting the volume of multiple A2DP Bluetooth devices. In response to a user's volume adjustment operation, the current volume value of the electronic device is obtained, and it is determined whether a preset flag bit is true. The preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function. When the preset flag bit is true, a first audio stream is output, where the audio gain of the first audio stream is the maximum volume gain of the electronic device. The current volume value and the first audio stream are sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device. When the preset flag bit is false, a second audio stream is output, where the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device. The second audio stream is sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device. For multiple A2DP devices, when they support the Bluetooth absolute volume control function, their volume is adjusted through the maximum volume gain output of the electronic device and the current volume value; when they do not support the Bluetooth absolute volume control function, their volume is adjusted through the current volume gain output corresponding to the current volume value of the electronic device. That is, the volume of multiple A2DP devices can be adjusted simultaneously through the value of the preset flag bit.

[0086] Exemplarily, as Figure 1 shown, Figure 1 FIG. is a schematic diagram of an application scenario of a method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure. In Figure 1 , the electronic device 200 is respectively connected to multiple A2DP Bluetooth devices (referring to Figure 1 shown, Figure 1 two A2DP Bluetooth devices 101 and 102 are taken as examples in FIG., in the actual application scenario, the number of A2DP Bluetooth devices can be 3 or more, which is determined according to the actual application scenario and is not specifically limited here), where the electronic device can be but is not limited to a smart phone, a smart TV, a tablet computer, a laptop computer, etc., and the A2DP Bluetooth device can be but is not limited to a Bluetooth headset, a Bluetooth speaker, etc. After the electronic device 200 is connected to multiple A2DP Bluetooth devices (such as A2DP Bluetooth device 101 and A2DP Bluetooth device 102) through Bluetooth, the volume of A2DP Bluetooth device 101 and A2DP Bluetooth device 102 can be controlled simultaneously through the electronic device.

[0087] The method for adjusting the volume of multiple A2DP Bluetooth devices provided by the embodiments of the present disclosure can be implemented based on the electronic device, or a functional module or a functional entity in the electronic device.

[0088] Exemplarily, Figure 2Hardware configuration block diagram of an electronic device according to one or more embodiments of the present disclosure. As Figure 2 shown, the electronic device includes at least one of a tuner-demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. Among them, the controller 250 includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a RAM (Random Access Memory), a ROM (Read-Only Memory), a first interface to an nth interface for input / output, a communication bus, etc. The display 260 can be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and can also be a projection device and a projection screen. The tuner-demodulator 210 receives broadcast television signals through wired or wireless reception, and demodulates audio and video signals from multiple wireless or wired broadcast television signals, such as EPG audio and video data signals. The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example, the communicator can include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module and other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The electronic device can establish the sending and receiving of control signals and data signals with a server or a local control device through the communicator 220. The detector 230 is used to collect signals from the external environment or interact with the outside. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes or user interaction gestures, or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds. The external device interface 240 can include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or data high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It can also be a composite input / output interface formed by the above multiple interfaces. The controller 250 and the tuner-demodulator 210 can be located in different split devices, that is, the tuner-demodulator 210 can also be in an external device of the main device where the controller 250 is located, such as an external set-top box, etc.

[0089] In some embodiments, the controller 250 controls the operation of the electronic device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the electronic device. If the user inputs a user command through the graphical user interface (GUI) displayed on the display 260, the user input interface receives the user input command through the graphical user interface. Alternatively, if the user inputs a user command by inputting a specific sound or gesture, the user input interface receives the user input command by identifying the sound or gesture through a sensor.

[0090] In some embodiments, the display 260 includes a display screen component for presenting a picture and a driving component for driving image display, which is used to receive the image signal output from the controller and display video content, image content, menu manipulation interfaces, and user manipulation UI interfaces. For example, the display can be at least one of a liquid crystal display, an OLED (Organic Light-Emitting Diode) display, a touch display, and a projection display, and can also be a projection device and a projection screen. If the user inputs a user command through the graphical user interface (Graphic User Interface, GUI) displayed on the display 260, the user input interface receives the user input command through the graphical user interface. Alternatively, if the user inputs a user command by inputting a specific sound or gesture, the user input interface receives the user input command by identifying the sound or gesture through a sensor. The "user interface" is a media interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the conversion between the internal form of information and the form acceptable to the user. The common manifestation form of the user interface is the graphical user interface, which refers to the user interface related to computer operation displayed in a graphical manner. For example, it can be an icon, a window, a control, etc. displayed on the display screen of the electronic device, where the control can include visible interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, and navigation bars. The user interface can be used to receive control signals from the electronic device 100 (such as an infrared remote control, etc.).

[0091] Figure 3A Schematic diagram of the software configuration of an electronic device according to one or more embodiments of the present disclosure, as Figure 3A shown, the system is divided into four layers, from top to bottom are the application layer (abbreviation: "application layer"), the application framework layer (abbreviation: "framework layer"), the Android runtime and the system library layer (abbreviation: "system runtime library layer"), and the kernel layer. Exemplarily, referring to Figure 3BAs shown, the application layer includes: a TV core service, which is mainly responsible for switching Bluetooth devices. That is, after an electronic device (taking a TV as an example in the embodiments of the present disclosure) connects to a Bluetooth device (taking a Bluetooth speaker as an example in the embodiments of the present disclosure), it acts as the initiator for adjusting the volume of the Bluetooth speaker. The framework layer includes a Bluetooth application, an audio framework, and a TV middleware. Among them, the audio framework is responsible for volume adjustment and specifically for sending audio data. The Bluetooth application is used to control the connection status of Bluetooth devices, provide avrcp volume adjustment, and obtain whether the device supports the avrcp interface. The system runtime library layer includes a Bluetooth dynamic library. The kernel layer includes a Bluetooth driver, which is used to start the Bluetooth function of the electronic device. In the embodiments of the present disclosure, after the Bluetooth device is connected to the electronic device through the protocol stack, it notifies the Bluetooth application, and the Bluetooth application notifies the connection event and whether the Bluetooth device supports avrcp to the audio framework; after receiving the connection event, the audio framework saves the avrcp capabilities of the Bluetooth device in a map respectively, defines the flag of the system avrcp. For two connected Bluetooth audio devices, only when both support avrcp, the system avrcp flag is set to true, otherwise it is set to false. If only one A2DP Bluetooth device is currently connected, the flag is assigned accordingly according to whether the current A2DP Bluetooth device supports avrcp.

[0092] Figure 3C Schematic diagram of the icon control interface display of the application program included in the electronic device according to one or more embodiments of the present disclosure, as Figure 3B As shown, the application program layer includes at least one application program that can display corresponding icon controls on the display, such as: a live TV application program icon control, a video-on-demand VOD application program icon control, a media center application program icon control, an application center icon control, a game application icon control, etc. The live TV application program can provide live TV through different signal sources. The video-on-demand VOD application program can provide videos from different storage sources. Different from the live TV application program, the video-on-demand provides the display of videos from certain storage sources. The media center application program can provide application programs for playing various multimedia contents. The application center can provide storage for various application programs.

[0093] The method for adjusting the volume of multiple A2DP Bluetooth devices provided by the embodiments of the present disclosure can be implemented based on the above-mentioned electronic device.

[0094] To describe this solution in more detail, the following will be described in an exemplary manner in combination with Figure 4 for illustration. It can be understood that Figure 4The steps involved can include more steps or fewer steps when actually implemented, and the order between these steps can also be different, subject to the multi-A2DP Bluetooth device volume adjustment method applied to the electronic device side provided in the embodiments of the present application.

[0095] Figure 4 It is a schematic flowchart of a multi-A2DP Bluetooth device volume adjustment method provided by an embodiment of the present disclosure. As Figure 4 shown, the multi-A2DP Bluetooth device volume adjustment method specifically includes the following steps:

[0096] S41, in response to a user's volume adjustment operation, obtain the current volume value of the electronic device.

[0097] Among them, the volume adjustment operation can be, but is not limited to, increasing or decreasing the volume of the electronic device through a control device or other mobile terminals.

[0098] Exemplarily, referring to Figure 3B shown, taking the electronic device as a smart TV as an example, obtain the current Bluetooth volume from the TV middleware through the TV service of the smart TV, and in response to a user's volume adjustment operation, obtain the current volume value of the electronic device. Assume that the original volume is 10. If the user wants to increase the volume to 20, then the current volume value of the electronic device obtained is 20; if the original volume is 50 and the user wants to decrease the volume to 30, then the current volume value of the electronic device obtained is 30.

[0099] S42, determine whether a preset flag bit is true.

[0100] Among them, the preset flag bit is used to indicate whether the at least one A2DP device supports the Bluetooth absolute volume control function. The Bluetooth Special Interest Group has proposed an absolute volume protocol. Through this protocol, the audio source device and the audio receiving device can communicate with each other, negotiate and synchronize volume control, so as to achieve unified volume control between devices. The absolute volume protocol can ensure that the volume control methods of different devices are the same, enabling users to seamlessly switch between different devices, and at the same time improving the quality and stability of audio transmission.

[0101] Specifically, the Bluetooth module obtains whether each A2DP device supports the Bluetooth absolute volume control function. Since the preset flag bit is used to indicate whether the at least one A2DP device supports the Bluetooth absolute volume control function, by determining whether the preset flag bit is true, it is possible to know whether multiple A2DP devices support the Bluetooth absolute volume control function.

[0102] S43. When the preset flag bit is true, output the first audio stream, and send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device.

[0103] Wherein, the audio gain of the first audio stream is the maximum volume gain of the electronic device.

[0104] Specifically, when the preset flag bit is true, the controller outputs the first audio stream. At this time, the audio gain of the first audio stream is the maximum volume gain of the electronic device. The Bluetooth module sends the current volume value obtained by the controller and the first audio stream output by the controller to each A2DP device, so that after each A2DP device receives the current volume value and the first audio stream of the electronic device, it adjusts the volume based on the current volume value and the maximum volume gain.

[0105] Exemplarily, when the preset flag bit is true, assume that the maximum volume of the electronic device is 100 and the current volume of the electronic device is 20. Output based on the maximum volume gain of the electronic device, that is, output based on the gain corresponding to the maximum volume of 100 of the electronic device. Send the current volume value 20 and the first audio stream with the audio gain being the maximum volume gain of the electronic device to each A2DP device through the Bluetooth module, so that each A2DP device adjusts the volume through its respective volume adjustment module. At this time, after each A2DP device receives the current volume value and the first audio stream of the electronic device, it superimposes the audio gain corresponding to the maximum volume of 100 with the current volume value 20 of the electronic device to obtain its respective volume. That is, when each A2DP device supports the Bluetooth absolute volume control function, the volume value it receives is larger.

[0106] S44. When the preset flag bit is false, output the second audio stream, and send the second audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device.

[0107] Wherein, the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device.

[0108] Specifically, when the preset flag bit is false, the controller outputs the second audio stream. At this time, the audio gain of the second audio stream is the current volume gain corresponding to the current volume of the electronic device. The Bluetooth module sends the second audio stream output by the controller to each A2DP device, so that after each A2DP device receives the first audio stream of the electronic device, it adjusts the volume based on the current volume gain corresponding to the current volume of the electronic device.

[0109] Exemplarily, when the preset flag bit is false, assuming that the maximum volume value of the electronic device is 100 and the current volume of the electronic device is 20, at this time, each A2DP device adjusts the volume based on the volume gain corresponding to the current volume value 20 of the electronic device, rather than based on the maximum volume gain corresponding to the maximum volume value of the electronic device. That is, the volumes received by each A2DP device are not superimposed, and the volume values received by them are smaller compared to the A2DP devices that support the Bluetooth absolute volume control function.

[0110] In the technical solution provided by the embodiments of the present disclosure, in response to a user's volume adjustment operation, the current volume value of the electronic device is obtained, and it is determined whether the preset flag bit is true. Here, the preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function. When the preset flag bit is true, a first audio stream is output, where the audio gain of the first audio stream is the maximum volume gain of the electronic device. The current volume value and the first audio stream are sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device. When the preset flag bit is false, a second audio stream is output, where the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device. The second audio stream is sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device. For multiple A2DP devices, when they support the Bluetooth absolute volume control function, their volumes are adjusted through the output of the maximum volume gain of the electronic device and the current volume value; when they do not support the Bluetooth absolute volume control function, their volumes are adjusted through the output of the current volume gain corresponding to the current volume value of the electronic device. That is, the volumes of multiple A2DP devices can be adjusted simultaneously through the value of the preset flag bit.

[0111] Figure 5 It is a schematic flowchart of another method for adjusting the volume of multiple A2DP Bluetooth devices provided by the embodiments of the present disclosure. Figure 5 is based on Figure 4 and is a further optimization. As Figure 5 shown, in some embodiments, before performing the step (determining whether the preset flag bit is true), the following step S52 is further performed:

[0112] S51, in response to a user's volume adjustment operation, obtain the current volume value of the electronic device.

[0113] S52, in response to a Bluetooth function enabling operation, display the A2DP devices to be connected to the electronic device.

[0114] Specifically, after the user turns on the TV, the available Bluetooth speakers within the current range are scanned through the settings page, and these searched Bluetooth speaker devices are displayed on the user interface.

[0115] S53, determine whether the preset flag bit is true.

[0116] S54, when the preset flag bit is true, based on the maximum volume gain output of the electronic device, send the current volume value to the at least one A2DP device through the audio-video remote control protocol to adjust the volume of the at least one A2DP device.

[0117] S55, when the preset flag bit is false, based on the current volume gain output corresponding to the current volume value of the electronic device, adjust the volume of the at least one A2DP device.

[0118] Among them, the specific execution manners of steps S51, S53 - S55 are the same as those of steps S41 - S44 above, and will not be elaborated here.

[0119] Figure 6 It is a flowchart showing another method for adjusting the volume of multiple A2DP Bluetooth devices provided by an embodiment of the present disclosure. Figure 6 It is Figure 5 a further optimization based on Figure 6 As shown in

[0120] S61, in response to the user's volume adjustment operation, obtain the current volume value of the electronic device.

[0121] S62, in response to the Bluetooth function turning-on operation, display the A2DP devices to be connected of the electronic device.

[0122] S63, in response to the Bluetooth pairing operation, pair with the A2DP device to be connected to obtain the function information of the A2DP device to be connected.

[0123] Among them, the function information is used to indicate whether the A2DP device to be connected supports the Bluetooth absolute volume control function.

[0124] Specifically, the electronic device responds to the user's Bluetooth pairing operation and pairs with the A2DP device to be connected. After successful pairing, the Bluetooth speaker actively notifies the TV whether it supports the Bluetooth absolute volume control function through the Bluetooth protocol.

[0125] Exemplarily, there may be multiple A2DP devices to be connected. Assuming there are two A2DP devices to be connected, they are paired and connected one by one.

[0126] S64. When the A2DP device to be connected supports the Bluetooth absolute volume control function, store the function information of the A2DP device to be connected in a preset function list.

[0127] In some embodiments, the preset function list includes: the unique identification information of the A2DP device to be connected and the function information of the A2DP device to be connected.

[0128] Among them, the unique identification information of the A2DP device to be connected may be, but is not limited to, physical information such as the MAC address that uniquely identifies the A2DP device to be connected.

[0129] Specifically, when the A2DP device to be connected supports the Bluetooth absolute volume control function, store the function information of the A2DP device to be connected in a preset function list.

[0130] Exemplarily, assuming there are 3 A2DP devices to be connected, namely Bluetooth device 1, Bluetooth device 2, and Bluetooth device 3, all of which support the Bluetooth absolute volume control function, then store the MAC addresses of the 3 Bluetooth devices and the support for the Bluetooth absolute volume control function in a preset function list.

[0131] Figure 7 It is a schematic flowchart of another method for adjusting the volume of multiple A2DP Bluetooth devices provided by the embodiments of the present disclosure. Figure 7 It is Figure 4 a further optimization based on Figure 7 As shown in

[0132] S71. When each A2DP device in the at least one A2DP device supports the Bluetooth absolute volume control function, determine that the preset flag bit is true.

[0133] Specifically, when each A2DP device in the at least one A2DP device supports the Bluetooth absolute volume control function, determine that the preset flag bit is true.

[0134] Exemplarily, assuming there are three A2DP devices, if all three A2DP devices support the Bluetooth absolute volume control function, determine that the preset flag bit is true. For example, define the system avrcp flag. For two connected Bluetooth audio devices, only when both support the Bluetooth absolute volume control function, the avrcp flag of the system is set to true, otherwise it is false.

[0135] S72. When there is an A2DP device among the at least one A2DP device that does not support the Bluetooth absolute volume control function, determine that the preset flag bit is false.

[0136] Specifically, when there is an A2DP device among the at least one A2DP device that does not support the Bluetooth absolute volume control function, determine that the preset flag bit is false.

[0137] Exemplarily, assume there are three A2DP devices. If one of the three A2DP devices supports the Bluetooth absolute volume control function and the other two A2DP devices do not support the Bluetooth absolute volume control function, then determine that the preset flag bit is false.

[0138] In addition, it should be noted that if the electronic device is only connected to one A2DP device, the value of the preset flag bit is assigned accordingly according to whether the current A2DP device supports the Bluetooth absolute volume control function.

[0139] Figure 8 is a schematic flowchart of another method for detecting application unresponsiveness provided by an embodiment of the present disclosure. This embodiment is further extended and optimized on the basis of Figure 4 the above.

[0140] S81. In response to a user's volume adjustment operation, obtain the current volume value of the electronic device.

[0141] Among them, the volume adjustment operation can be, but is not limited to, increasing or decreasing the volume of the electronic device through a control device or other mobile terminals.

[0142] Exemplarily, referring to Figure 3B as shown, taking the electronic device as a smart TV as an example, the TV service obtains the current Bluetooth volume from the TV middleware. In response to the user's volume adjustment operation, assuming the original volume is 10, if the user wants to increase the volume to 20, then obtain the current volume value of the electronic device as 20; if the original volume is 50 and the user wants to decrease the volume to 30, then obtain the current volume value of the electronic device as 30.

[0143] S82. Determine whether the preset flag bit is true.

[0144] Among them, the preset flag bit is used to indicate whether the at least one A2DP device supports the Bluetooth absolute volume control function.

[0145] S83. When the preset flag bit is true, send the current volume value of the electronic device to the at least one A2DP device through the audio-video remote control protocol; send the first audio stream to the at least one A2DP device, so that the at least one A2DP device outputs the volume based on the superposition value of the maximum volume gain and the current volume value.

[0146] Specifically, when the preset flag bit is true, the Bluetooth module sends the current volume value of the electronic device to at least one A2DP device through the audio-video remote control protocol, and at the same time sends the first audio stream to at least one A2DP device. Since the audio gain of the first audio stream is the maximum volume gain of the electronic device, at least one A2DP device can perform volume output based on the superimposed value of the maximum volume gain and the current volume value.

[0147] Exemplarily, when the preset flag bit is true, assume that the maximum volume of the electronic device is 100 and the current volume of the electronic device is 20. Each A2DP device performs superimposed output based on the maximum volume gain of the electronic device sent by the Bluetooth module and the current volume value of the electronic device. That is, the current volume value 20 is sent to each A2DP device through the audio-video remote control protocol, and at the same time the first audio stream is sent to at least one A2DP device. Since the audio gain of the first audio stream is the maximum volume gain of the electronic device, each A2DP device can perform volume output based on the superimposed value of the maximum volume gain and the current volume value. That is, when each A2DP device supports the Bluetooth absolute volume control function, the received volume value is larger.

[0148] S84. When the preset flag bit is false, in response to the user's volume adjustment operation, adjust the original volume gain corresponding to the original volume value of the electronic device to obtain the current volume gain corresponding to the current volume value of the electronic device; send the second audio stream to the at least one A2DP device, so that the at least one A2DP device performs volume adjustment based on the current volume gain corresponding to the current volume value of the electronic device.

[0149] Specifically, when the preset flag bit is false, the controller responds to the user's volume adjustment operation, adjusts the original volume corresponding to the original volume value of the electronic device to obtain the current volume gain corresponding to the current volume value of the electronic device, and then sends the second audio stream with the audio gain being the current volume gain corresponding to the current volume value of the electronic device to at least one A2DP device through the Bluetooth module, so that at least one A2DP device performs volume adjustment based on the current volume gain corresponding to the current volume value of the electronic device.

[0150] Exemplarily, when the preset flag bit is false, assume that the original volume of the electronic device is 60 and the current volume of the electronic device is 20. When adjusting the original volume value to the current volume value, the original volume gain corresponding to the original volume value also correspondingly becomes the current volume gain, and the volume of each A2DP device is adjusted based on the current volume gain of the electronic device. At this time, the volumes received by each A2DP device are not superimposed, and the volume values they receive are smaller compared to those A2DP devices that support the Bluetooth absolute volume control function.

[0151] In addition, it should be noted that for standard avrcp, in addition to the TV side notifying the device to change the volume, the Bluetooth device side can also adjust the volume by itself and then notify the TV of the index value of the volume. It should be noted that in the embodiments of the present disclosure, the volume feedback control of avrcp can be blocked by, but not limited to, annotating the code line, that is, when the TV side receives the avrcp volume from the Bluetooth device side, it does not notify the audio framework of the volume change, and the volume of the TV side is only controlled by the volume stored in the TV middleware. For example, the volume stored at the last shutdown is 15, and it is still 15 this time and will not be affected by the volume feedback control of the Bluetooth device.

[0152] In the technical solution provided by the embodiments of the present disclosure, in response to the user's volume adjustment operation, the current volume value of the electronic device is obtained, and it is determined whether the preset flag bit is true, where the preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function. When the preset flag bit is true, a first audio stream is output, where the audio gain of the first audio stream is the maximum volume gain of the electronic device, and the current volume value and the first audio stream are sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device. When the preset flag bit is false, a second audio stream is output, where the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device, and the second audio stream is sent to at least one A2DP device, so that at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device. For multiple A2DP devices, when they support the Bluetooth absolute volume control function, their volumes are adjusted through the output of the maximum volume gain of the electronic device and the current volume value; when they do not support the Bluetooth absolute volume control function, their volumes are adjusted through the output of the current volume gain corresponding to the current volume value of the electronic device. That is, the volumes of multiple A2DP devices can be adjusted simultaneously through the value of the preset flag bit.

[0153] Embodiments of the present disclosure also provide a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they implement each process executed by the method provided in any of the above embodiments and can achieve the same technical effects. To avoid repetition, they will not be elaborated here.

[0154] Among them, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or the like.

[0155] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above discussion in some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for better explaining the principles and practical applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific use considerations.

Claims

1. An electronic device, characterized in that, The electronic device is connected to at least one Advanced Audio Distribution Profile (A2DP) device, and includes: A controller, configured to: In response to a user's volume adjustment operation, obtain the current volume value of the electronic device; A Bluetooth module, configured to: Determine whether a preset flag bit is true; the preset flag bit is used to indicate whether the at least one A2DP device supports the Bluetooth absolute volume control function; The controller is further configured to: When the preset flag bit is true, output a first audio stream; the audio gain of the first audio stream is the maximum volume gain of the electronic device; When the preset flag bit is false, output a second audio stream; the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device; The Bluetooth module is further configured to: When the preset flag bit is true, send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device; When the preset flag bit is false, send the second audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device.

2. The electronic device according to claim 1, characterized in that The Bluetooth module is specifically configured to: The determination of whether the preset flag bit is true includes: When each A2DP device in the at least one A2DP device supports the Bluetooth absolute volume control function, determine that the preset flag bit is true; When there is one A2DP device in the at least one A2DP device that does not support the Bluetooth absolute volume control function, determine that the preset flag bit is false.

3. The electronic device according to claim 1, wherein The electronic device further includes: A display, configured to: Before determining whether the preset flag bit is true, further include: In response to a Bluetooth function enabling operation, display the A2DP devices to be connected to the electronic device.

4. The electronic device according to claim 3, wherein The Bluetooth module is further configured to: After displaying the A2DP devices to be connected to the electronic device in response to the Bluetooth function enabling operation, further include: In response to a Bluetooth pairing operation, pair with the A2DP device to be connected to obtain the function information of the A2DP device to be connected; the function information is used to indicate whether the A2DP device to be connected supports the Bluetooth absolute volume control function.

5. The electronic device according to claim 4, characterized in that The controller is further configured to: After pairing with the A2DP device to be connected to obtain the function information of the A2DP device to be connected in response to the Bluetooth pairing operation, further include: When the A2DP device to be connected supports the Bluetooth absolute volume control function, store the function information of the A2DP device to be connected in a preset function list.

6. The electronic device according to claim 1, characterized in that The Bluetooth module is specifically configured to: The step of, when the preset flag bit is true, sending the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device, includes: When the preset flag bit is true, send the current volume value of the electronic device to the at least one A2DP device through the audio-video remote control protocol; Send the first audio stream to the at least one A2DP device, so that the at least one A2DP device outputs volume based on the superposition value of the maximum volume gain and the current volume value.

7. The electronic device according to claim 1, wherein The controller is further configured to: Before sending the second audio stream to the at least one A2DP device, further include: When the preset flag bit is false, in response to a user's volume adjustment operation, adjust the original volume gain corresponding to the original volume value of the electronic device to obtain the current volume gain corresponding to the current volume value of the electronic device.

8. The electronic device according to claim 5, wherein The preset function list includes: the unique identification information of the to-be-connected A2DP device and the function information of the to-be-connected A2DP device.

9. A method for adjusting the volume of a multi-A2DP Bluetooth device, characterized in that, Applied to an electronic device, the electronic device is connected to at least one A2DP device, and the method includes: In response to a user's volume adjustment operation, obtain the current volume value of the electronic device; Judge whether the preset flag bit is true; the preset flag bit is used to indicate whether at least one A2DP device supports the Bluetooth absolute volume control function; When the preset flag bit is true, output a first audio stream, send the current volume value and the first audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume value and the maximum volume gain of the electronic device; the audio gain of the first audio stream is the maximum volume gain of the electronic device; When the preset flag bit is false, output a second audio stream, send the second audio stream to the at least one A2DP device, so that the at least one A2DP device adjusts the volume based on the current volume gain corresponding to the current volume value of the electronic device; the audio gain of the second audio stream is the current volume gain corresponding to the current volume value of the electronic device.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the multi-A2DP Bluetooth device volume adjustment method as claimed in claim 9.