Electronic devices, audio playback methods, storage media and software products
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]通过上述方式实现电子设备的音频播放,由于切换开关体积较大且布线较为复杂,在电子设备存在轻便化需求的情况下,增大了电子设备的实现难度
[0019]本申请提供的技术方案带来的有益效果至少包括:
Smart Images

Figure CN122569873A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic devices, and in particular to an electronic device, an audio playback method, a storage medium, and a program product. Background Technology
[0002] Due to size constraints, some electronic devices typically have poor battery life. Currently, such devices (e.g., wearable devices) are often equipped with a dual-system architecture. A less powerful first processor runs a simpler first operating system, while a more powerful second processor runs a more complex second operating system. This collaboration between the two operating systems helps reduce the power consumption of the electronic device.
[0003] To enable audio playback functionality in both operating systems of an electronic device, related technologies incorporate switches, such as high-speed switches, to change the electrical connections between different components. When the first operating system invokes the audio playback function, the switch connects the audio playback device to the first processor; when the second operating system invokes the audio playback function, the switch connects the audio playback device to the second processor.
[0004] The above method enables audio playback on electronic devices, but the large size of the switch and the complexity of the wiring increase the difficulty of implementing the electronic device, especially given the need for portability. Summary of the Invention
[0005] This application provides an electronic device, an audio playback method, a storage medium, and a program product, which can reduce the implementation difficulty of electronic devices. The technical solution is as follows:
[0006] According to one aspect of this application, an electronic device is provided, the electronic device including at least two processing cores and an audio playback device, the at least two processing cores including a first processing core and a second processing core, the first processing core being used to run a first system, and the second processing core being used to run a second system; wherein, the first processing core is used to control the audio playback device, and the second processing core is used to control the audio playback device through the first processing core.
[0007] In an optional design, the audio playback device includes a driver component and a speaker, the driver component being used to drive the speaker; wherein the first processing core is electrically connected to the driver component, and the driver component is electrically connected to the speaker.
[0008] In an optional design, the driving component includes a power amplifier (PA); bidirectional communication is possible between the first processing core and the second processing core, and between the second processing core and the PA.
[0009] In an optional design, the electronic device further includes a Bluetooth module; wherein the Bluetooth module is electrically connected to the first processing core; or, the Bluetooth module and the first processing core are integrated into a single chip; or, the Bluetooth module is integrated into a Bluetooth chip, and the Bluetooth chip is electrically connected to the first processing core.
[0010] In an optional design, the first processing core integrates a digital signal processor (DSP).
[0011] In an alternative design, the electronic device further includes a microphone; wherein the microphone is electrically connected to both the first processing core and the second processing core, and the microphone includes an analog microphone, which the first processing core and the second processing core can access simultaneously.
[0012] In an alternative design, the first processing core is a low-performance processing core configured to run a speaker protection algorithm, and the second processing core is a high-performance processing core configured to run a sound effect algorithm.
[0013] According to another aspect of this application, an audio playback method is provided, the method being applied to the aforementioned electronic device, the method comprising:
[0014] In response to an audio playback command in the second system running the second processing core, the second processing core acquires the first audio data;
[0015] The second processing core transmits the first audio data to the first processing core;
[0016] The first processing core controls the audio playback device to play audio using the first audio data.
[0017] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one program is stored therein, the at least one program being loaded and executed by a processor to implement the audio playback method as described above.
[0018] According to another aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the audio playback method provided in the above aspect.
[0019] The beneficial effects of the technical solution provided in this application include at least the following:
[0020] By enabling a dual-system electronic device to control an audio playback device through a first processing core, and indirectly control the audio playback device through a second processing core, all systems running on different processing cores within the electronic device can support audio playback functionality. Since no switching switch is required within the electronic device to enable audio playback functionality across systems running on different processing cores, the implementation complexity of the electronic device can be reduced. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a structural block diagram of an electronic device provided in an exemplary embodiment of this application;
[0023] Figure 2 This is a flowchart illustrating an exemplary embodiment of the audio playback method provided in this application;
[0024] Figure 3 This is a flowchart illustrating an exemplary embodiment of the audio playback method provided in this application;
[0025] Figure 4 This is a schematic diagram of an audio playback process provided in an exemplary embodiment of this application;
[0026] Figure 5 This is a flowchart illustrating a Bluetooth audio playback method provided in an exemplary embodiment of this application;
[0027] Figure 6 This is a schematic diagram of a Bluetooth audio playback process provided in an exemplary embodiment of this application;
[0028] Figure 7 This is a schematic diagram of a Bluetooth audio playback process provided in an exemplary embodiment of this application;
[0029] Figure 8 This is a flowchart illustrating a Bluetooth calling method provided in an exemplary embodiment of this application;
[0030] Figure 9 This is a schematic diagram of a Bluetooth call process provided in an exemplary embodiment of this application;
[0031] Figure 10 This is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application.
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0034] First, let me introduce the terms used in this application:
[0035] Dual system: A single electronic device has two processors and two different operating systems. For example, an electronic device has a first processor and a second processor, where the first processor runs a first system and the second processor runs a second system. In some embodiments, the first and second processors may be two separately packaged chips; in some embodiments, the first and second processors may be packaged in the same chip. In some embodiments, the program running on the processor can be understood as a system, including but not limited to an operating system; in some embodiments, a dual system may be two operating systems.
[0036] Serial Peripheral Interface Bus (SPI): SPI is a high-speed, full-duplex, synchronous communication bus. It is primarily used for data transmission between microcontrollers and peripheral devices (such as sensors, memory, and display drivers). SPI is a four-wire interface, including MasterOut / SlaveIn (MOSI) signal lines, MasterIn / SlaveOut (MISO) signal lines, a Serial Clock (SCK) signal line, and a Slave Select (SS) signal line.
[0037] Integrated Circuit Built-in Audio Bus (Inter-IC Sound, I2S): I2S is a bus standard developed for audio data transmission between digital audio devices. It is widely used in various multimedia systems, such as audio codecs, digital signal processors, and audio controllers. It employs a design that transmits clock and data signals along independent wires. By separating data and clock signals, it avoids distortion induced by time differences, saving users the cost of purchasing specialized equipment to combat audio jitter.
[0038] Inter-Integrated Circuit (I2C) Bus: I2C is a serial communication bus. It typically has two signal lines: a bidirectional data line and a clock line. I2C's protocol is simple, flexible, and widely supported, and it is commonly used to connect various peripherals such as sensors, memory, displays, touchscreens, codecs, power amplifiers, real-time clocks, and chargers to microcontrollers, microprocessors, or other integrated circuits. For example, in some embedded systems, temperature sensors and humidity sensors are connected to a microcontroller via the I2C bus to acquire environmental data; in electronic devices, the I2C bus is used to connect components such as screens, cameras, and fingerprint sensors.
[0039] Power Amplifier (PA): A PA is an amplifier that can produce maximum power output to drive a load (such as a loudspeaker) under a given distortion rate. It plays a pivotal role in the entire audio system, acting as a "coordinator" and significantly influencing whether the system can provide good sound quality. Its working principle involves using the current control of transistors or the voltage control of field-effect transistors to convert the power from the power supply into a current that varies according to the input signal.
[0040] Smart PA (Intelligent Power Amplifier): A smart PA is an audio power amplifier that, compared to ordinary audio power amplifiers, has the following additional functions and features: Feedback Function: At a certain mid-frequency range, a smart PA and an ordinary PA can achieve identical signal-to-noise ratio (SNR) and maximum output power. At other frequencies (especially low frequencies), ordinary PAs must reduce the amplification factor during the initial design to ensure SNR and maximum power. Smart PAs, however, incorporate output signal feedback, enabling precise control through feedback. Speaker Protection Solution: To maximize speaker performance, a power amplifier needs high power to drive the speaker. To prevent speaker damage during operation, two aspects need to be addressed: diaphragm vibration (diaphragm protection) and excessive speaker temperature (temperature protection). Regarding diaphragm protection, the smart PA predicts the speaker diaphragm displacement based on the speaker amplitude model and calculates the corresponding real-time gain, protecting the speaker amplitude within a safe range. Regarding temperature protection, the smart PA detects the voltage output to the speaker; when the temperature rises, it controls the output power, thus achieving speaker temperature protection. Enhanced audio output: It can improve the dynamic range of audio output of electronic devices, dynamically track the status of the speaker and sense changes in its environment, and make changes after adapting, bringing higher volume, deeper bass and better sound quality to mobile phones, portable music players and tablets, and can also increase the average volume of audio without exceeding the speaker's own capacity.
[0041] Microphone (MIC): A microphone is an energy conversion device that converts sound signals into electrical signals, playing a crucial role in recording, sound reinforcement, and broadcasting systems. Microphones can be divided into digital microphones and analog microphones: Digital microphones output discrete digital signals (usually binary codes of 0s and 1s). These digital signals require dedicated digital interfaces and protocols for transmission and processing. Each processor typically needs a dedicated digital interface to receive and interpret the signals from a digital microphone. Furthermore, communication between a digital microphone and a processor usually follows corresponding communication protocols, such as I2S. These protocols specify the format, timing, and other details of data transmission. A digital microphone can only effectively communicate with one processor at a time according to one protocol, making it difficult to simultaneously meet the protocol and timing requirements of at least two different processors. Therefore, it is generally not possible to connect two processors simultaneously. Analog microphones, on the other hand, output continuous voltage variation signals. These analog signals have a degree of "universality" and can be received and processed by different processors. For analog signals, processors can process them using simple circuits, such as amplifiers and filters. Different processors can independently perform different processing operations on the same analog microphone signal without interfering with each other. Therefore, analog microphones can be connected to different processors.
[0042] Digital Signal Processor (DSP): A DSP is a microprocessor specifically designed for high-speed mathematical operations. It can process digital signals quickly and accurately, while also being programmable and low-power, playing a vital role in various fields. For example, in the audio field, DSPs can be used for filtering, equalizing, compressing, and noise reduction of audio signals, improving audio quality and creating a better listening experience. In the communications field, DSPs are widely used for signal modulation and demodulation, encoding and decoding, channel equalization, encryption and decryption, etc. Furthermore, in voice communication, DSPs can process voice signals, performing functions such as voice encoding, compression, and echo cancellation, improving the clarity and intelligibility of voice communication.
[0043] Bluetooth Protocol Stack: The Bluetooth protocol stack is a core component of Bluetooth technology, defining the rules and processes for communication between Bluetooth devices. The Bluetooth protocol stack adopts a layered structure, primarily consisting of the physical layer, logical layer, Logical Link Control and Adaptation Protocol (L2CAP) layer, and application layer from bottom to top. Each layer has corresponding functions and responsibilities. Bluetooth audio transmission applications are based on the Advanced Audio Distribution Profile (A2DP), which defines the rules and processes for transmitting high-quality audio information over asynchronous connectionless channels.
[0044] Wearable devices: Wearable devices are portable electronic devices worn directly on the user's body or integrated into the user's clothing or accessories. Wearable devices not only provide hardware, but also offer powerful functions through software (such as an operating system), combined with data interaction and cloud interaction. For example, wearable devices can monitor health indicators, make and receive phone calls, and provide information notifications.
[0045] Smartwatches: Smartwatches are wearable devices that combine the form factor of a watch with an intelligent system. Through built-in systems (such as an operating system), processors, and memory, smartwatches can perform functions such as data processing, information display, and interactive control. In addition to the basic function of telling time, smartwatches can synchronize calls, text messages, emails, photos, music, etc., from other electronic devices (such as mobile phones). They also collect activity and physiological data from the user through various sensors (such as accelerometers, gyroscopes, and heart rate sensors), and connect to mobile phones or other electronic devices via wireless communication technology to achieve functions such as message synchronization and health management.
[0046] Figure 1This is a structural block diagram of an electronic device 100 provided in an exemplary embodiment of this application. Figure 1 As shown, the electronic device 100 includes at least two processing cores and an audio playback device. The at least two processing cores include a first processing core 101 and a second processing core 102. The first processing core 101 and the second processing core 102 are used to process instructions generated during the operation of the electronic device 100. The audio playback device includes a device in the electronic device 100 used to implement audio playback. In some embodiments, the performance of the first processing core 101 is weaker than that of the second processing core 102. For example, the ultimate performance of the first processing core 101 is weaker than that of the second processing core 102, and / or the energy efficiency of the first processing core 101 is weaker than that of the second processing core 102. The first processing core 101 may be referred to as a low-performance core (low-performance processing core), and the second processing core 102 may be referred to as a high-performance core (high-performance processing core). In some embodiments, the performance of the first processing core 101 is stronger than that of the second processing core 102. For example, the ultimate performance of the first processing core 101 is stronger than that of the second processing core 102, and / or the energy efficiency of the first processing core 101 is stronger than that of the second processing core 102. In some embodiments, the first processing core 101 and the second processing core 102 are integrated on a single chip; alternatively, they can be integrated on two separate chips. In some embodiments, the first processing core 101 is a first processor, and the second processing core 102 is a second processor. For example, the first processing core 101 is a microcontroller unit (MCU), and the second processing core 102 is a central processing unit (CPU).
[0047] The first processing core 101 is used to run the first system, and the second processing core 102 is used to run the second system. Optionally, when the first processing core 101 is a low-performance processing core and the second processing core 102 is a high-performance processing core, the relationship between the first system and the second system includes one or more of the following relationships: the second system is more complex than the first system, the second system has more functions than the first system, and the power consumption of running the second system is higher than that of the first system. The first system can be a first operating system, and the second system can be a second operating system. In some embodiments, the first system is an embedded system, and the second system is a non-embedded system. For example, the first system is a Real-Time Operating System (RTOS), and the second system is the Android system.
[0048] A first processing core 101 controls an audio playback device to play audio. A second processing core 102 controls the audio playback device through the first processing core 101 to play audio. In some embodiments, inter-core communication is established between the first processing core 101 and the second processing core 102 for communication between them, enabling the second processing core 102 to control the audio playback device through the first processing core 101. Optionally, the inter-core communication between the first processing core 101 and the second processing core 102 is established via SPI and / or I2S.
[0049] In some embodiments, the second processing core 102 has higher performance than the first processing core 101. The first processing core 101, which can be referred to as a low-performance processing core, is configured to run the speaker protection algorithm, while the second processing core 102, which can be referred to as a high-performance processing core, is configured to run the sound effect algorithm. The speaker protection algorithm is an algorithm used to protect the speaker. It monitors the speaker's operating status, such as volume, power, and temperature, and adjusts the audio signal according to preset rules and algorithms to prevent damage to the speaker. The sound effect algorithm is used to adjust the sound effects corresponding to the audio signal.
[0050] In some embodiments, the first processing core 101 is electrically connected to the audio playback device, and there is no switching switch between the first processing core 101 and the audio playback device. In some embodiments, the second processing core 102 is not directly electrically connected to the audio playback device, and there is no switching switch between the second processing core 102 and the audio playback device.
[0051] In some embodiments, the audio playback device includes a driving component and a speaker. The driving component drives the speaker to produce sound. A first processing core 101 is electrically connected to the driving component, and the driving component is electrically connected to the speaker. Optionally, the first processing core 101 and the driving component are connected via I2C and / or I2S. I2C is used for the first processing core 101 to transmit control signals to the driving component, and I2S is used for the first processing core 101 to transmit audio signals to the driving component. Optionally, the driving component includes a PA 103, such as a Smart Power Amplifier (SmartPA). The speaker can be a loudspeaker 104 or other types of loudspeakers; this embodiment does not limit this. In some embodiments, the first processing core 101 and the second processing core 102 can communicate bidirectionally, and the second processing core 102 and the PA 103 can communicate bidirectionally.
[0052] In some embodiments, the electronic device 100 further includes a Bluetooth module 105, which is used to implement Bluetooth communication. The Bluetooth module 105 is electrically connected to the first processing core 101, or the Bluetooth module 105 and the first processing core 101 are integrated into a single chip, or the Bluetooth module 105 is integrated into a Bluetooth chip, which is electrically connected to the first processing core 101. When the Bluetooth module 105 is electrically connected to the first processing core 101, the Bluetooth module 105 is an external Bluetooth module of the first processing core 101; when the Bluetooth module 105 is integrated into the first processing core 101, the Bluetooth module 105 is a built-in Bluetooth module of the first processing core 101. In some embodiments, when the Bluetooth module 105 is electrically connected to the first processing core 101, the Bluetooth module 105 and the first processing core 101 are connected via I2S; when the Bluetooth module 105 is integrated into the first processing core 101, the Bluetooth module 105 and the first processing core 101 establish inter-core communication. Optionally, the Bluetooth module 105 is used to implement at least one of Bluetooth audio playback and Bluetooth calling. In some embodiments, Bluetooth audio playback is implemented by the first processing core 101 controlling the Bluetooth module 105, and / or the second processing core 102 controls the Bluetooth module 105 through the first processing core 101. Bluetooth calling is implemented by the first processing core 101 controlling the Bluetooth module 105, and / or the second processing core 102 controls the Bluetooth module 105 through the first processing core 101.
[0053] In some embodiments, the electronic device 100 further includes a microphone 106, which is electrically connected to both the first processing core 101 and the second processing core 102. This can be understood as the microphone 106 being electrically connected to both the first processing core 101 and the second processing core 102 simultaneously. Therefore, both the first processing core 101 and the second processing core 102 can acquire the voice signal collected by the microphone 106, enabling both the first system running on the first processing core 101 and the second system running on the second processing core 102 to use the voice signal collected by the microphone 106. This voice signal can be used to implement a recording function. The embodiments of this application do not limit the function of the voice signal. In some embodiments, the microphone 106 is used to transmit pulse density modulation (PDM) signals to the first processing core 101 and / or the second processing core 102. In some embodiments, the microphone 106 includes an analog microphone, which the first processing core 101 and the second processing core 102 can access simultaneously.
[0054] In some embodiments, the electronic device is implemented as a wearable device, such as a smartwatch.
[0055] In summary, the electronic device provided in this embodiment enables a dual-system electronic device to control an audio playback device via a first processing core, and to indirectly control the audio playback device via a second processing core through the first processing core. This allows systems running on different processing cores within the electronic device to support audio playback functionality. Since no switching switch is required within the electronic device, enabling systems running on different processing cores to support audio playback functionality reduces the implementation complexity of the electronic device. Furthermore, the elimination of a switching switch reduces the hardware cost and size of the electronic device. Because the electronic device does not involve a switching process, audio function failure due to switching is avoided.
[0056] The electronic device provided in this embodiment also enables the first and second processing cores to drive speakers via driving components, thereby allowing systems running on different processing cores to support audio playback functionality. By connecting the Bluetooth module to the first processing core or integrating the Bluetooth module into the first processing core, power consumption is reduced when the performance of the first processing core is weaker than that of the second processing core. By electrically connecting the microphone to both the first and second processing cores, both the first and second processing cores can acquire the voice signals collected by the microphones, thus enabling both the first and second systems to support functions involving voice signals.
[0057] Figure 2 This is a flowchart illustrating an exemplary embodiment of an audio playback method provided in this application. This method can be used for, for example... Figure 1 The electronic device shown. For example... Figure 2 As shown, the method includes:
[0058] Step 202: In response to an audio playback command in the second system running on the second processing core, the second processing core acquires the first audio data.
[0059] The electronic device includes at least two processing cores, which include a first processing core and a second processing core. The first and second processing cores are used to process instructions generated during the operation of the electronic device. The first processing core is used to run a first system, and the second processing core is used to run a second system.
[0060] It should be noted that the descriptions of the first and second processing cores can be found in the previous text and will not be repeated here. Similarly, the descriptions of the first and second systems can be found in the previous text and will not be repeated here.
[0061] Audio playback commands are used to instruct an electronic device to play audio aloud, such as instructing the electronic device to play a song and / or play voice during a call. The audio playback commands are triggered by a system running a second processing core. In some embodiments, the audio playback commands are triggered by song playback and / or call operations within the system running the second processing core, which are performed in the user interface of the system running the second processing core, for example, by the user of the electronic device.
[0062] The first audio data is the audio data that the audio playback command instructs the electronic device to play. In some embodiments, when the audio playback command is used to instruct the electronic device to play a song aloud, the first audio data includes the data of the song being played aloud; when the audio playback command is used to instruct the electronic device to play a voice message during a call aloud, the first audio data includes the data of the voice message being played aloud.
[0063] In some embodiments, the first audio data is acquired by the second processing core through the second system, which can be understood as audio data local to the second processing core; or, the electronic device further includes a Bluetooth module, and the first audio data is acquired by the first processing core through the Bluetooth module and transmitted to the second processing core.
[0064] Step 204: The second processing core transmits the first audio data to the first processing core.
[0065] The first processing core and the second processing core establish inter-core communication, which is used for communication between the first and second processing cores. Optionally, the inter-core communication between the first and second processing cores is established via SPI and / or I2S. In some embodiments, the second processing core transmits first audio data to the first processing core via I2S.
[0066] Step 206: The first processing core controls the audio playback device to play audio through the first audio data.
[0067] Electronic devices include audio playback devices, which include components used to implement audio playback. In some embodiments, the audio playback device includes a driving component and a speaker, the driving component driving the speaker to produce sound. Optionally, the driving component includes a power amplifier (PA), such as a smart PA. The speaker can be a horn or other types of speaker, and this application embodiment does not limit this.
[0068] After acquiring the first audio data, the first processing core sends the first audio data to the audio playback device to control the audio playback device to play audio according to the first audio data. For example, the first processing core sends the first audio data to the driving component via I2S, thereby controlling the driving component to drive the speaker to play audio according to the first audio data.
[0069] It should be noted that this embodiment mainly uses the example of the second system running on the second processing core triggering an audio playback command. It is understood that the system running on the first processing core can also trigger an audio playback command. In this case, the first processing core obtains the first audio data and executes step 206 as described above. The first processing core can obtain the first audio data through the first system, or, if the electronic device also includes a Bluetooth module, the first processing core can also obtain the first audio data through the Bluetooth module. The process of obtaining the first audio data can be referred to the relevant content above, and will not be repeated here.
[0070] In summary, the method provided in this embodiment, when the system running the second processing core triggers an audio playback command, allows the second processing core to indirectly control the audio playback device to play audio through the first processing core. Since the first processing core can also control the audio playback device to play audio, all systems running different processing cores in the electronic device can support audio playback functionality. Because no switching switch is required in the electronic device to enable all systems running different processing cores to support audio playback functionality, the implementation difficulty of the electronic device can be reduced.
[0071] Figure 3 This is a flowchart illustrating an exemplary embodiment of an audio playback method provided in this application. This method can be used for, for example... Figure 1 The electronic device shown. For example... Figure 3 As shown, the method includes:
[0072] Step 302: In response to an audio playback command in the second system running on the second processing core, the second processing core acquires the first audio data.
[0073] The electronic device includes at least two processing cores, which include a first processing core and a second processing core. The first and second processing cores are used to process instructions generated during the operation of the electronic device. The first processing core is used to run a first system, and the second processing core is used to run a second system.
[0074] It should be noted that the descriptions of the first and second processing cores can be found in the previous text and will not be repeated here. Similarly, the descriptions of the first and second systems can be found in the previous text and will not be repeated here.
[0075] An audio playback command is used to instruct an electronic device to play audio aloud, such as instructing the electronic device to play a song aloud and / or play voice during a call aloud. The audio playback command is triggered by a system running through a second processing core. The first audio data is the data of the audio to be played as instructed by the audio playback command. In some embodiments, when the audio playback command instructs the electronic device to play a song aloud, the first audio data includes the data of the song being played aloud; when the audio playback command instructs the electronic device to play voice during a call aloud, the first audio data includes the data of the voice being played aloud.
[0076] In some embodiments, the first audio data is acquired by the second processing core through the second system, which can be understood as audio data local to the second processing core; or, the electronic device further includes a Bluetooth module, and the first audio data is acquired by the first processing core through the Bluetooth module and transmitted to the second processing core.
[0077] Step 304: The second processing core processes the first audio data to obtain the first processed data of the first audio data.
[0078] After acquiring the first audio data, the second processing core processes the first audio data and then transmits the processed first audio data to the first processing core. Optionally, the second processing core processes the first audio data to obtain first processed data, which is then transmitted to the first processing core. Optionally, the first processed data is obtained by the second processing core processing the first audio data using a sound effect algorithm, which is used to adjust the sound effects corresponding to the first audio data. It should be noted that, in addition to sound effect algorithms, the second processing core can also process the first audio data using other algorithms to obtain processed data, and this embodiment does not limit this.
[0079] Step 306: The second processing core transmits the first processing data to the first processing core.
[0080] The first processing core and the second processing core establish inter-core communication, which is used for communication between the first and second processing cores. Optionally, the inter-core communication between the first and second processing cores is established via SPI and / or I2S. In some embodiments, the second processing core transmits first processing data to the first processing core via inter-core communication, such as via I2S.
[0081] Step 308: The first processing core processes the first processing data into second processing data and sends the second processing data to the driving component, which then controls the speaker to play audio based on the second processing data.
[0082] Electronic devices include audio playback devices, which include components used to implement audio playback. In some embodiments, the audio playback device includes a driving component and a speaker. Optionally, the driving component includes a power amplifier (PA), such as a smart PA. The speaker can be a horn or other types of speaker, and this application does not limit this.
[0083] After acquiring the first processed data, the first processing core sends the first processed data to the audio playback device to control the audio playback device to play audio according to the first processed data. For example, the first processing core sends the first processed data to the driver unit via I2S, thereby controlling the driver unit to drive the speaker to play audio according to the first processed data. Since the PA is not directly connected to the second processing core, the second processing core does not contain any PA drivers or algorithms; the first processing core controls and drives the PA.
[0084] In some embodiments, after acquiring the first processed data, the first processing core processes the acquired data again to obtain second processed data. The second processed data is then sent to the driving component, which controls the speaker to play audio based on the second processed data. Optionally, the second processed data is obtained by the first processing core processing the first processed data using a speaker protection algorithm. The speaker protection algorithm is an algorithm used to protect the speaker. It monitors the speaker's operating status, such as volume, power, and temperature, and adjusts the audio signal (first processed data) according to preset rules and algorithms to prevent damage to the speaker. For example, when the volume is too high or the power is too high, the speaker protection algorithm may automatically reduce the volume or limit the power output to avoid speaker overload.
[0085] In some embodiments, in response to the aforementioned audio playback command, the second processing core also transmits a playback start notification to the first processing core. This playback start notification instructs the first processing core to initiate audio playback. The first processing core controls the driver component to start based on the playback start notification, so that, upon sending second processing data to the driver component, the driver component controls the speaker to play audio based on the second processing data.
[0086] In some embodiments, when the first audio data is used for a call, i.e., the speaker is used to play the call audio, the first processing core acquires the audio data returned by the driving component. That is, the driving component also transmits audio data back to the first processing core, for example, via I2S transmission. The audio data is used by the driving component to control the speaker to play the call audio. After acquiring the audio data, the first processing core transmits it back to the second processing core, for example, via I2S transmission. After acquiring the audio data, the second processing core processes the first audio data according to the data using an echo cancellation algorithm, and then continues to execute the above steps. The echo cancellation algorithm is used to eliminate echoes during the call. Communication between the first processing core, the second processing core, and the driving component can be bidirectional; for example, the I2S signal is a bidirectional signal.
[0087] For example, Figure 4 This is a schematic diagram illustrating an audio playback process provided in an exemplary embodiment of this application. Figure 4 As shown, when the second system triggers an audio playback command, the second processing core 401 notifies the first processing core 402 to start audio playback. Upon receiving the playback start command, the first processing core 402 controls the PA 403 to start. Then, the second processing core 401 prepares the first audio data and sends it to the first processing core 402 via I2S. The first processing core 402 runs a speaker protection algorithm to process the first audio data, and then sends the processed audio data to the PA 403, which drives the speaker 404 to emit sound.
[0088] It should be noted that this embodiment mainly uses the example of the second system running on the second processing core triggering an audio playback command. It is understood that the system running on the first processing core can also trigger an audio playback command. In this case, the first processing core obtains the first audio data and executes step 308 as described above. The first processing core can obtain the first audio data through the first system or through a Bluetooth module. Furthermore, the first processing core can also run sound effect algorithms, i.e., execute step 304 as described above. The process of obtaining the first audio data can be referred to the relevant content above and will not be repeated here.
[0089] In summary, the method provided in this embodiment, when the system running the second processing core triggers an audio playback command, allows the second processing core to indirectly control the audio playback device to play audio through the first processing core. Since the first processing core can also control the audio playback device to play audio, all systems running different processing cores in the electronic device can support audio playback functionality. Because no switching switch is required in the electronic device to enable all systems running different processing cores to support audio playback functionality, the implementation difficulty of the electronic device can be reduced.
[0090] Figure 5 This is a flowchart illustrating a Bluetooth audio playback method provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The electronic device shown. For example... Figure 5 As shown, the method includes:
[0091] Step 502: In response to a Bluetooth audio playback command in the second system running on the second processing core, the second processing core acquires the second audio data.
[0092] In some embodiments, the electronic device further includes a Bluetooth module, which is electrically connected to the first processing core, or the Bluetooth module and the first processing core are integrated into a single chip, or the Bluetooth module is integrated into a Bluetooth chip, and the Bluetooth chip is electrically connected to the first processing core. In some embodiments, when the Bluetooth module is electrically connected to the first processing core, the Bluetooth module and the first processing core are connected via I2S; when the Bluetooth module is integrated into the first processing core, the Bluetooth module and the first processing core establish inter-core communication.
[0093] A Bluetooth audio playback command is used to instruct an electronic device to play audio via a Bluetooth device. The Bluetooth device includes devices that communicate with the electronic device via Bluetooth, such as at least one of headphones, speakers, or glasses that support Bluetooth communication. The Bluetooth audio playback command is triggered by a system running a second processing core. In some embodiments, the Bluetooth audio playback command is triggered by a Bluetooth song playback operation within the system running the second processing core, which is executed in the user interface of the system running the second processing core, for example, by the user of the electronic device.
[0094] The second audio data is the audio data that the Bluetooth audio playback command instructs the playback of. In some embodiments, where the Bluetooth audio playback command is used to instruct an electronic device to play a song via a Bluetooth device, the first audio data includes the data of the song played via the Bluetooth device.
[0095] In some embodiments, the second audio data is acquired by the second processing core through the second system, which can be understood as audio data local to the second processing core; or, the second audio data is acquired by the first processing core through the Bluetooth module and transmitted to the second processing core.
[0096] Step 504: The second processing core transmits the second audio data to the first processing core.
[0097] The first processing core and the second processing core establish inter-core communication, which is used for communication between the first and second processing cores. Optionally, the inter-core communication between the first and second processing cores is established via SPI and / or I2S. In some embodiments, the second processing core transmits second audio data to the first processing core via I2S.
[0098] In some embodiments, the second processing core also processes the second audio data, for example, through sound effect algorithms. The processing procedure can be referred to the relevant content above, and will not be repeated here.
[0099] Step 506: The first processing core controls the Bluetooth module to transmit Bluetooth audio through the second audio data.
[0100] Bluetooth audio includes data used by Bluetooth devices for audio playback. Optionally, the first processing core integrates a DSP, the Bluetooth module includes a Bluetooth controller, and a Bluetooth protocol stack runs within the Bluetooth module. After acquiring the second audio data, the first processing core encodes the second audio data using the DSP to obtain encoded data. Optionally, the format of the encoded data includes Advanced Audio Coding (AAC), Sub-Band Coding (SBC), and may also include formats other than AAC and SBC; this embodiment does not limit this. After obtaining the encoded data, the first processing core transmits the encoded data to the Bluetooth protocol stack of the Bluetooth module via the DSP, for example, through inter-core communication. The Bluetooth module packages the encoded data according to the Bluetooth protocol using the Bluetooth protocol stack to obtain packaged data. Then, the Bluetooth module transmits the packaged data to its Bluetooth controller via the Bluetooth protocol stack, for example, through the Host Controller Interface (HCI). The Bluetooth module sends the packaged data to the Bluetooth device via the Bluetooth controller, enabling the Bluetooth device to play audio based on the packaged data.
[0101] For example, Figure 6 This is a schematic diagram illustrating a Bluetooth audio playback process provided in an exemplary embodiment of this application. Figure 6As shown, Bluetooth audio playback uses the standard Bluetooth A2DP service. During Bluetooth audio playback, the second processing core 601 sends the second audio data to the first processing core 602. After receiving the second audio data, the first processing core 602 encodes the data using the DSP 603 to obtain encoded data. The DSP 603 then sends the encoded data to the Bluetooth protocol stack 604 of the Bluetooth chip via inter-core communication. The Bluetooth protocol stack 604 packages the encoded data according to the Bluetooth protocol and sends the packaged data to the Bluetooth controller 605 via Bluetooth HCI. The Bluetooth controller 605 sends the packaged data to the Bluetooth device so that the Bluetooth device can play Bluetooth audio based on the packaged data.
[0102] For example, Figure 7 This is a schematic diagram illustrating a Bluetooth audio playback process provided in an exemplary embodiment of this application. Figure 7 As shown, in steps S1-S3, the Bluetooth protocol stack configures Bluetooth audio for the DSP and notifies the DSP to start Bluetooth music playback. In steps S4-S10, the DSP and the Bluetooth protocol stack... Figure 6 The illustrated process executes Bluetooth audio playback to enable the Bluetooth device to play audio. During this process, the Bluetooth protocol stack can instruct the DSP to pause, resume, or stop Bluetooth playback.
[0103] It should be noted that this embodiment mainly uses the example of the system running the second processing core triggering a Bluetooth audio playback command. It is understood that the system running the first processing core can also trigger a Bluetooth audio playback command. In this case, the first processing core obtains the second audio data and executes step 506 as described above. The first processing core can obtain the second audio data through the first system, or it can obtain the second audio data through the Bluetooth module. The process of obtaining the second audio data can be referred to the relevant content above, and will not be repeated here.
[0104] It should be noted that the methods provided in the embodiments of this application can be implemented independently or in combination with other embodiments of this application, such as with... Figure 3 and / or Figure 8 The embodiments shown are implemented in combination, and this application does not limit them.
[0105] In summary, the method provided in this embodiment enables the second processing core to control the Bluetooth chip to transmit Bluetooth audio through the first processing core when the system running the second processing core triggers a Bluetooth audio playback command. Since the first processing core can also control the Bluetooth chip to transmit Bluetooth audio, the system running different processing cores in the electronic device can all support Bluetooth audio playback function.
[0106] Figure 8This is a flowchart illustrating a Bluetooth calling method provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The electronic device shown. For example... Figure 8 As shown, the method includes:
[0107] Step 802: In response to a Bluetooth call command in the system running on the first processing core or the second processing core, the first processing core obtains the downlink signal of the Bluetooth call through the Bluetooth module; the first processing core controls the audio playback device to play the downlink signal; and / or, the first processing core obtains the uplink signal of the Bluetooth call through the microphone; the first processing core controls the Bluetooth module to transmit the uplink signal.
[0108] In some embodiments, the electronic device further includes a Bluetooth module, which is electrically connected to the first processing core, or the Bluetooth module and the first processing core are integrated into a single chip, or the Bluetooth module is integrated into a Bluetooth chip, and the Bluetooth chip is electrically connected to the first processing core. In some embodiments, when the Bluetooth module is electrically connected to the first processing core, the Bluetooth module and the first processing core are connected via I2S; when the Bluetooth module is integrated into the first processing core, the Bluetooth module and the first processing core establish inter-core communication.
[0109] In some embodiments, the electronic device further includes a microphone electrically connected to both the first processing core and the second processing core. In some embodiments, the microphone includes an analog microphone.
[0110] A Bluetooth call command is used to instruct an electronic device to initiate a call via Bluetooth to a Bluetooth device. The Bluetooth device may be the same as or different from the electronic device. For example, the electronic device could be a smartwatch, and the Bluetooth device could be a smartphone. The Bluetooth call command is triggered by a first system running on a first processing core or a second system running on a second processing core. In some embodiments, the Bluetooth call command is triggered by a Bluetooth call operation within the first system running on the first processing core, which is executed within the user interface of the first system, such as by the user of the electronic device. In some embodiments, the Bluetooth call command is triggered by a Bluetooth call operation within the second system running on the second processing core, which is executed within the user interface of the second system, such as by the user of the electronic device. When the Bluetooth call command is triggered by a Bluetooth call operation within the second system running on the second processing core, the second processing core can send a command to the first processing core to initiate a Bluetooth call.
[0111] Downlink signals include the voice signals received by the electronic device during a Bluetooth call, which can be understood as the voice signals received by the Bluetooth device; uplink signals include the voice signals sent by the electronic device during a Bluetooth call, which can be understood as the voice signals sent by the Bluetooth device.
[0112] In some embodiments, for downlink signals: the first processing core acquires the downlink signals received by the Bluetooth device during a Bluetooth call through the Bluetooth controller of the Bluetooth module, and transmits them to the DSP of the first processing core after processing by the Bluetooth protocol stack. The first processing core then controls the PA to drive the speaker to play voice according to the downlink signals through the DSP. For uplink signals: the first processing core acquires the recorded data through the microphone as the uplink signal sent by the Bluetooth device during a Bluetooth call, and then sends the uplink signal to the Bluetooth device through the process in step 506. In some embodiments, during a Bluetooth call, the first processing core also processes the acquired data. The processing procedure can be referred to the relevant content above and will not be repeated here. In some embodiments, echo cancellation is also involved during a Bluetooth call. The echo cancellation procedure can be referred to the relevant content above and will not be repeated here.
[0113] For example, Figure 9 This is a schematic diagram of a Bluetooth call process provided in an exemplary embodiment of this application. Figure 9 As shown, Bluetooth calls are conducted using the standard Bluetooth Hands-Free Profile (HFP) service. In both the Bluetooth calls (Bluetooth phone calls) handled by the second processing core and the Bluetooth calls handled by the first processing core 901, the transmission of voice signals is handled by the first processing core 901. During a Bluetooth call, the second processing core does not need to participate and can even enter a sleep state. For downlink signals in Bluetooth calls: data received by the Bluetooth controller 904 is sent to the DSP902 via inter-core communication. The DSP902 decodes the data and then processes it through the call algorithm and speaker protection algorithm before sending it to the PA903. The call algorithm is used to improve the voice clarity of Bluetooth calls. For uplink signals in Bluetooth calls: data recorded by the microphone is processed and encoded by the DSP902 through the call algorithm, then sent to the Bluetooth controller 904 via inter-core communication, and finally sent by the Bluetooth controller 904 to the Bluetooth device.
[0114] It should be noted that the methods provided in the embodiments of this application can be implemented independently or in combination with other embodiments of this application, such as with... Figure 3 and / or Figure 5 The embodiments shown are implemented in combination, and this application does not limit them.
[0115] In summary, the method provided in this embodiment enables the first processing core to acquire and play the downlink signal of the Bluetooth call through the Bluetooth chip when the system running the first processing core or the second processing core triggers the Bluetooth call command, and / or acquire the uplink signal of the Bluetooth call through the microphone and transmit it through the Bluetooth chip. Therefore, the system running different processing cores in the electronic device can all support the Bluetooth call function.
[0116] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0117] It should be noted that the order of the method steps provided in the embodiments of this application can be appropriately adjusted, and the steps can also be added or removed as appropriate. Any method variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be elaborated further.
[0118] For example, Figure 10 This is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application. In some embodiments, the terminal described above is implemented as an electronic device, such as a wearable device.
[0119] Typically, terminal 1000 includes a processor 1001 and a memory 1002.
[0120] Processor 1001 may include one or more processing cores, such as a quad-core processor, a deca-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0121] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 are used to store at least one instruction, which is executed by the processor 1001 to implement the audio playback method provided in the method embodiments of this application.
[0122] In some embodiments, the terminal 1000 may also optionally include a peripheral device interface 1003 and at least one peripheral device. The processor 1001, memory 1002, and peripheral device interface 1003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, and a power supply 1008.
[0123] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, and this application embodiment does not limit this.
[0124] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0125] Display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1005 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1001 for processing. In this case, display screen 1005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1005, serving as the front panel of terminal 1000; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display screen 1005 may be a flexible display screen, disposed on a curved or folded surface of terminal 1000. Furthermore, display screen 1005 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0126] The camera assembly 1006 is used to acquire images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal 1000, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0127] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1001 for processing, or input to the radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0128] The power supply 1008 is used to power the various components in the terminal 1000. The power supply 1008 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 1008 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0129] In some embodiments, the terminal 1000 further includes one or more sensors 1009. The one or more sensors 1009 include, but are not limited to: an acceleration sensor 1010, a gyroscope sensor 1011, a pressure sensor 1012, an optical sensor 1013, and a proximity sensor 1014.
[0130] Accelerometer 1010 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1000. For example, accelerometer 1010 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1001 can control touchscreen 1005 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1010. Accelerometer 1010 can also be used for games or for acquiring user motion data.
[0131] The gyroscope sensor 1011 can detect the orientation and rotation angle of the terminal 1000. The gyroscope sensor 1011 can work in conjunction with the accelerometer sensor 1010 to collect the user's 3D movements on the terminal 1000. Based on the data collected by the gyroscope sensor 1011, the processor 1001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0132] The pressure sensor 1012 can be disposed on the side bezel of the terminal 1000 and / or on the lower layer of the touch display screen 1005. When the pressure sensor 1012 is disposed on the side bezel of the terminal 1000, it can detect the user's grip signal on the terminal 1000, and the processor 1001 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1012. When the pressure sensor 1012 is disposed on the lower layer of the touch display screen 1005, the processor 1001 can control the operable controls on the UI interface based on the user's pressure operation on the touch display screen 1005. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0133] An optical sensor 1013 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the touch screen 1005 based on the ambient light intensity collected by the optical sensor 1013. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 based on the ambient light intensity collected by the optical sensor 1013.
[0134] The proximity sensor 1014, also known as a distance sensor, is typically located on the front panel of the terminal 1000. The proximity sensor 1014 is used to detect the distance between the user and the front of the terminal 1000. In one embodiment, when the proximity sensor 1014 detects that the distance between the user and the front of the terminal 1000 is gradually decreasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-on state to a screen-off state; when the proximity sensor 1014 detects that the distance between the user and the front of the terminal 1000 is gradually increasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-off state to a screen-on state.
[0135] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on terminal 1000 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0136] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. When the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor of an electronic device, the audio playback method provided in the above-described method embodiments is implemented.
[0137] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the audio playback method provided in the above-described method embodiments.
[0138] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0139] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An electronic device, characterized in that, The electronic device includes at least two processing cores and an audio playback device. The at least two processing cores include a first processing core and a second processing core. The first processing core is used to run a first system, and the second processing core is used to run a second system. The first processing core is used to control the audio playback device, and the second processing core is used to control the audio playback device through the first processing core.
2. The electronic device according to claim 1, characterized in that, The audio playback device includes a driving component and a speaker, wherein the driving component is used to drive the speaker; The first processing core is electrically connected to the driving component, and the driving component is electrically connected to the speaker.
3. The electronic device according to claim 2, characterized in that, The driving component includes a power amplifier (PA); the first processing core and the second processing core, and the second processing core and the PA, are capable of bidirectional communication.
4. The electronic device according to any one of claims 1 to 3, characterized in that, The electronic device also includes a Bluetooth module; Wherein, the Bluetooth module is electrically connected to the first processing core; or, the Bluetooth module and the first processing core are integrated into a single chip; or, the Bluetooth module is integrated into a Bluetooth chip, and the Bluetooth chip is electrically connected to the first processing core.
5. The electronic device according to any one of claims 1 to 3, characterized in that, The first processing core integrates a digital signal processor (DSP).
6. The electronic device according to any one of claims 1 to 3, characterized in that, The electronic device also includes a microphone; The microphone is electrically connected to both the first processing core and the second processing core. The microphone includes an analog microphone, and both the first processing core and the second processing core can access the analog microphone simultaneously.
7. The electronic device according to any one of claims 1 to 3, characterized in that, The first processing core is configured to run a speaker protection algorithm, and the second processing core is configured to run a sound effect algorithm. The performance of the second processing core is stronger than that of the first processing core.
8. An audio playback method, characterized in that, The method is applied to an electronic device as described in any one of claims 1 to 7, the method comprising: In response to an audio playback command in the second system running the second processing core, the second processing core acquires the first audio data; The second processing core transmits the first audio data to the first processing core; The first processing core controls the audio playback device to play audio using the first audio data.
9. The method according to claim 8, characterized in that, The second processing core transmits the first audio data to the first processing core, including: The second processing core processes the first audio data to obtain the first processed data of the first audio data; The second processing core transmits the first processed data to the first processing core; and / or, When the audio playback device includes a driver and a speaker, the first processing core controls the audio playback device to play audio using the first audio data, including: The first processing core processes the first processing data into second processing data and sends the second processing data to the driving component, which then controls the speaker to play audio based on the second processing data.
10. The method according to claim 8 or 9, characterized in that, When the audio playback device includes a driver and a speaker, the method further includes: In response to the audio playback command, the second processing core transmits a playback start notification to the first processing core; The first processing core controls the driver component to start based on the start playback notification.
11. The method according to claim 8 or 9, characterized in that, When the audio playback device includes a driver and a speaker, the method further includes: When the speaker is used to play call audio, the first processing core obtains the audio data returned by the driving component, and the audio data is used by the driving component to control the speaker to play the call audio. The first processing core sends the voice data back to the second processing core, and the voice data is used by the second processing core to perform echo cancellation.
12. The method according to claim 8 or 9, characterized in that, If the electronic device further includes a Bluetooth module, the method further includes: In response to a Bluetooth audio playback command in the second system running the second processing core, the second processing core acquires second audio data; The second processing core transmits the second audio data to the first processing core; The first processing core controls the Bluetooth module to transmit Bluetooth audio through the second audio data.
13. The method according to claim 12, characterized in that, When the first processing core integrates a digital signal processor (DSP), the Bluetooth module includes a Bluetooth controller, and a Bluetooth protocol stack runs in the Bluetooth module; the first processing core controls the Bluetooth module to transmit Bluetooth audio through the second audio data, including: The first processing core encodes the second audio data using the DSP to obtain encoded data; The first processing core transmits the encoded data to the Bluetooth protocol stack via the DSP; The Bluetooth module packages the encoded data according to the Bluetooth protocol through the Bluetooth protocol stack to obtain packaged data; The Bluetooth module transmits the packet data to the Bluetooth controller through the Bluetooth protocol stack; The Bluetooth module sends the packaged data to the Bluetooth device through the Bluetooth controller.
14. The method according to claim 8 or 9, characterized in that, If the electronic device further includes a Bluetooth module and a microphone, the method further includes: In response to a Bluetooth call command in the system running on the first processing core or the second processing core, the first processing core acquires the downlink signal of the Bluetooth call through the Bluetooth module; the first processing core controls the audio playback device to play the downlink signal; and / or, The first processing core acquires the uplink signal of the Bluetooth call through the microphone; the first processing core controls the Bluetooth module to transmit the uplink signal.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one program, which is loaded and executed by a processor to implement the audio playback method as described in any one of claims 8 to 14.
16. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, wherein a processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the electronic device to perform the audio playback method as described in any one of claims 8 to 14.