Audio playing control method and device, equipment and storage medium
By using preset kernel modules to read the audio playback control event in the Bluedroid protocol stack on electronic devices with Linux operating system and Bluedroid protocol stack, the problem of poor interaction of Bluetooth audio playback control on the device is solved, and efficient audio control is achieved.
Patent Information
- Application Number
- CN202311247045.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
AI Technical Summary
On electronic devices with Linux operating system and Bluedroid protocol stack, there is a problem of poor interaction in the prior art.
Audio playback control events are obtained based on the Bluedroid protocol stack, and these events are read from the Bluedroid protocol stack using the preset kernel module of the Linux operating system, and the Bluetooth service is controlled to perform corresponding audio playback control operations.
It realizes Bluetooth audio playback control on electronic devices with Linux operating system and Bluedroid protocol stack, improving the audio control capability and compatibility of the device.
Smart Images

Figure CN119697223A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of audio playback technology, and in particular to an audio playback control method, device, equipment and storage medium. Background Art
[0002] With the development of terminal technology, the use of Bluetooth is increasing. Compared with the official Linux Bluetooth protocol stack bluez, the Bluetooth protocol stack Bluedroid supported by the Android system has better support for Android applications, more complete functions and higher popularity. Therefore, the Bluedroid protocol stack is transplanted to the Linux operating system in the relevant technology to replace the bluez protocol stack. On this basis, how to realize Bluetooth audio playback control on electronic devices with Linux operating system and Bluedroid protocol stack has become one of the technical problems that need to be solved urgently. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide an audio playback control method, device, equipment and storage medium to solve the defects in the related art.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an audio playback control method, which is applied to a first electronic device having a Linux operating system, wherein a Bluedroid protocol stack is provided in the Linux operating system, and the method comprises:
[0005] Acquire an audio playback control event based on the Bluedroid protocol stack;
[0006] Reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system;
[0007] Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
[0008] In some embodiments, the method further comprises:
[0009] In response to receiving a notification from an application in a second electronic device based on the Bluetooth service, writing the audio playback control event in the preset kernel module based on the Bluetooth service;
[0010] The preset kernel module based on the Linux operating system obtains the audio playback control event, including:
[0011] The audio playback control event is read and written based on the preset kernel module.
[0012] In some embodiments, the controlling the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event based on the preset kernel module includes:
[0013] The Weston input management module based on the Linux operating system reads the audio playback control event in the preset kernel module;
[0014] Based on the Weston input management module, the audio playback control event is transmitted to the player application of the Linux operating system, so that a notification message is sent to the Bluetooth service through the player application, and the notification message is used to control the Bluetooth service to perform the audio playback control operation.
[0015] In some embodiments, sending a notification message to the Bluetooth service through the player application includes:
[0016] The player interface layer of the player application is called so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
[0017] In some embodiments, the method further comprises:
[0018] In response to the Bluetooth service completing the audio playback control operation, the current event in the preset kernel module is read based on the input management module, so as to wake up the user interface based on the AMS process management service of the Linux operating system to display display information corresponding to the current event.
[0019] According to a second aspect of an embodiment of the present disclosure, there is provided an audio playback control device, which is applied to a first electronic device having a Linux operating system, wherein a Bluedroid protocol stack is provided in the Linux operating system, and the device comprises:
[0020] A control event acquisition module, used for acquiring audio playback control events based on the Bluedroid protocol stack;
[0021] A control event reading module, used for reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system;
[0022] The control operation execution module is used to control the Bluetooth service of the Linux operating system to execute the audio playback control operation corresponding to the audio playback control event based on the preset kernel module.
[0023] In some embodiments, the apparatus further comprises:
[0024] A control event writing module, configured to write the audio playback control event in the preset kernel module based on the Bluetooth service in response to receiving a notification from an application in the second electronic device based on the Bluetooth service;
[0025] The control event reading module is further used to read the written audio playback control event based on the preset kernel module.
[0026] In some embodiments, the control operation execution module includes:
[0027] An event reading unit, used for reading the audio playback control event in the preset kernel module based on the Weston input management module of the Linux operating system;
[0028] An operation execution unit is used to transmit the audio playback control event to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application, and the notification message is used to control the Bluetooth service to perform the audio playback control operation.
[0029] In some embodiments, the operation execution unit is further used to call the player interface layer of the player application, so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
[0030] In some embodiments, the apparatus further comprises:
[0031] The display information display module is used to respond to the Bluetooth service completing the audio playback control operation, read the current event in the preset kernel module based on the input management module, and wake up the user interface based on the AMS process management service of the Linux operating system to display the display information corresponding to the current event.
[0032] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, the electronic device having a Linux operating system, the Linux operating system being provided with a Bluedroid protocol stack, the electronic device comprising:
[0033] a processor and a memory for storing a computer program;
[0034] Wherein, the processor is configured to implement, when executing the computer program:
[0035] Acquire an audio playback control event based on the Bluedroid protocol stack;
[0036] Reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system;
[0037] Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
[0038] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the following is implemented:
[0039] Get audio playback control events based on the Bluedroid protocol stack;
[0040] The preset kernel module based on the Linux operating system reads and obtains the audio playback control event from the Bluedroid protocol stack;
[0041] Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
[0042] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0043] The present disclosure obtains an audio playback control event based on the Bluedroid protocol stack, reads the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system, and controls the Bluetooth service of the Linux operating system to execute an audio playback control operation corresponding to the audio playback control event based on the preset kernel module. Since the interaction between the Bluedroid protocol stack and the audio protocol stack of the Linux operating system is realized with the preset kernel module of the Linux operating system as the interaction center, Bluetooth audio playback control can be realized on an electronic device with a Linux operating system and a Bluedroid protocol stack.
[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0046] Figure 1 is a flow chart of an audio playback control method according to an exemplary embodiment of the present disclosure;
[0047] Figure 2 is a flowchart showing how to control the Bluetooth service of the Linux operating system to perform an audio playback control operation corresponding to the audio playback control event according to an exemplary embodiment of the present disclosure;
[0048] Figure 3 is a schematic diagram of a Linux operating system provided with a Bluedroid protocol stack according to an exemplary embodiment of the present disclosure;
[0049] Figure 4 is a block diagram of an audio playback control device according to an exemplary embodiment of the present disclosure;
[0050] Figure 5 is a block diagram of another audio playback control device according to an exemplary embodiment of the present disclosure;
[0051] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] Figure 1 is a flowchart of an audio playback control method according to an exemplary embodiment; the method of this embodiment can be executed by an audio playback control device, which can be configured in a first electronic device with a Linux operating system (such as a Bluetooth headset, a Bluetooth speaker, glasses, a wearable device such as a watch, etc.), and the Linux operating system is provided with a Bluedroid protocol stack. Specifically, Figure 1 As shown, the method includes the following steps S101-S103:
[0054] In step S101, an audio playback control event is obtained based on the Bluedroid protocol stack;
[0055] In some embodiments, the audio playback control event may be an audio playback control event triggered by a preset function button on a first electronic device (e.g., a Bluetooth headset), or may be an audio playback control event triggered by an application installed on a second electronic device (i.e., a central device with the first electronic device as a slave device, such as a smart phone, etc.). In step S102, the audio playback control event is read from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system.
[0056] For example, when the audio playback control event is an audio playback control event triggered by a preset function button on the first electronic device, the first electronic device can read the audio playback control event from the Bluedroid protocol stack based on the preset kernel module.
[0057] In the case where the audio playback control event is an audio playback control event triggered by an application installed on the second electronic device, the first electronic device can respond to a notification received from the application in the second electronic device based on the Bluetooth service, write the audio playback control event in the preset kernel module based on the Bluetooth service, and then read the written audio playback control event based on the preset kernel module.
[0058] As an example, the preset kernel module may be a kernel Uinput module of a Linux operating system, which is not limited in this embodiment.
[0059] In step S103, based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
[0060] In this embodiment, after the audio playback control event is obtained based on the preset kernel module of the Linux operating system, the first electronic device can control the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event based on the preset kernel module.
[0061] In some embodiments, the above-mentioned method of controlling the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event can also be referred to as follows: Figure 2 The illustrated embodiment will not be described in detail here.
[0062] In other embodiments, after the Bluetooth service of the Linux operating system is controlled to perform the audio playback control operation corresponding to the audio playback control event, the first electronic device can also respond to the Bluetooth service to complete the audio playback control operation, read the current event in the preset kernel module based on the input management module (Input Manager module), and wake up the user interface based on the AMS process management service of the Linux operating system to display the display information corresponding to the current event. Exemplarily, the display information may include audio playback status information (such as play, pause, double speed playback, etc.) and / or volume information (such as volume bar information).
[0063] From the above description, it can be seen that the method of this embodiment obtains an audio playback control event based on the Bluedroid protocol stack; a control event reading module is used to read the audio playback control event from the Bluedroid protocol stack based on the preset kernel module of the Linux operating system, and based on the preset kernel module, control the Bluetooth service of the Linux operating system to perform an audio playback control operation corresponding to the audio playback control event. Since the interaction between the Bluedroid protocol stack and the audio protocol stack of the Linux operating system is realized with the preset kernel module of the Linux operating system as the interaction center, Bluetooth audio playback control can be realized on an electronic device with a Linux operating system and a Bluedroid protocol stack.
[0064] Figure 2 is a flowchart showing how to control the Bluetooth service of the Linux operating system to perform an audio playback control operation corresponding to the audio playback control event according to an exemplary embodiment of the present disclosure;
[0065] Based on the above embodiment, this embodiment uses how to control the Bluetooth service of the Linux operating system to execute the audio playback control operation corresponding to the audio playback control event as an example to exemplify the description.
[0066] like Figure 2 As shown, the above step S102 of controlling the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event may include the following steps S201-S202:
[0067] In step S201, the audio playback control event in the preset kernel module is read by the Weston input management module based on the Linux operating system.
[0068] In this embodiment, after the audio playback control event is obtained based on the preset kernel module of the Linux operating system, the first electronic device can read the audio playback control event in the preset kernel module based on the Weston input management module (WestonInput) of the Linux operating system.
[0069] Among them, Weston can be a display service implemented based on the Wayland protocol, which is responsible for processing the information of the input device and generating corresponding output.
[0070] In step S202, the audio playback control event is transmitted to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application.
[0071] In this embodiment, after the Weston input management module based on the Linux operating system reads the audio playback control event in the preset kernel module, the audio playback control event can be passed to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application, so that the Bluetooth service can be controlled to perform the audio playback control operation based on the notification message.
[0072] For example, when a notification message is sent to the Bluetooth service through the player application, the player interface layer of the player application may be called so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
[0073] It is worth noting that the above-mentioned inter-process communication mode can be set based on the needs of the actual application scenario, such as being set to one or a combination of Topic communication, Restful communication and Socket communication, and this embodiment does not limit this.
[0074] From the above description, it can be seen that this embodiment reads the audio playback control event in the preset kernel module through the Weston input management module based on the Linux operating system, and passes the audio playback control event to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application. It can be realized that based on the above notification message, the Bluetooth service can be controlled to perform the audio playback control operation, thereby realizing Bluetooth audio playback control on an electronic device with a Linux operating system and a Bluedroid protocol stack.
[0075] The audio playback control method of the present disclosure is described below with a specific embodiment, but is not intended to limit the scope of the present disclosure.
[0076] Figure 3 is a schematic diagram of a Linux operating system provided with a Bluedroid protocol stack according to an exemplary embodiment of the present disclosure; Figure 3 The Linux operating system shown in the figure, the audio playback control method of this embodiment may include the following steps:
[0077] 1) In the Linux operating system, complete the transplantation of the Bluedroid protocol stack, that is, Figure 3 In the Bluedroid cutting and transplanting status shown in the figure, Bluedroid and A2DP / AVRCP are in a conductive state, where A2DP is the Advanced Audio Distribution Profile and AVRCP is the Audio / Video Remote Control Profile.
[0078] 2) When the play / pause, previous / next song, volume up / down and other control buttons are pressed on the Bluetooth audio device (such as Bluetooth headset, etc., the following takes Bluetooth headset as an example), the Uinput module of the kernel of Bluedroid and Linux operating system can read the corresponding event:
[0079] 2.1) When the above events are playback control events such as play / pause or previous / next song, the corresponding events in the kernel Uinput module can be read through the Weston Input module to call the inter-process communication method in the interface layer adapted in the player application to notify the Bluetooth service, thereby updating the Bluetooth audio state machine through the Bluetooth service. Among them, the Bluetooth audio state machine is a state machine maintained by the Bluetooth service. Exemplarily, the content of the state machine can include states such as standby / play / pause / fast forward and rewind. In addition, the corresponding events in the kernel Uinput module can also be read through the input management module (Input Manager) to wake up the user interface UI in the process management service AMS for display, such as displaying the audio playback status.
[0080] 2.2) When the above event is a volume adjustment event such as volume increase / decrease, the corresponding event in the kernel Uinput module can be read through the WestonInput module to call the inter-process communication method in the interface layer adapted in the player application to notify the Bluetooth service, thereby updating the volume of the Bluetooth audio device through the Bluetooth service. In addition, the corresponding event in the kernel Uinput module can also be read through the input management module (Input Manager) to wake up the user interface UI in the process management service AMS for display, such as displaying a volume bar.
[0081] In other embodiments, when a central device (such as a smart phone, etc.) with the above-mentioned Bluetooth headset as a slave device presses a virtual button such as pause / play of audio and video on an application, the application can notify the Bluetooth service through inter-process communication, and then the Bluetooth service can write a corresponding event (event) to the kernel Uinput module to achieve playback control of the slave device (i.e., the above-mentioned Bluetooth headset). For example, the Bluedroid protocol stack obtains "play / pause or previous / next song and other playback control events", and the Bluetooth service can perform the corresponding "control operation is play / pause or previous / next song and other control operations".
[0082] From the above description, it can be seen that this embodiment can support Bluetooth audio playback control functions in the Linux system and Bluedroid protocol stack platform (such as the above-mentioned Bluetooth headsets and other devices), thereby reducing the development difficulty of the underlying platform and further improving the compatibility of the platform's ecological applications.
[0083] Figure 4 is a block diagram of an audio playback control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in a first electronic device (such as a Bluetooth headset, a Bluetooth speaker, a pair of glasses, a watch or other wearable device) having a Linux operating system, wherein the Linux operating system is provided with a Bluedroid protocol stack. Specifically, Figure 4 As shown, the device may include: a control event acquisition module 110, a control event acquisition module 120 and a control operation execution module 130, wherein:
[0084] A control event acquisition module 110, used for acquiring an audio playback control event based on the Bluedroid protocol stack;
[0085] A control event reading module 120, configured to read the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system;
[0086] The control operation execution module 130 is used to control the Bluetooth service of the Linux operating system to execute the audio playback control operation corresponding to the audio playback control event based on the preset kernel module.
[0087] From the above description, it can be seen that the device of this embodiment obtains audio playback control events based on the Bluedroid protocol stack, reads the audio playback control events from the Bluedroid protocol stack based on the preset kernel module of the Linux operating system, and controls the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event based on the preset kernel module. Since the interaction between the Bluedroid protocol stack and the audio protocol stack of the Linux operating system is realized with the preset kernel module of the Linux operating system as the interaction center, Bluetooth audio playback control can be realized on an electronic device with a Linux operating system and a Bluedroid protocol stack.
[0088] Figure 5 is a block diagram of another audio playback control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in a first electronic device (such as a Bluetooth headset, a Bluetooth speaker, glasses or a wearable device such as a watch, etc.) with a Linux operating system, and the Linux operating system is provided with a Bluedroid protocol stack. Among them, the control event acquisition module 210, the control event reading module 220 and the control operation execution module 230 are the same as the aforementioned Figure 4 The functions of the control event acquisition module 110 , the control event reading module 120 and the control operation execution module 130 in the illustrated embodiment are the same and will not be described in detail herein.
[0089] In this embodiment, the above device may further include:
[0090] A control event writing module 240, configured to write the audio playback control event in the preset kernel module based on the Bluetooth service in response to receiving a notification from an application in the second electronic device based on the Bluetooth service;
[0091] Furthermore, the control event reading module 220 can also be used to read the written audio playback control event based on the preset kernel module.
[0092] In some embodiments, the control operation execution module 230 may include:
[0093] An event reading unit 231 is used to read the audio playback control event in the preset kernel module based on the Weston input management module of the Linux operating system;
[0094] The operation execution unit 232 is used to transmit the audio playback control event to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application, and the notification message is used to control the Bluetooth service to perform the audio playback control operation.
[0095] In some embodiments, the operation execution unit 232 is further used to call the player interface layer of the player application, so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
[0096] In some embodiments, the above apparatus may further include:
[0097] The display information display module 250 is used to respond to the Bluetooth service completing the audio playback control operation, read the current event in the preset kernel module based on the input management module, and wake up the user interface based on the AMS process management service of the Linux operating system to display the display information corresponding to the current event.
[0098] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0099] Figure 6 900 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0100] Reference Figure 6 , device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0101] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned audio playback control method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0102] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0103] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0104] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display panel and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0105] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0106] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0107] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display panel and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0109] In an exemplary embodiment, the device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned audio playback control method.
[0110] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 to complete the above-mentioned audio playback control method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0112] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An audio playback control method, characterized in that: Applied to a first electronic device having a Linux operating system, wherein the Linux operating system is provided with a Bluedroid protocol stack, the method comprises: Acquire an audio playback control event based on the Bluedroid protocol stack; Reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system; Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
2. The method according to claim 1, characterized in that The method further comprises: In response to receiving a notification from an application in a second electronic device based on the Bluetooth service, writing the audio playback control event in the preset kernel module based on the Bluetooth service; The preset kernel module based on the Linux operating system reads the audio playback control event from the Bluedroid protocol stack, including: The audio playback control event is read and written based on the preset kernel module.
3. The method according to claim 1, characterized in that The controlling the Bluetooth service of the Linux operating system to perform the audio playback control operation corresponding to the audio playback control event based on the preset kernel module includes: The Weston input management module based on the Linux operating system reads the audio playback control event in the preset kernel module; Based on the Weston input management module, the audio playback control event is transmitted to the player application of the Linux operating system, so that a notification message is sent to the Bluetooth service through the player application, and the notification message is used to control the Bluetooth service to perform the audio playback control operation.
4. The method according to claim 3, characterized in that The sending of a notification message to the Bluetooth service through the player application includes: The player interface layer of the player application is called so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
5. The method according to claim 1, characterized in that: The method further comprises: In response to the Bluetooth service completing the audio playback control operation, the current event in the preset kernel module is read based on the input management module, so as to wake up the user interface based on the AMS process management service of the Linux operating system to display display information corresponding to the current event.
6. An audio playback control device, characterized in that: Applied to a first electronic device having a Linux operating system, wherein the Linux operating system is provided with a Bluedroid protocol stack, the device comprises: A control event acquisition module, used for acquiring audio playback control events based on the Bluedroid protocol stack; A control event reading module, used for reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system; The control operation execution module is used to control the Bluetooth service of the Linux operating system to execute the audio playback control operation corresponding to the audio playback control event based on the preset kernel module.
7. The device according to claim 6, characterized in that The device also includes: A control event writing module, configured to write the audio playback control event in the preset kernel module based on the Bluetooth service in response to receiving a notification from an application in the second electronic device based on the Bluetooth service; The control event reading module is further used to read the written audio playback control event based on the preset kernel module.
8. The device according to claim 6, characterized in that The control operation execution module includes: An event reading unit, used for reading the audio playback control event in the preset kernel module based on the Weston input management module of the Linux operating system; An operation execution unit is used to transmit the audio playback control event to the player application of the Linux operating system based on the Weston input management module, so as to send a notification message to the Bluetooth service through the player application, and the notification message is used to control the Bluetooth service to perform the audio playback control operation.
9. The device according to claim 8, characterized in that The operation execution unit is further used to call the player interface layer of the player application, so that the player interface layer sends the notification message to the Bluetooth service based on an inter-process communication method.
10. The device according to claim 6, characterized in that The device also includes: The display information display module is used to respond to the Bluetooth service completing the audio playback control operation, read the current event in the preset kernel module based on the input management module, and wake up the user interface based on the AMS process management service of the Linux operating system to display the display information corresponding to the current event.
11. An electronic device, characterized in that: The electronic device has a Linux operating system, a Bluedroid protocol stack is provided in the Linux operating system, and the electronic device includes: a processor and a memory for storing a computer program; Wherein, the processor is configured to implement, when executing the computer program: Acquire an audio playback control event based on the Bluedroid protocol stack; Reading the audio playback control event from the Bluedroid protocol stack based on a preset kernel module of the Linux operating system; Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it realizes: Get audio playback control events based on the Bluedroid protocol stack; A preset kernel module based on the Linux operating system reads the audio playback control event from the Bluedroid protocol stack; Based on the preset kernel module, the Bluetooth service of the Linux operating system is controlled to execute the audio playback control operation corresponding to the audio playback control event.