Audio processing method, chip, electronic device and medium
By dynamically adjusting the amplification factor of the power amplifier during audio playback, the problem of device background noise affecting user experience is solved, achieving the effect of increasing audio loudness at high volumes and reducing background noise at low volumes, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2025-01-10
- Publication Date
- 2026-07-10
AI Technical Summary
During audio playback, while a larger power amplifier (PA) amplification factor increases the audio loudness, it also increases the device noise floor, affecting the user experience, especially at low volumes.
By using a larger PA amplification factor when playing at high volume and a smaller PA amplification factor when playing at low volume, combined with a speaker protection algorithm and application status to dynamically adjust the PA amplification factor, the audio output effect is improved and the impact of device noise is reduced without damaging the speaker.
Without altering the device system, the PA amplification factor is dynamically adjusted to balance audio output performance and device noise floor, thereby improving user experience and reducing hardware dependence and cost.
Smart Images

Figure CN122372898A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to an audio processing method, chip, electronic device and medium. Background Technology
[0002] The external speaker function of electronic devices can be achieved using a power amplifier (PA) system that drives a loudspeaker. The loudspeaker (or horn) is a transducer that converts electrical signals into sound signals and outputs them; its performance has a significant impact on the sound quality of the device.
[0003] Feasibly, with the volume remaining constant, using a larger PA amplification factor will result in a correspondingly louder output of the audio signal from the speaker, thus helping to maximize the speaker's performance. However, a larger PA amplification factor will lead to an increase in the device's noise floor, which can easily affect the user experience. Summary of the Invention
[0004] This application provides an audio processing method, chip, electronic device, and medium that can balance audio playback effect and device noise floor, reduce the adverse effects of device noise floor on user experience, and help bring users a good audio playback experience.
[0005] In a first aspect, embodiments of this application provide an audio processing method, including: acquiring a first volume of one or more first applications, and acquiring the state of the first applications; the first volume of the first applications is obtained based on the system volume of the electronic device and the application volume of the first applications; determining whether the electronic device meets target conditions, the target conditions including: there is at least one first application with a first volume greater than a volume threshold and in a playback state; if the electronic device meets the target conditions, controlling the amplification factor of the power amplifier in the electronic device to a first factor; if the first volume of each first application is less than the volume threshold and in a playback state, controlling the amplification factor of the power amplifier to a second factor, the first factor being greater than the second factor.
[0006] By defining target conditions including at least one first application where the first volume is greater than the volume threshold and the application is in a playback state, a larger PA amplification factor can be used when playing at high volume to improve the audio output effect without the user being aware of the device noise floor, thereby balancing the audio output effect and the device noise floor problem.
[0007] By limiting the PA amplification factor to a smaller value when playing each application at a low volume, the significant background noise of the device can be avoided from affecting the user experience.
[0008] The embodiments of this application can identify whether the user's usage scenario is a high-volume playback scenario through a software path without changing the device system, so as to dynamically adjust the amplification factor of the PA as needed. This can address the impact of device background noise on user experience and help improve speaker performance.
[0009] Optionally, the number of first applications is one; the power amplifier is in operation for a period of time during the pause playback of the first application (e.g., application y); the audio processing method further includes: if the first application is in the pause playback state, controlling the amplification factor of the power amplifier to be a third factor, where the first factor is greater than the third factor.
[0010] By limiting the PA amplification factor to a smaller value when y pauses playback, the device noise floor can be avoided from affecting the user experience.
[0011] Optionally, obtaining the state of the first application includes: obtaining multiple frames of audio signals output by the first application; wherein the first application is used to output multiple frames of mute signals when a pause playback request is received; if all multiple frames of audio signals are mute signals, it is determined that the first application is in a pause playback state; if not all multiple frames of audio signals are mute signals, it is determined that the first application is in a playback state.
[0012] This helps to accurately determine the application status.
[0013] Optionally, the audio processing method further includes: calculating the root mean square of the signal amplitude of the multi-frame audio signal; and determining whether the multi-frame audio signal is a silent signal based on the root mean square and the amplitude threshold.
[0014] The signal energy of a multi-frame audio signal can be obtained by calculating the root mean square of the signal amplitude, thereby supporting accurate judgment of the application status.
[0015] Optionally, obtaining the state of the first application includes: when running the audio playback page of the first application, detecting whether the first application outputs an audio signal; wherein the first application is used to stop outputting the audio signal when it receives a pause playback request; if the first application does not output an audio signal, it is determined that the first application is in a pause playback state; if the first application outputs an audio signal, it is determined that the first application is in a playback state.
[0016] This helps to accurately determine the application status.
[0017] Optionally, the target condition also includes that the speaker protection algorithm in the electronic device is effective; the audio processing method further includes: if the speaker protection algorithm fails, then controlling the amplification factor of the power amplifier to be the fourth factor, where the first factor is greater than the fourth factor.
[0018] By limiting the target conditions to include the effectiveness of the speaker protection algorithm, damage to the speaker due to the use of a large PA amplification factor can be avoided when the algorithm fails.
[0019] Optionally, the number of power amplifiers in the electronic device is not less than a number threshold, and the number threshold is greater than 1.
[0020] By dynamically adjusting the amplification factor of the PA in a multi-PA, multi-speaker electronic device, the audio output performance of the electronic device can be significantly improved.
[0021] Secondly, embodiments of this application provide an audio processing apparatus, comprising: an acquisition module, configured to acquire a first volume of one or more first applications, and acquire the state of the first applications; the first volume of the first applications is obtained based on the system volume of the electronic device and the application volume of the first applications; a determination module, configured to determine whether the electronic device meets target conditions, the target conditions including: at least one first application having a first volume greater than a volume threshold and being in a playback state; and a control module, configured to, if the electronic device meets the target conditions, control the amplification factor of the power amplifier in the electronic device to a first factor; and if the first volume of each first application is less than a volume threshold and is in a playback state, control the amplification factor of the power amplifier to a second factor, wherein the first factor is greater than the second factor.
[0022] Thirdly, embodiments of this application provide a chip, including: a processor, which is configured to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method as described in any of the first aspects.
[0023] Fourthly, embodiments of this application provide an electronic device, which includes one or more memories for storing computer program instructions and one or more processors, wherein when the computer program instructions are executed by one or more processors, the electronic device is triggered to perform the method as described in any of the first aspects.
[0024] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method as described in any of the first aspects.
[0025] In a sixth aspect, embodiments of this application provide a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method as described in any of the first aspects.
[0026] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description
[0027] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.
[0028] Figure 1a A schematic diagram illustrating an audio processing procedure provided in an embodiment of this application;
[0029] Figure 1b A schematic diagram illustrating another audio processing procedure provided in an embodiment of this application;
[0030] Figure 1c A schematic diagram illustrating yet another audio processing procedure provided in an embodiment of this application;
[0031] Figure 2 A schematic diagram illustrating the dynamic control of amplification factor based on algorithm effectiveness in an electronic device, as provided in an embodiment of this application;
[0032] Figure 3 A schematic diagram illustrating another electronic device based on algorithm effectiveness for dynamically controlling the amplification factor, as provided in an embodiment of this application;
[0033] Figure 4 A schematic diagram illustrating the dynamic control of amplification factor based on target conditions in an electronic device according to an embodiment of this application;
[0034] Figure 5a This application provides a schematic diagram of pausing audio playback as an embodiment of the present application.
[0035] Figure 5b A schematic diagram illustrating another application for pausing audio playback, provided as an embodiment of this application;
[0036] Figure 6 A schematic diagram illustrating another electronic device provided in this application that dynamically controls the amplification factor based on target conditions;
[0037] Figure 7 A schematic diagram illustrating another electronic device for dynamically controlling the amplification factor based on target conditions, provided in an embodiment of this application;
[0038] Figure 8 A flowchart illustrating the dynamic control of amplification factor in an electronic device, as provided in this application embodiment;
[0039] Figure 9 This is a schematic diagram of a structure for dynamically controlling the amplification factor of an electronic device, provided in an embodiment of this application.
[0040] Figure 10 A flowchart illustrating an audio processing method provided in an embodiment of this application;
[0041] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0042] Figure 12 This is a schematic diagram of the software components of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0044] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0045] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0046] It should be understood that the term "at least one" as used in this document refers to one or more, and "more than one" refers to two or more. The term "and / or" as used in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. A and B can be singular or plural. Additionally, the character " / " in this document generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0047] It should be understood that although the terms "first," "second," etc., may be used to describe the set thresholds in the embodiments of this application, these set thresholds should not be limited to these terms. These terms are only used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of this application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0048] The external speaker function of electronic devices can be implemented using a power amplifier (PA) system that drives a loudspeaker. The loudspeaker is a transducer that converts electrical signals into sound signals and outputs them; its performance has a significant impact on the sound quality of the device.
[0049] For example, the aforementioned electronic device may be a PC (Personal Computer), a smartphone, a tablet computer, etc.
[0050] For example, the PA mentioned above can be either an analog PA or a digital PA. Compared to a digital PA, an analog PA can have the advantage of low cost.
[0051] Practically, the OS path in an electronic device can include an audio path (or audio playback path). An OS path can represent a path or channel within the operating system (OS) used for data transmission and signal processing. An audio path can represent the path of audio signal transmission within audio components to support the audio playback function of the electronic device.
[0052] For example, the operating system of an electronic device can be a Windows operating system, an Android operating system, etc.
[0053] In one embodiment, such as Figure 1a As shown, the electronic device may include at least a processing chip 101, a codec 102, an analog power amplifier (i.e., an analog PA) 103, and a speaker 104.
[0054] Alternatively, the processing chip 101 can be an Intel chip. Audio signals can be transmitted between the processing chip 101 and the codec 102 via the HAD (High Definition Audio) protocol. The HAD protocol can be used to support high-quality audio requirements.
[0055] The codec 102 is used to convert between analog and digital signals. The codec 102 may include Line out L / R interfaces; the Line out L interface can be connected to the left channel output, and the Line out R interface can be connected to the right channel output.
[0056] Conveniently, the processing chip 101 can run an application program and transmit the audio signal output by the application program to the codec 102 for digital-to-analog conversion. The analog power amplifier 103 can amplify the audio signal output by the codec 102 by a certain amplification factor and output the amplified audio signal to the speaker 104 so that the speaker 104 can play audio.
[0057] In another embodiment, such as Figure 1b As shown, the electronic device may include at least an application 105, an audio processing module 106, a codec 102, a controller 107, an analog power amplifier 103, and a speaker 104.
[0058] It is feasible to use 105 as a media player provided by the operating system, or as a third-party media player, such as third-party music software or third-party video software.
[0059] For example, the audio processing module 106 can be an Audio Processing Object (APO). The APO can provide software-based digital signal processing for Windows audio streams.
[0060] In one example, APO's Windows audio processing may include first performing Stream Effect (SFX) or Mode Effect (MFX) processing, and then performing Endpoint Effect (EFX) processing. SFX and MFX can both be used for audio rendering, while EFX can be used to protect speakers.
[0061] Practically, EFX may include speaker protection algorithms.
[0062] For example, speaker protection algorithms may include DC protection, overload protection, and power-on delay protection algorithms.
[0063] Feasibly, the speaker protection algorithm can be a feedforward protection algorithm.
[0064] In one example, the EFX in APO can include the AwinicAPO audio algorithm as a speaker protection algorithm. The AwinicAPO algorithm can be used to improve PC audio performance. Thus, the PC audio data stream output by application 105, after being processed by the AwinicAPO algorithm, can be passed to codec 102.
[0065] Conveniently, controller 107 can be an embedded controller (EC) in a PC product. Controller 107 can control the amplification factor of analog power amplifier 103, so that analog power amplifier 103 amplifies the audio signal output from codec 102 according to the controlled amplification factor. Then, analog power amplifier 103 can output the amplified audio signal to speaker 104, so that speaker 104 can play audio.
[0066] Conveniently, the controller 107 can control the analog power amplifier 103 to have a fixed amplification factor, or it can dynamically adjust the amplification factor of the analog power amplifier 103.
[0067] It is feasible for electronic devices to have one speaker or multiple speakers. For example, mobile phones typically have one or two speakers, while PCs can have more (such as six or eight). Based on the combined loudness of multiple speakers, increasing the number of speakers can correspondingly increase the loudness of the sound output by the electronic device, thereby helping to provide users with a high-quality audio playback experience.
[0068] In one feasible implementation, the electronic device may have multiple PAs and multiple speakers, with one PA used to drive one or two speaker outputs.
[0069] like Figure 1c As shown, an electronic device can have n (n>1) analog PAs and 2n speakers, with each PA driving two corresponding speakers. Based on this, a codec can process the audio signal output from a player (such as a third-party playback application) and output the processed audio signal to each analog PA. Each analog PA can amplify the input audio signal and output the amplified audio signal to the two corresponding speakers, thus enabling the speakers to output audio signals and achieve audio playback.
[0070] With the volume remaining constant, using a higher PA amplification factor results in a louder output of the audio signal from the speaker, thus maximizing the speaker's performance. Based on this, it is feasible to increase the PA amplification factor without changing the volume, thereby amplifying the audio signal and increasing the speaker's output loudness, ultimately maximizing the speaker's performance and providing users with a superior audio playback experience.
[0071] In one feasible implementation, when the PA has a magnification factor of 20, the speaker output power can be 5.5V, and the audio loudness is relatively large; when the PA has a magnification factor of 10, the speaker output power can be 2.83V, and the audio loudness is relatively small.
[0072] In one feasible implementation, the electronic device can dynamically control the amplification factor of the PA based on the effectiveness of the speaker protection algorithm. If the speaker protection algorithm is effective (or in place, operating normally, etc.), the PA can be controlled to have a higher amplification factor to maximize the audio output performance without damaging the speaker. Conversely, if the speaker protection algorithm fails (or is not in place, operating abnormally, etc.), the PA can be controlled to have a lower amplification factor to prevent damage to the speaker (such as a burned-out speaker voice coil).
[0073] For example, an electronic device can detect whether the speaker protection algorithm is operating normally. If the algorithm is operating normally, it can be determined that the algorithm is effective. If the algorithm is operating abnormally, it can be determined that the algorithm is ineffective.
[0074] See one example. Figure 2 The electronic device may include an application 201, a cascaded audio processing module 202, a speaker protection algorithm 203, an analog power amplifier (i.e., an analog PA) 204, and a speaker 205. Based on this, the audio signal output by the application 201 can be processed sequentially by the cascaded audio processing module 202, the speaker protection algorithm 203, and the analog power amplifier 204 before being transmitted to the speaker 205 for audio playback.
[0075] Conveniently, the cascaded audio processing module 202 can be used to perform the aforementioned SFX or MFX processing.
[0076] like Figure 2 As shown, while processing the audio signal, the electronic device can also determine whether the speaker protection algorithm 203 is effective. If effective, it controls the amplification factor of the analog PA to a larger factor of 20; if ineffective, it controls the amplification factor of the analog PA to a smaller factor of 10. Thus, the analog PA amplifies the audio signal based on the controlled amplification factor, so that the audio loudness of the speaker 205 is higher when the speaker protection algorithm 203 is effective, and lower when the speaker protection algorithm 203 is ineffective.
[0077] In other examples, the electronic device may also control the amplification factor of the simulated PA to a larger feasible factor other than 20 when the algorithm is effective, and control the amplification factor of the simulated PA to a smaller feasible factor other than 10 when the algorithm fails, without limitation.
[0078] exist Figure 2 In one feasible implementation of the example shown, the electronic device may include an APO and an EC, which can be executed by the APO. Figure 2 The algorithm validity determination operation shown is performed by EC. Figure 2 The operation of controlling the PA amplification factor is shown.
[0079] See another example. Figure 3 The electronic device may include a speaker protection algorithm 301, a controller (such as EC) 302, and a PA 303. Based on this, the audio signal output by the application can be processed by the speaker protection algorithm 301, amplified by the PA 303, and then transmitted to the speaker for audio playback.
[0080] like Figure 3As shown, while processing audio signals, the electronic device can also monitor whether the speaker protection algorithm 301 is effective. If it is effective, the registry key value MEC_STATE is set to 1; if it is invalid, the registry key value MEC_STATE is set to 0, and the set value of MEC_STATE is sent to the controller 302.
[0081] The controller 302 can control the amplification factor of the PA to a low factor (e.g., 10x) by pulling the GPIO signal connected to the PA pin low when it receives MEC_STATE = 0, and can control the amplification factor of the PA to a high factor (e.g., 20x) by pulling the GPIO signal connected to the PA pin high when it receives MEC_STATE = 1. GPIO (General-purpose input / output) refers to general-purpose input / output.
[0082] Based on this, PA 303 amplifies the audio signal processed by speaker protection algorithm 301 according to the controlled amplification factor, so that the audio loudness of the speaker is higher when speaker protection algorithm 301 is effective, and lower when speaker protection algorithm 301 fails.
[0083] exist Figure 3 In one feasible implementation of the example shown, the electronic device may include an APO, which can be executed by the APO. Figure 3 The algorithm validity check and registry key setting operations are shown in the diagram.
[0084] As can be seen from the above, by dynamically controlling the amplification factor of PA based on the effectiveness of the speaker protection algorithm, both the audio playback effect and the risk of speaker damage can be taken into account. On the basis of ensuring that the speaker is not damaged, the audio playback volume can be increased as much as possible, so as to improve the audio playback effect.
[0085] However, when amplifying signals, a power amplifier (PA) typically amplifies both the audio signal and the PA's inherent noise floor indiscriminately. Therefore, increasing the PA's amplification factor not only amplifies the audio signal more significantly but also amplifies the device's noise floor to a greater extent, leading to increased noise levels. This can negatively impact the user experience. For example, in low-volume playback scenarios using analog PAs for signal amplification, an excessively high PA amplification factor will result in a correspondingly high noise floor, even though the actual audio output volume may not be very high. In such cases, the user will perceive the noise floor.
[0086] Furthermore, based on the accumulative nature of the noise floor signals from multiple PAs and the superimposed external amplification effect of multiple speakers, if the amplification factor of the PA is large, the noise floor problem of devices with multiple PAs and multiple speakers will be more obvious compared to devices with fewer PAs and fewer speakers, and the user acceptance will be lower.
[0087] The loudness of the external audio output is affected by the PA amplification factor and the initial volume (which depends on the system volume and the application volume). Specifically, with the initial volume remaining constant, the higher the PA amplification factor, the louder the external audio output; conversely, with the PA amplification factor remaining constant, the higher the initial volume, the louder the external audio output.
[0088] The system volume refers to the volume of the operating system, while the application volume refers to the volume of a specific application. Users can control the system volume and application volume as needed, and can also set different application volumes for different applications.
[0089] Specifically, when the system volume remains constant and is not zero, the first volume is positively correlated with the application volume; when the application volume remains constant and is not zero, the first volume is positively correlated with the system volume. If the system volume and / or application volume is zero, then the first volume is zero.
[0090] Unlike the loudness of external audio speakers, the noise floor of a power amplifier (PA) device is affected by the PA amplification factor, but not by the first volume control; that is, the first volume level is independent of the device's noise floor. Specifically, the higher the PA amplification factor, the greater the device's noise floor.
[0091] Thus, when the PA amplification factor remains constant, the device noise floor can remain constant, while the audio output loudness can increase with the increase of the initial volume. The greater the audio output loudness, the greater the difference between the audio output loudness and the device noise floor, making the device noise floor less noticeable.
[0092] When the amplification factor of the PA is large, the noise floor of the device is correspondingly large. However, if the electronic device plays audio at a high volume, the difference between the audio output volume and the noise floor of the device is large, so the user may not perceive the noise floor. On the other hand, if the electronic device plays audio at a low volume, the difference between the audio output volume and the noise floor of the device is small, so the user will perceive the noise floor clearly.
[0093] It is evident that if the PA amplification factor is large, the device noise will be more noticeable at low volumes compared to high volumes, making it less acceptable to users, especially in relatively quiet environments. Therefore, a larger PA amplification factor can be used at high volumes to balance audio output quality with device noise, providing users with a better audio output experience.
[0094] When the power amplifier (PA) has a low amplification factor, the device's noise floor is low, meaning that even when the electronic device plays audio at low volumes, the user will not perceive the noise floor. Therefore, a lower PA amplification factor can be used when playing audio at low volumes to avoid noticeable noise floor that could negatively impact the user experience.
[0095] In one embodiment of this application, the electronic device can dynamically control the amplification factor of the power amplifier (PA) based on whether the user's usage scenario involves high-volume playback. Specifically, if the user's usage scenario involves high-volume playback, the PA can be controlled to have a larger amplification factor to maximize the audio output while ensuring that the user is unaware of the device's background noise. Conversely, if the user's usage scenario involves low-volume playback, the PA can be controlled to have a smaller amplification factor to avoid the user being able to clearly perceive the device's background noise, thus affecting the user experience.
[0096] Feasibly, the user's usage scenario can be determined as a high-volume scenario by comparing the magnitude of the first volume and the volume threshold. For example, the volume threshold can be 10% of the maximum value of the first volume.
[0097] In one embodiment, if the first volume is greater than (or not less than) a volume threshold, the user's usage scenario is a high volume scenario; otherwise, it is a low volume scenario.
[0098] It is feasible to determine whether an application is in a playback state based on the audio signal it outputs.
[0099] In one embodiment, see Figure 4 The electronic device may include APO 401, Windows system interface 402, controller (e.g., EC) 403, and PA 404. Based on this, controller 403 can control the amplification factor of PA 404 so that PA 404 amplifies the audio signal output by the application based on the controlled amplification factor, and the amplified audio information can be transmitted to the speaker for audio playback.
[0100] like Figure 4 As shown, while processing audio signals, the electronic device can also determine whether it meets target conditions. Target conditions include at least a user scenario of high-volume playback. If the target conditions are met, the amplification factor of PA404 is controlled to be high (e.g., 20x). If the target conditions are not met due to a user scenario of low-volume playback, the amplification factor of PA404 is controlled to be low (e.g., 10x).
[0101] Feasibly, if the electronic device is currently running an audio playback application (i.e., an application that supports audio playback), then a low-volume playback scenario can be a scenario where the first volume of the audio playback application is less than (or not greater than) a volume threshold, and the audio playback application is in a playback state. Here, the audio playback application can be any audio playback application on the electronic device.
[0102] Thus, during audio playback, PA 404 can amplify the audio signal based on the controlled amplification factor to increase the audio loudness in high-volume scenarios to improve speaker performance, while reducing the device noise floor in low-volume scenarios to avoid significant device noise affecting the user experience.
[0103] like Figure 4 As shown, the volume detection module 4011 in APO 401 can be used to detect the first volume and output the detected first volume through the Windows system interface 402 so that relevant modules can judge the user's usage scenario accordingly.
[0104] exist Figure 4 In one feasible implementation of the illustrated embodiment, the internal functional module of the APO can determine whether the electronic device meets the target conditions.
[0105] Figure 4 The embodiments shown improve audio output by using a larger amplification factor in high-volume playback scenarios, while ensuring the user is unaware of the device's background noise. Conversely, they avoid noticeable background noise that could negatively impact the user experience by using a smaller amplification factor in low-volume playback scenarios.
[0106] Figure 4 The illustrated embodiment can identify whether the user's usage scenario is a high-volume playback scenario through a software path without changing the device system, and dynamically adjust the PA's amplification factor as needed. This can address the impact of device noise floor issues on the user experience and help improve speaker performance. Furthermore, since the device noise floor issue can be addressed through a software path, the solution is largely free from hardware process limitations, reducing reliance on hardware and lowering costs.
[0107] It is feasible for some applications (such as application x) to start continuously outputting audio signals when the user requests to start playback, and to stop outputting audio signals when the user requests to pause playback, until the user requests to continue playback (i.e., requests to end the pause). In other words, application x may not output audio signals during the pause playback period.
[0108] Feasibly, during the pause of application x, the audio path in the electronic device may not exist (e.g., the audio path is disconnected), so that both the PA and the speaker are in a power-off and non-working state. During the normal playback of application x, the audio path in the electronic device may exist (e.g., the audio path is connected), so that both the PA and the speaker are in a power-on and working state.
[0109] It is feasible that the aforementioned application x can be the system media player.
[0110] See one feasible example. Figure 5a A user can request to start playback at time t0, request to pause playback at time t1, and request to end the pause and resume playback at time t2. Application x can then start outputting audio signals at time t0, pause outputting audio signals at time t1, and end the pause at time t2 to resume outputting audio signals.
[0111] The period from time t0 to t1 and after time t2 is the normal playback period of the application. During this period, application x can continuously output audio signals (specifically, non-zero data), and the electronic device has an audio path during this period, causing both the PA and the speaker to work. Thus, the PA, which is in working condition, can amplify the audio signal output by application x, and then the amplified audio signal is output by the speaker.
[0112] The period from time t1 to time t2 is the time during which the application pauses playback. During this period, the application x does not output audio signals, and there is no audio path for the electronic device, so that the PA and the speaker do not work.
[0113] Zero data indicates that the audio sample value of the audio signal is 0, while non-zero data indicates that the audio sample value of the audio signal is not 0.
[0114] In one embodiment of this application, the electronic device can dynamically control the amplification factor of the PA based on the volume level when application x is in playback mode. Specifically, if the first volume is higher than or equal to a volume threshold, the amplification factor of the PA is controlled to be high; if the first volume is lower than the volume threshold, the amplification factor of the PA is controlled to be low.
[0115] During the pause playback period of application x, there may be no audio path in the electronic device; the AP and speaker are not working, so the speaker does not output and there is no device noise floor issue. Thus, when application x pauses playback, the electronic device can be inactive, without dynamically controlling the amplification factor of the PA.
[0116] In this way, electronic devices can balance audio output quality and device noise floor issues when using a large PA amplification factor.
[0117] In another embodiment of this application, the electronic device can dynamically control the amplification factor of the PA by combining the volume level and the effectiveness of the speaker protection algorithm when application x is in playback mode. Specifically, if the first volume is higher than or equal to the volume threshold and the speaker protection algorithm is effective, the amplification factor of the PA is controlled to be high; if the first volume is lower than the volume threshold and / or the speaker protection algorithm fails, the amplification factor of the PA is controlled to be low.
[0118] In this way, electronic devices can balance audio output quality, device noise floor issues, and speaker damage risk when using a large PA amplification factor.
[0119] It is feasible for some applications (such as application y) to start continuously outputting audio signals when the user requests to start playback, and to continue outputting a specific set of audio signals, namely multi-frame silence signals, when the user requests to pause playback, and then stop outputting audio signals until the user requests to continue playback. That is, application y can still output audio signals in the early stage of pausing playback.
[0120] Feasibly, during the initial stage of paused playback in application y, the audio path in the electronic device can exist, so that both the PA and the speaker are powered on and working. During the later stage of paused playback in application y, the audio path in the electronic device can be absent, so that both the PA and the speaker are powered off and not working. During normal playback of application y, the audio path in the electronic device can exist, so that both the PA and the speaker are powered on and working.
[0121] Feasibly, the aforementioned application y can be a third-party media player, such as a third-party media player running on the Windows operating system or the Android operating system.
[0122] See one feasible example. Figure 5b The user can request to start playback at time t0, request to pause playback at time t1, and request to end the pause and resume playback at time t2. Then the application y can start outputting audio signals at time t0, start outputting a specific set of 38 frames of silence signals at time t1, then pause the output of audio signals (i.e., at time ta), and end the pause at time t2 to resume the output of audio signals.
[0123] The period from time t0 to t1 and after time t2 is the normal playback period of the application. During this period, application y can continuously output audio signals (specifically, non-zero data), and the electronic device has an audio path during this period, causing both the PA and the speaker to work. Thus, the PA can amplify the audio signal output by application y, and then the amplified audio signal is output by the speaker.
[0124] The period from time t1 to time tb is the initial stage of the application pausing playback (e.g., 25 seconds). During this period, the application y first outputs 38 frames of mute signal (specifically, zero data), then pauses the output of audio signal, and the electronic device maintains an audio path during this period, so that both PA and speaker are working.
[0125] The period from time tb to time t2 is the later stage of the application's paused playback. During this period, the application does not output audio signals, and there is no audio path for the electronic device, so the PA and speaker are not working.
[0126] In one embodiment, the electronic device can detect whether the application is paused based on the above 38 frames of mute signal, and time ta can be the time when the electronic device detects that the application is paused.
[0127] In other examples, the duration of the initial phase of the application's pause playback can be any feasible duration other than 25 seconds, and there is no limitation on this.
[0128] In other examples, the number of frames for a set of silence signals can be any feasible number of frames other than 38 frames, and there is no limitation on this.
[0129] Figure 5b In the example shown, time t2 is later than time tb, so during the pause period of y, the audio path exists only in the early stage of the pause. In other examples, time t2 may be earlier than time tb, in which case the audio path exists throughout the pause period of y.
[0130] Because application y outputs multiple frames of silence signals before stopping audio output during the initial pause phase of playback, there is no audio loudness during this initial phase. Since the speaker is active during this initial phase, it can output a device noise floor signal amplified by the PA, resulting in device noise floor loudness during this phase. Therefore, if the AP uses a high amplification factor during the pause phase of application y, it will lead to significant device noise floor in the speaker output, affecting the user experience. To avoid this problem, in one embodiment of this application, the electronic device can dynamically control the PA amplification factor based on the volume and whether application y is paused while running application y.
[0131] Specifically, if the initial volume is higher than or equal to the volume threshold, and playback is normal under application y, the PA can be controlled to have a larger amplification factor. This maximizes the audio output loudness while ensuring the user is unaware of the device's background noise, thereby improving the audio output effect. If the initial volume is lower than the volume threshold, the PA can be controlled to have a smaller amplification factor to avoid noticeable device background noise at low volumes, which could negatively impact the user experience. If playback is paused under application y, the PA can be controlled to have a smaller amplification factor to prevent the user from clearly perceiving device background noise during the paused playback period, thus avoiding any negative impact on the user experience.
[0132] In one embodiment, see Figure 6 The electronic device may include an APO 601, a pause / playback detection module 602, a controller (such as an EC) 603, and a PA 604. Based on this, the controller 603 can control the amplification factor of the PA 604, so that the PA 604 amplifies the audio signal output by the application based on the controlled amplification factor, and the amplified audio information can be transmitted to the speaker for audio playback.
[0133] like Figure 6 As shown, while processing audio signals, the electronic device can also determine whether it meets target conditions. These target conditions include at least a high-volume playback scenario. If the target conditions are met, the amplification factor of PA604 is controlled to be high (e.g., 20x). If the user scenario is low-volume playback, the amplification factor of PA404 is controlled to be low (e.g., 10x). Similarly, if the audio playback application is application y, and playback is paused due to application y, thus failing to meet the target conditions, the amplification factor of PA404 is also controlled to be low (e.g., 10x).
[0134] Thus, during the pause playback period of application y, if PA604 is in working state (e.g.) Figure 5b If the noise level is between time ta and time tb, the noise signal of the device can be amplified by a small amplification factor so that the noise level during the pause of the application y is as small as possible, so as to avoid the device noise being obvious and affecting the user experience.
[0135] Figure 6 In the illustrated embodiment, if the audio playback application is application x, and the target condition is not met because application x pauses playback, no operation is required to dynamically control the amplification factor of PA.
[0136] like Figure 6As shown, the audio signal detection module 6011 in APO 601 can be used to detect the audio signal output by the application and send the detected audio signal to the pause playback detection module 602 to detect whether the application has paused playback. For example, if the application outputs 38 frames of silence signal, it can be determined that the application is application y, and application y is paused playback.
[0137] exist Figure 6 In one feasible implementation of the illustrated embodiment, the internal functional module of the APO can determine whether the electronic device meets the target conditions.
[0138] Figure 6 The embodiments shown improve the audio output by using a larger amplification factor in high-volume playback scenarios, while ensuring that the user is unaware of the device's background noise. By using a smaller amplification factor in low-volume playback scenarios, the user can avoid noticeable device background noise that could affect the user experience. Furthermore, by using a smaller amplification factor when app y pauses playback, the user can avoid being able to clearly perceive device background noise during the pause period, thus preventing any impact on the user experience.
[0139] also, Figure 6 The embodiment shown can identify whether the user's usage scenario is a high-volume playback scenario through a software path without changing the device system, and dynamically adjust the amplification factor of the PA as needed to deal with the impact of device noise floor on user experience, and help improve speaker performance.
[0140] In another embodiment of this application, the electronic device can dynamically control the amplification factor of the PA while running application y, taking into account the volume level, whether application y is paused, and the effectiveness of the speaker protection algorithm. Specifically, if the first volume is higher than or equal to the volume threshold, application y is playing normally, and the speaker protection algorithm is effective, the amplification factor of the PA is controlled to be high; if any one of the following is true: the first volume is lower than the volume threshold, application y is paused, or the speaker protection algorithm is ineffective, the amplification factor of the PA is controlled to be low.
[0141] In this way, electronic devices can balance the audio output at high volumes, the background noise of the device when pausing playback, and the risk of speaker damage when using a large PA amplification factor.
[0142] See one example. Figure 7 The electronic device can utilize (application y) 701, cascaded audio processing module 702, speaker protection algorithm 703, and PA 704. Based on this, the audio signal output by application 701 can be processed sequentially by cascaded audio processing module 702, speaker protection algorithm 703, and PA 704 before being transmitted to the speaker for audio playback.
[0143] like Figure 7 As shown, while processing audio signals, the electronic device can also determine whether it meets target conditions. These target conditions include three sub-conditions: high volume (e.g., the first volume is greater than the volume threshold), no pause playback in application y, and a valid protection algorithm. If the target conditions are met (i.e., each sub-condition is met), the amplification factor of PA 704 is controlled to be high (e.g., 20x). If the target conditions are not met (i.e., at least one sub-condition is not met), the amplification factor of PA 704 is controlled to be low (e.g., 10x).
[0144] Figure 7 The illustrated embodiment can identify user scenarios through software pathways without changing the device system, and dynamically adjust the PA's amplification factor as needed to address device noise floor issues. It can also obtain the effectiveness of protection algorithms through software pathways and dynamically adjust the PA's amplification factor as needed, thus ensuring that the speaker is not damaged.
[0145] In one feasible implementation, when the electronic device is running application y, the process of dynamically controlling the PA amplification factor by combining the volume, whether application y is paused, and the effectiveness of the speaker protection algorithm may include the following steps 801 to 807.
[0146] Step 801: Determine if application y has paused playback. If yes, proceed to step 806; otherwise, proceed to step 802.
[0147] Based on the audio signal output by application y, it can be determined whether application y should pause playback. If playback is paused, the amplification factor of PA can be controlled to a low factor. If playback is normal, it is necessary to further determine whether the amplification factor of PA can be controlled to a high factor.
[0148] Step 802: Determine if the volume is high. If yes, proceed to step 803; otherwise, proceed to step 806.
[0149] Feasibly, the user's usage scenario can be determined by comparing the first volume level with the volume threshold. If it is a low volume scenario, the PA's amplification factor can be controlled to be low. If it is a high volume scenario, it is necessary to further determine whether the PA's amplification factor can be controlled to be high.
[0150] Step 803: Determine if the protection algorithm is effective. If it is, proceed to step 804; otherwise, proceed to step 806.
[0151] Feasibly, the effectiveness of the speaker protection algorithm can be determined based on its operation. If it fails, the PA's amplification factor can be controlled to a low factor. If it is effective, the PA's amplification factor can be controlled to a high factor.
[0152] Step 804: Set the identifier to 1 and proceed to step 805.
[0153] For example, the identifier can be the registry key value MEC_STATE mentioned above. The amplification factor of PA can be controlled by setting the value of the identifier.
[0154] Step 805: Control the magnification to 20x.
[0155] Step 806: Set the identifier to 1 and proceed to step 807.
[0156] Step 807: Control the magnification to 10x.
[0157] It is feasible for the identifier to take other feasible values, and there are no restrictions on this.
[0158] Alternatively, the magnification factor of PA can be other feasible factors, and there is no limitation on this.
[0159] Unlike Figure 8 In the illustrated embodiment, the electronic device sequentially determines whether playback should be paused, whether the volume should be increased, and whether the protection algorithm is effective. In other feasible embodiments, the electronic device may use other feasible order of judgment, which is not limited.
[0160] In one embodiment of this application, when the electronic device detects that the speaker protection algorithm has failed, it can obtain the failure type. If the obtained failure type indicates that the speaker protection algorithm has failed due to the absence of the speaker protection algorithm configuration file (e.g., the user accidentally deleted the configuration file), then a repair process can be performed.
[0161] For example, the repair process may include reinstalling the configuration file, such as reinstalling it based on a backup configuration file, or outputting a prompt message to remind and guide the user to reinstall the configuration file.
[0162] Reinstalling the configuration file can resolve the issue of the protection algorithm failing due to user accidental deletion of the configuration file, thus preventing the use of a larger PA amplification factor.
[0163] In one embodiment of this application, see [link to embodiment]. Figure 9 The electronic device may include an application 901, a cascaded audio processing module 902, a speaker protection algorithm 903, an algorithm operation status monitoring module 904, an algorithm validity monitoring module 905, an audio signal detection module 906, an audio signal processing module 907, a pause / playback detection module 908, a volume signal detection module 909, a high volume detection module 910, a judgment module 911, a controller (e.g., EC) 912, and a power amplifier 913.
[0164] In one embodiment, the electronic device includes an APO, and the APO may include the cascaded audio processing module 902 to the judgment module 911 described above.
[0165] like Figure 9 As shown, the audio information output by application 901 can be processed sequentially by cascaded audio processing module 902, speaker protection algorithm 903, and power amplifier 913 before being transmitted to the speaker for audio playback.
[0166] like Figure 9 As shown, while processing audio signals, the electronic device can also determine whether it meets the target conditions and dynamically control the amplification factor of the PA based on the judgment result.
[0167] Feasibly, the algorithm operation status monitoring module 904 can be used to monitor the operation status of the speaker protection algorithm 903; the algorithm effectiveness monitoring module 905 can be used to monitor the effectiveness of the speaker protection algorithm 903 based on its operation status.
[0168] In one embodiment, the speaker protection algorithm 903 can be the AwinicAPO algorithm described above.
[0169] For example, the running status of the speaker protection algorithm 903 can be monitored through the mec_init function in the speaker protection algorithm 903. If the mec_init function runs normally, it indicates that the speaker protection algorithm 903 is effective; if the mec_init function runs abnormally, it indicates that the speaker protection algorithm 903 is ineffective.
[0170] Feasibly, the audio signal detection module 906 can be used to detect the audio signal output by the application 901; the audio signal processing module 907 can be used to process the audio signal detected by the audio signal detection module 906; and the pause playback detection module 908 can be used to detect whether the application 901 pauses playback based on the signal processing result of the audio signal processing module 907.
[0171] In one embodiment, application 901 (such as application x mentioned above) can output an audio signal (specifically, non-zero data) during normal playback, and stop outputting the audio signal when playback is paused, until the pause ends. Thus, whether application 901 has paused playback can be detected based on the audio signal output by application 901. For example, if application 901 continuously outputs an audio signal, it indicates that application 901 is playing normally; if application 901 does not output an audio signal for a certain period of time after continuously outputting an audio signal, it indicates that application 901 has paused playback.
[0172] In another embodiment, application 901 (such as application y mentioned above) can output an audio signal (specifically, non-zero data) during normal playback. Before pausing playback, it outputs a specific audio signal consisting of multiple frames of silence signals (specifically, zero data), then stops the audio signal until the pause ends. Thus, whether application 901 is paused can be detected based on the audio signal output by application 901. For example, if application 901 continuously outputs an audio signal, it indicates that application 901 is playing normally; if application 901 outputs multiple frames of silence signals, it indicates that application 901 is paused.
[0173] Conveniently, the audio signal processing module 907 can process the signal detected by the audio signal detection module 906, and the processing result can be used to reflect whether the application 901 has output the above-mentioned multi-frame silence signal.
[0174] Taking the aforementioned multi-frame silence signal as 38 frames of zero data as an example, in one example, the audio signal processing module 907 can calculate the covariance of the most recently output 38 frames of audio signal from application 901 in real time. If the calculated covariance is zero, it indicates that application 901 has output 38 frames of silence signal, thus indicating that application 901 has paused playback. If the calculated covariance is greater than zero, it indicates that application 901 has not output 38 frames of silence signal, thus indicating that application 901 has not paused playback.
[0175] Practically, the volume signal detection module 909 can be used to detect a first volume based on the system volume and the application volume; the high volume detection module 910 can be used to detect whether the user's usage scenario is a high volume scenario based on the first volume and a volume threshold. For example, the volume threshold can be 10% of the maximum value of the first volume.
[0176] Feasibly, the aforementioned judgment module 911 can be used to determine whether the electronic device meets the target conditions based on the detection results of the algorithm validity monitoring module 905, the pause playback detection module 908, and the high volume detection module 910. Specifically, it can determine whether the electronic device simultaneously meets the three sub-conditions: the speaker protection algorithm 903 is valid, the application 901 does not pause playback, and the user's usage scenario is a high volume scenario.
[0177] In one example, if application 901 is application x mentioned above, the judgment module 911 can set the registry key value MEC_STATE to 1 when it determines that the electronic device meets the target conditions. If it determines that the user's usage scenario is a low-volume playback scenario and / or the speaker protection algorithm 903 is ineffective, it can set the registry key value MEC_STATE to 0, so that the controller 912 can dynamically control the amplification factor of the PA according to the value of MEC_STATE. Since the PA does not work when application x is paused, there is no device noise problem, so the judgment module 911 can remain inactive when application x is paused, and therefore does not dynamically control the amplification factor of the PA.
[0178] In one example, if application 901 is the aforementioned application y, the judgment module 911 can set the aforementioned registry key value MEC_STATE to 1 when it determines that the electronic device meets the target conditions, and set it to 0 if it does not meet the conditions, so that the controller 912 can dynamically control the amplification factor of PA according to the value of MEC_STATE.
[0179] Feasibly, the controller 912 can be used to control the amplification factor of the power amplifier 913 based on the judgment result of the judgment module 911. Specifically, if MEC_STATE = 1, the amplification factor of the power amplifier 913 can be controlled to be a high factor, such as 20 times; if MEC_STATE = 0, the amplification factor of the power amplifier 913 can be controlled to be a low factor, such as 10 times.
[0180] Feasibly, the power amplifier 913 described above can be used to amplify the audio signal processed by the speaker protection algorithm 903 according to the amplification factor controlled by the controller 912, and output the amplified audio signal to realize audio playback.
[0181] Figure 9 The illustrated embodiment, by using a larger PA amplification factor as needed, can balance the audio output effect at high volumes, application pause playback, device noise issues at low volumes, and the risk of speaker damage.
[0182] Figure 9 The embodiment shown can identify user scenarios and obtain the effectiveness of protection algorithms through software without changing the device system, so as to dynamically adjust the amplification factor of the PA as needed. This can address the device noise floor problem to improve the user experience and ensure that the speaker is not damaged.
[0183] Although the various embodiments of this application are described separately, the implementation methods and beneficial effects of different embodiments can be referred to each other, and this application does not limit them.
[0184] like Figure 10As shown, one embodiment of this application provides an audio processing method, which may include the following steps 1001 to 1004. Exemplarily, Figure 10 The execution subject of the illustrated embodiment can be an electronic device.
[0185] For example, the electronic device can be a terminal device such as a smartphone, tablet, or PC.
[0186] Step 1001: Obtain the first volume of one or more first applications, and obtain the state of the first application; the first volume of the first application is obtained based on the system volume of the electronic device and the application volume of the first application.
[0187] In practice, the first application can be any application in the electronic device that supports audio playback (i.e., an audio playback application), such as application x and application y mentioned above.
[0188] Feasibly, the first application can be an application (APP), a browser, etc. For example, if the electronic device is a smartphone, the first application can be a music APP, a video APP, a game APP, a phone APP, an audio / video chat APP, a browser, etc.
[0189] Feasibly, the electronic device may periodically or in real time execute step 1001 while running the audio playback page of the first application.
[0190] In one embodiment, the electronic device can run at most one first application at any given time. In another embodiment, the electronic device can also support running multiple first applications simultaneously. If multiple first applications exist, the first volume and status of each first application can be obtained in step 1001.
[0191] Feasibly, the operating system of the electronic device can be an operating system that supports simultaneous audio playback by multiple applications, such as Windows, or an operating system that does not support simultaneous audio playback by multiple applications, such as Android. Thus, in one embodiment, the operating system of the electronic device is Android, and the number of first applications is one. In another embodiment, the operating system of the electronic device is Windows, and the number of first applications can be one or more.
[0192] Step 1002: Determine whether the electronic device meets the target conditions (or determine whether the target conditions are met), and execute step 1003 or step 1004. The target conditions include: there is at least one first application with a first volume greater than (or not less than) a volume threshold and in a playback state.
[0193] In one embodiment, the number of first applications can be one. In this case, the existence of at least one first application with a first volume greater than the volume threshold and in a playback state is equivalent to the first application having a first volume greater than the volume threshold and the first application being in a playback state.
[0194] In a feasible scenario, when an electronic device is running any audio playback application, the first volume of that application can be either high or low. If the first volume is greater than a volume threshold, it indicates that the user's usage scenario is a high-volume scenario; if the first volume is less than or greater than the volume threshold, it indicates that the user's usage scenario is a low-volume scenario.
[0195] For example, the volume threshold can be 10% of the maximum value of the first volume.
[0196] In another embodiment, there can be multiple first applications. If the first volume of any first application is greater than the volume threshold and is in playback mode, it can be said that the electronic device is in a high-volume playback scenario and meets the target condition. If the first volume of any first application is not greater than the volume threshold and is in playback mode, it can be said that the electronic device is in a low-volume playback scenario and does not meet the target condition.
[0197] Step 1003: If the electronic device meets the target conditions, then control the amplification factor of the power amplifier in the electronic device to be the first factor.
[0198] For example, the power amplifier can be a virtual PA or a digital PA.
[0199] By defining target conditions including at least one first application where the first volume is greater than the volume threshold and the application is in a playback state, a larger PA amplification factor can be used when playing at high volume to improve the audio output effect without the user being aware of the device noise floor, thereby balancing the audio output effect and the device noise floor problem.
[0200] Step 1004: If the first volume of each first application is less than the volume threshold and is in playback mode, then control the power amplifier to amplify by a second factor, where the first factor is greater than the second factor.
[0201] In one embodiment, the number of first applications can be 1. Then, the first volume of each first application is less than the volume threshold and is in a playback state, which is equivalent to the first volume of the first application being less than the volume threshold and being in a playback state.
[0202] It is feasible that the case where the first volume is less than the volume threshold can include the case of silent playback where the first volume is zero.
[0203] By limiting the PA amplification factor to a smaller value when playing each application at a low volume, the significant background noise of the device can be avoided from affecting the user experience.
[0204] Conveniently, the power amplifier amplifies the audio signal output from the first application based on a controlled amplification factor (such as a first factor or a second factor). The speaker of the electronic device can then output the amplified audio signal to achieve audio playback.
[0205] Feasibly, the values of the first and second multiples can be preset fixed values (e.g., the first multiple is 20 times and the second multiple is 10 times) or non-fixed values.
[0206] From the above, we can see that Figure 10 The illustrated embodiment supports electronic devices that can combine the recognition of user usage scenarios. For user usage scenarios where a larger PA amplification factor will not cause obvious device noise (such as high volume playback scenarios), a larger PA amplification factor can be used in these user usage scenarios to improve the audio playback effect without the user being aware of the device noise. This balances the audio playback effect and the device noise problem, bringing users a good audio playback experience.
[0207] Figure 10 The illustrated embodiment supports electronic devices that can combine the identification of user usage scenarios. For user usage scenarios where a large PA amplification factor would cause obvious device noise problems (such as low volume playback scenarios), a smaller PA amplification factor is used in these user usage scenarios to minimize the device noise level. This can avoid the device noise being obvious and affecting the user experience.
[0208] It is feasible that the PA is not always inactive during the paused playback period of some applications (such as application y mentioned above). If a large PA amplification factor is used during these paused playback periods, the active PA will amplify the device noise floor signal, resulting in noticeable device noise that negatively impacts the user experience. To avoid noticeable device noise affecting the user experience during these paused playback periods, the PA amplification factor can be controlled to a low factor.
[0209] Thus, in one embodiment of this application, the number of first applications is one; the power amplifier is in working state for a period of time during the pause playback of the first application (such as the application y mentioned above); the audio processing method further includes: if the first application is in pause playback state, controlling the amplification factor of the power amplifier to be a third factor, wherein the first factor is greater than the third factor.
[0210] It is feasible for the second multiple to be equal to or not equal to the third multiple.
[0211] See Figure 5b PA during a period of time when y pauses playback (e.g.) Figure 5bIt is in working state during the time period t1 to tb shown.
[0212] Alternatively, the PA can be deactivated while one or more other applications (such as application x mentioned above) are paused, thus eliminating the device noise floor issue. In this case, for those other applications, if they are paused, the electronic device does not need to perform operations to control the PA's amplification factor.
[0213] By limiting the PA amplification factor to a smaller value when y pauses playback, the device noise floor can be avoided from affecting the user experience.
[0214] This embodiment supports electronic devices in combining the recognition of user usage scenarios. For user usage scenarios where a large PA amplification factor would cause obvious device noise problems (such as the pause playback scenario of application y), a smaller PA amplification factor is used in these user usage scenarios to minimize the device noise level, thus avoiding significant device noise affecting the user experience.
[0215] In another embodiment, there are multiple first applications, and at least one of the above-mentioned applications y is included among the multiple first applications. If each first application is played at a low volume or paused, the amplification factor of PA can be controlled to be less than the above-mentioned first factor.
[0216] In another embodiment, there are multiple first applications, and all of the multiple first applications are the aforementioned application x. If each first application is played at a low volume or paused, and none of the multiple first applications are paused, the amplification factor of PA can be controlled to be less than the aforementioned first factor. If all of the multiple first applications are paused, no operation is required to control the amplification factor of PA.
[0217] In one embodiment of this application, obtaining the state of the first application may include: when running the audio playback page of the first application, detecting whether the first application outputs an audio signal; wherein, the first application (such as application x mentioned above) is used to stop outputting the audio signal when a pause playback request is received; if the first application does not output an audio signal, it is determined that the first application is in a pause playback state; if the first application outputs an audio signal, it is determined that the first application is in a playback state.
[0218] Feasibly, for a first application that stops outputting audio signals upon receiving a pause playback request, the electronic device can detect whether the first application has not outputted audio signals for several consecutive frames. If so, it indicates that the first application has paused playback; otherwise, it indicates that the first application is playing normally. This helps to achieve accurate judgment of the application status.
[0219] In one embodiment of this application, obtaining the state of the first application may include: obtaining multiple frames of audio signals output by the first application; wherein the first application (such as the application y mentioned above) is used to output multiple frames of mute signals when a pause playback request is received; if all the multiple frames of audio signals are mute signals, it is determined that the first application is in a pause playback state; if not all the multiple frames of audio signals are mute signals, it is determined that the first application is in a playback state.
[0220] In one example, the number of frames in a multi-frame audio signal can be the same as the number of frames in a multi-frame silence signal.
[0221] See Figure 5b If an application continues to output a specific audio signal of 38 frames of mute signal (specifically, zero data) while paused playback, the electronic device can determine that the application is in a paused playback state when it detects that the application is outputting 38 frames of zero data.
[0222] It is feasible that during normal application playback, there may be instances where one or more frames of zero data are output, but the number of these zero data frames is usually significantly less than the number of frames of multi-frame silence signals. Using the same number of frames to determine the application playback status helps to achieve accurate judgment of the application status.
[0223] In other embodiments, the number of frames in the aforementioned multi-frame audio signal may be less than the number of frames in the aforementioned multi-frame silence signal, and the number of frames in the aforementioned multi-frame audio signal can support accurate judgment of the application state. For example, if the application continues to output 38 frames of zero data when playback is paused, the number of frames in the aforementioned multi-frame audio signal may also be 30 frames, etc.
[0224] In one embodiment of this application, the audio processing method further includes: calculating the root mean square of the signal amplitude of multiple frames of audio signals; and determining whether the multiple frames of audio signals are all silent signals based on the root mean square and the amplitude threshold.
[0225] Feasibly, the above-mentioned silence signal can be zero data, then the amplitude threshold can be zero.
[0226] The signal energy of a multi-frame audio signal can be obtained by calculating the root mean square of the signal amplitude, thereby supporting accurate judgment of the application status.
[0227] In other embodiments, the electronic device may use other calculation methods, such as calculating the average value of the signal amplitude of multiple frames of audio signals, to obtain the signal energy of multiple frames of audio signals.
[0228] In one embodiment of this application, the target condition may further include the speaker protection algorithm in the electronic device being effective; if the speaker protection algorithm fails, the amplification factor of the power amplifier is controlled to be the fourth factor, where the first factor is greater than the fourth factor.
[0229] It is feasible for the second multiple to be equal to or not equal to the fourth multiple.
[0230] By limiting the target conditions to include the effectiveness of the speaker protection algorithm, damage to the speaker due to the use of a large PA amplification factor can be avoided when the algorithm fails.
[0231] In one embodiment of this application, the number of power amplifiers in the electronic device is not less than a number threshold, and the number threshold is greater than 1. For example, the number threshold can be 2.
[0232] Generally, with the same PA amplification factor, a higher number of PAs and speakers will result in a significantly higher noise floor for the device. By dynamically adjusting the PA amplification factor in electronic devices with multiple PAs and speakers, the audio output performance of the electronic devices can be significantly improved.
[0233] The method provided in any embodiment of this application can be applied to electronic devices such as mobile phones, tablets, personal digital assistants (PDAs), desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices. This application does not impose any special limitations on the specific form of the aforementioned electronic devices.
[0234] The audio processing method provided in any embodiment of this application can be applied to... Figure 11 In the electronic device 100 shown. Figure 11 A schematic diagram of the structure of the electronic device 100 is shown.
[0235] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0236] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0237] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0238] The application processor can output sound signals through audio devices (not limited to speakers 170A, receivers 170B, etc.) or display images or videos through the display screen 194.
[0239] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0240] In some embodiments, the processor 110 may be a system-on-chip (SoC), which may include a central processing unit (CPU), and may further include other types of processors. In some embodiments, the processor 110 may be a PWM control chip.
[0241] The processor 110 may also include necessary hardware accelerators or logic processing hardware circuitry, such as an ASIC, or one or more integrated circuits for controlling the execution of the program. Furthermore, the processor 110 may have the capability to operate one or more software programs, which may be stored in a storage medium.
[0242] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0243] In some embodiments, the memory of the electronic device 100 may be a read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), or other types of dynamic storage devices capable of storing information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), or any computer-readable medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer.
[0244] In some embodiments, the processor 110 and the memory can be combined into a single processing device, or they can be separate components. The processor 110 can be used to execute program code stored in the memory. In specific implementations, the memory can be integrated into the processor 110, or it can be independent of the processor 110.
[0245] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0246] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0247] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0248] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0249] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0250] Electronic device 100 can implement audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, such as music playback, video playback, and recording.
[0251] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0252] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic devices can listen to music or make hands-free calls through the speaker 170A.
[0253] Conveniently, the electronic device 100 may include a plurality of PAs and a plurality of speakers 170A, each PA being used to drive the connected speakers 170A to output an audio signal amplified by the PA.
[0254] A touch sensor, also known as a "touch device," can be located on the display screen 194. The touch sensor and the display screen 194 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.
[0255] Feasibly, users can request the application to start / stop paused playback by performing touch operations on the touchscreen, such as clicking the pause button on the audio playback page.
[0256] In addition, the electronic device runs an operating system on top of the aforementioned components. For example... operating system, operating system, Operating systems, etc. Applications can be installed and run on an operating system.
[0257] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0258] Figure 12 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom: application layer, application framework layer (Framework, FWK), system library and runtime layer, hardware abstraction layer (HAL), and kernel layer.
[0259] The application layer can include a series of application packages, such as camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, SMS and other applications.
[0260] It is feasible for music and video applications to include system playback software as well as third-party playback software.
[0261] In practice, the PA can amplify the audio signals output by music and video applications, and the speaker can output the amplified audio signal to achieve audio playback.
[0262] The application framework layer provides an Application Programming Interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 12 As shown, the application framework layer may include a view system, notification manager, resource manager, window manager, content provider, etc.
[0263] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0264] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.
[0265] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0266] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0267] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0268] The system library and runtime layer includes the system library and the Android Runtime.
[0269] System libraries can include multiple functional modules. For example: 3D graphics processing libraries (e.g., OpenGL ES), surface managers, 2D graphics engines (e.g., SGL), media libraries, etc.
[0270] The 3D graphics processing library is used for 3D graphics drawing, image rendering, compositing, and layer processing. The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications, such as OpenGL ES. The 2D graphics engine is a drawing engine for 2D graphics, such as SGL. The media library supports playback and recording of various common audio and video formats, as well as still image files. The media library supports various audio and video encoding formats, such as: Moving Picture Experts Group (MPEG4), Highly Compressed Digital Video Codec Standard (H.264), Moving Picture Experts Compression Standard Audio Layer 3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate Codec (AMR), Joint Picture Experts Group (JPG), Portable Web Graphics (PNG), etc.
[0271] The Android runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java needs to call, and the other part consists of the Android core libraries. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0272] The Hardware Abstraction Layer (HAL) acts as a bridge between software and hardware. It encapsulates the underlying hardware driver, providing a generic interface for the application framework to call the driver. The HAL is an abstract interface for the device kernel driver, providing application programming interfaces for accessing the underlying device to higher-level Java API frameworks. The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component.
[0273] The kernel layer is the layer between hardware and software. It contains at least camera drivers, display drivers, Bluetooth drivers, audio drivers, and sensor drivers. The kernel layer is the foundation of the Android system, through which the system's final functionalities are implemented.
[0274] Understandable, Figure 12The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.
[0275] This application also provides an audio processing apparatus, comprising: an acquisition module, configured to acquire a first volume of one or more first applications, and acquire the state of the first applications; the first volume of the first applications is obtained based on the system volume of the electronic device and the application volume of the first applications; a determination module, configured to determine whether the electronic device meets target conditions, the target conditions including: at least one first application having a first volume greater than a volume threshold and being in a playback state; and a control module, configured to, if the electronic device meets the target conditions, control the amplification factor of the power amplifier in the electronic device to a first factor; and if the first volume of each first application is less than a volume threshold and is in a playback state, control the amplification factor of the power amplifier to a second factor, wherein the first factor is greater than the second factor.
[0276] This application also provides a chip, which is installed in an electronic device. The chip includes a processor for executing computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method steps provided in any method embodiment of this application.
[0277] This application also proposes a terminal device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the terminal device is triggered to execute the method steps provided in any method embodiment of this application.
[0278] This application also proposes a server device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the server device is triggered to execute the method steps provided in any method embodiment of this application.
[0279] This application also provides an electronic device, which includes multiple antennas, a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication device (such as a communication module that can implement 5G communication based on the NR protocol). When the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps provided in any method embodiment of this application.
[0280] Specifically, in the embodiments of this application, one or more computer programs are stored in the aforementioned memory, and the one or more computer programs include instructions that, when executed by the aforementioned device, cause the aforementioned device to perform the method steps described in the embodiments of this application.
[0281] Furthermore, the devices, apparatuses, and modules described in the embodiments of this application may be implemented by computer chips or physical entities, or by products with certain functions.
[0282] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0283] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0284] Specifically, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method steps provided in this application.
[0285] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method steps provided in this application.
[0286] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.
[0287] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0288] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0289] An integrated unit implemented as a software functional unit can be stored in a computer-readable storage medium. This software functional unit, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory, random access memory, magnetic disk, or optical disk.
[0290] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0291] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0292] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments of this application can be implemented using electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0293] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the same or similar parts between the various embodiments of this application can be referred to mutually. For example, the specific working processes of the systems, devices, and units described in the embodiments of this application can be referred to the corresponding processes in the method embodiments of this application, and will not be repeated here.
[0294] The above description is merely a specific embodiment of this application and is not intended to limit this application. The scope of protection of this application shall be determined by the claims.
Claims
1. An audio processing method, characterized in that, include: Get the first volume of one or more first applications, and get the state of the first application; The first volume of the first application is obtained based on the system volume of the electronic device and the application volume of the first application. Determine whether the electronic device meets the target conditions, the target conditions including: at least one of the first applications exists with the first volume greater than the volume threshold and is in a playback state; If the electronic device meets the target condition, then the amplification factor of the power amplifier in the electronic device is controlled to be the first factor; If the first volume of each of the first applications is less than the volume threshold and is in playback mode, then the amplification factor of the power amplifier is controlled to be a second factor, wherein the first factor is greater than the second factor.
2. The method according to claim 1, characterized in that, The number of the first applications is one; The power amplifier is in operation for a period of time during the pause of playback in the first application; The method further includes: If the first application is in a paused playback state, the amplification factor of the power amplifier is controlled to be the third factor, where the first factor is greater than the third factor.
3. The method according to claim 2, characterized in that, Obtaining the state of the first application includes: Acquire multiple frames of audio signals output by the first application; wherein, the first application is used to output multiple frames of mute signals when a pause playback request is received; If all of the multiple audio frames are silent signals, then the first application is determined to be in a paused playback state. If the multiple audio frames are not all silent signals, then the first application is determined to be in playback mode.
4. The method according to claim 3, characterized in that, The method further includes: Calculate the root mean square of the signal amplitude of the multi-frame audio signal; Based on the root mean square and amplitude threshold, it is determined whether the multiple frames of audio signals are all silent signals.
5. The method according to claim 1, characterized in that, Obtaining the state of the first application includes: When the audio playback page of the first application is running, it is detected whether the first application outputs an audio signal; wherein, the first application is used to stop outputting the audio signal when it receives a pause playback request; If the first application does not output an audio signal, it is determined that the first application is in a paused playback state; If the first application outputs an audio signal, then it is determined that the first application is in playback mode.
6. The method according to claim 1, characterized in that, The target condition also includes that the speaker protection algorithm in the electronic device is effective; The method further includes: If the speaker protection algorithm fails, the power amplifier's amplification factor is controlled to be a fourth factor, where the first factor is greater than the fourth factor.
7. The method according to any one of claims 1-5, characterized in that, The number of power amplifiers in the electronic device is not less than a number threshold, and the number threshold is greater than 1.
8. A chip, characterized in that, include: A processor for executing computer program instructions stored in memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to perform the method as described in any one of claims 1-7.
9. An electronic device, characterized in that, The electronic device includes one or more memories for storing computer program instructions and one or more processors, wherein when the computer program instructions are executed by the one or more processors, the electronic device is triggered to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-7.