CN113132856B - Audio signal processing method, electronic equipment and storage medium - Google Patents

Audio signal processing method, electronic equipment and storage medium Download PDF

Info

Publication number
CN113132856B
CN113132856B CN202110340601.7A CN202110340601A CN113132856B CN 113132856 B CN113132856 B CN 113132856B CN 202110340601 A CN202110340601 A CN 202110340601A CN 113132856 B CN113132856 B CN 113132856B
Authority
CN
China
Prior art keywords
voltage
target
output
audio signal
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110340601.7A
Other languages
Chinese (zh)
Other versions
CN113132856A (en
Inventor
胡浩
柯骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202110340601.7A priority Critical patent/CN113132856B/en
Publication of CN113132856A publication Critical patent/CN113132856A/en
Application granted granted Critical
Publication of CN113132856B publication Critical patent/CN113132856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses an audio signal processing method, which comprises the following steps: determining a target signal amplitude of an audio signal to be output; detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output; determining a target working voltage based on a preset relation between the input voltage and the amplitude of the audio signal, the target signal amplitude and the current working voltage; under the condition that a target working voltage is provided for a target power amplifier through a battery power supply to output an audio signal to be output, detecting an audio feedback signal aiming at the audio signal to be output; if the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude. The embodiment of the application also provides electronic equipment and a storage medium.

Description

Audio signal processing method, electronic equipment and storage medium
Technical Field
The present application relates to the field of audio processing technologies, and in particular, to an audio signal processing method, an electronic device, and a storage medium.
Background
With rapid development of science and technology, applications of electronic devices are becoming more and more popular. The power consumption and the power consumption of the whole machine of the current electronic equipment are larger and larger, the driving capability of the audio power amplifier is gradually improved, and along with the application of functions such as double-horn, high-volume and high-voltage power amplifier, the audio instantaneous current is gradually required to be improved. For example, when a single horn is driven, its instantaneous current peak is 4 amps (a), so in the case of a dual horn dual power amplifier, the current peak requirement may need to be doubled. However, the high current in the current application scenario may cause a sudden drop in the battery voltage, and if the high current in the audio demand is not controlled, the instantaneous voltage of the battery may be lower than the shutdown voltage, which may cause the electronic device to be shutdown. In addition, for the loudspeaker, the voltage drop caused by the self or other functions of the electronic equipment also causes the driving capability of the audio power amplifier to be insufficient, and the problems of continuous playing noise, sound breaking and the like caused by output waveform distortion occur.
Currently, in order to solve the above-mentioned problems, an under-voltage protection (Brown-out) mechanism is generally adopted to reduce the gain when the voltage drops to the off-voltage to avoid the shutdown of the electronic device. However, the Brown-out mechanism can only respond to the condition that the voltage drops, and is only used for protecting the extremely low power-down voltage, and the Brown-out mechanism is realized through a hardware module, so that the hardware cost of a chip is increased intangibly, the application scene of the Brown-out mechanism is single, the output audio signal cannot be effectively controlled, and the risk of distortion of the output audio signal is high.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present application provide an audio signal processing method, an electronic device, and a storage medium, which solve the problem that an output audio signal cannot be effectively controlled due to the limitation of a Brown-out mechanism application scenario at present, implement a scheme for controlling an audio signal in advance, effectively reduce the risk of distortion of the output audio signal, and ensure the output sound effect of the output audio signal.
The technical scheme of the application is realized as follows:
in a first aspect, a method of audio signal processing, the method comprising:
determining a target signal amplitude of an audio signal to be output;
detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output;
determining a target working voltage based on a preset relation between input voltage and audio signal amplitude, the target signal amplitude and the current working voltage;
detecting an audio feedback signal for the audio signal to be output under the condition that the target working voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output;
If the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, and the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
Optionally, the determining the target working voltage based on the preset relation between the input voltage and the audio signal amplitude, the target signal amplitude and the current working voltage includes:
determining a theoretical working voltage when the audio signal to be output is output from the relation between the input voltage and the audio signal amplitude based on the target signal amplitude;
determining a desired output power for the target power amplifier based on the theoretical operating voltage;
determining an actual output power for the target power amplifier based on the current operating voltage;
the target operating voltage is determined based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude.
Optionally, the determining the target operating voltage based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude includes:
If the current working voltage is smaller than a first voltage threshold value, determining a target difference value between the expected output power and the actual output power;
if the target difference value is larger than or equal to a power threshold value, counting a target duty ratio that the target signal amplitude of the audio signal to be output is larger than an amplitude threshold value;
and if the target duty ratio is smaller than the preset duty ratio, determining that the target working voltage is the preset maximum output voltage.
Optionally, the method further comprises:
if the target duty ratio is greater than or equal to the preset duty ratio, determining a first target control parameter of the target power amplifier based on the current working voltage;
and controlling the working parameter of the target power amplifier to be the first target control parameter.
Optionally, if the target duty cycle is greater than or equal to the preset duty cycle, determining, based on the current operating voltage, a first target control parameter of the target power amplifier includes:
if the target duty ratio is greater than or equal to the preset duty ratio, estimating a dropping working voltage of the battery power supply after the voltage of the target power amplifier drops based on the current working voltage;
if the identification content of the target power amplifier is non-low electric control identification information and the drop working voltage is smaller than a second voltage threshold or the current working voltage is smaller than the second voltage threshold, determining a voltage uplink hysteresis threshold; wherein the second voltage threshold is less than the first voltage threshold;
And if the current working voltage is greater than or equal to the voltage upward hysteresis threshold, determining the first target control parameter as an initialization gain value.
Optionally, the method further comprises:
if the current working voltage is smaller than the voltage uplink hysteresis threshold, updating the low electric control identification content aiming at the target power amplifier into low electric control identification information, and starting timing;
if the current gain value of the target power amplifier is a first preset gain value and the timing duration is within the preset gain holding duration, determining that the first target control parameter is the first gain value; wherein the preset gain holding time length and the first preset gain value have an association relation;
if the current gain value is not the first preset gain value and the timing duration is within the preset gain holding duration, reducing and adjusting the gain of the target power amplifier from the current gain value according to a gain adjustment stepping value to obtain a second gain value; wherein the first target control parameter comprises the second gain value.
Optionally, the method further comprises:
if the timing time is longer than the preset gain holding time, determining a change relation between the current working voltage and the previous historical voltage at the moment adjacent to the current moment;
Determining a low-voltage hysteresis region of the current working voltage based on the change relation;
if the low-voltage hysteresis region is different from a previous historical voltage hysteresis region at a time adjacent to the current time, determining that the first target control parameter is a first gain value corresponding to the current working voltage and a first duration for maintaining the first gain value;
and if the low-voltage hysteresis region is the same as the historical voltage hysteresis region, determining that the first target control parameter is a historical gain value corresponding to the historical voltage hysteresis region.
Optionally, the method further comprises:
acquiring first historical input voltages provided by the battery power supply for the target power amplifier in the first n sampling moments adjacent to the current moment; wherein n is an integer greater than 1;
if the voltage is determined to have obvious drop based on the first historical input voltage, and the current working voltage is smaller than or equal to a third voltage threshold value, determining a first maximum preset current and a third gain value based on the current working voltage;
controlling the battery power supply to provide the first maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be the third gain value;
If the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than the third voltage threshold value, and the current working voltage is larger than or equal to the first voltage, counting the voltage fluctuation repetition times in the range of the first n sampling moments and the current moment; the first voltage is a voltage of a previous moment adjacent to the current moment in the first historical input voltage;
if the fluctuation repetition number is greater than a preset number, determining a second target control parameter for the target power amplifier based on the current working voltage;
controlling the target power amplifier to output the audio signal to be output based on the second target control parameter;
if the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than the third voltage threshold value, the current working voltage is smaller than the first voltage, and a second maximum preset current and a fourth gain value are determined based on the current working voltage;
and controlling the battery power supply to provide the second maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be the fourth gain value.
Optionally, if the number of fluctuation repetitions is greater than a preset number, determining, based on the current operating voltage, a second target control parameter for the target power amplifier includes:
if the fluctuation repetition number is greater than a preset number, determining that the target power amplifier is currently in a voltage fluctuation protection mode, and determining that the second target control parameter is a historical gain value set at the moment before the voltage fluctuation protection;
if the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage is the first occurrence after the target power amplifier exits the voltage fluctuation protection mode, determining the second target control parameter as a preset minimum gain value and a second duration for performing voltage fluctuation protection again; wherein the second target control parameter includes the preset minimum gain value and the second duration;
if the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage belongs to at least the 2 nd occurrence after the current power amplifier exits the voltage fluctuation protection mode, acquiring historical output audio signals in the first n times adjacent to the current time;
The second target control parameter is determined based on the historical output audio signal.
Optionally, the determining the second target control parameter based on the historical output audio signal includes:
if the historical output audio signal repeatedly fluctuates at least twice, determining that the second target control parameter is the preset minimum gain value;
if the historical output audio signal does not have repeated fluctuation and the current working voltage is lower than a second voltage threshold, determining a first target control parameter of the target power amplifier based on the current working voltage; wherein the second target control parameter comprises the first target control parameter.
In a second aspect, an electronic device, the electronic device comprising: a battery power supply, a processor, and an audio processing system including a target power amplifier; wherein:
the processor is used for determining a target signal amplitude of an audio signal to be output; detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output; determining a target working voltage based on a preset relation between input voltage and audio signal amplitude, the target signal amplitude and the current working voltage; generating a control instruction to the battery power supply for controlling the battery power supply to provide the target operating voltage for the audio processing system;
The battery power supply is used for receiving the control instruction and providing a power supply corresponding to the target working voltage for the audio processing system;
the audio processing system is used for outputting the audio signal to be output based on the target working voltage;
the processor is further configured to detect an audio feedback signal for the audio signal to be output when the target operating voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output; if the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, and the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
In a third aspect, a storage medium having stored thereon an audio signal processing program which, when executed by a processor, implements the steps of the audio signal processing method according to any one of the preceding claims.
The embodiment of the application provides an audio signal processing method, electronic equipment and a storage medium, which are characterized in that after the amplitude of a target signal of an audio signal to be output is determined, the current working voltage provided by a battery power supply for a target power amplifier is detected, then the target working voltage is determined based on the preset relation between the input voltage and the amplitude of the audio signal, the target signal amplitude and the current working voltage, and under the condition that the target working voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output, an audio feedback signal aiming at the audio signal to be output is detected, if the signal distortion occurs when the audio signal to be output is determined based on the audio feedback signal and the target signal amplitude, and the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude. In this way, based on the preset relation between the input voltage and the amplitude of the audio signal, the current working voltage provided by the battery power supply for the target power amplifier and the target signal amplitude of the audio signal to be output are analyzed, the target working voltage is determined, the battery power supply is controlled to provide the target working voltage for the target power amplifier to output the audio signal to be output, further, the audio feedback signal when the audio signal to be output is output under the target working voltage is analyzed, the signal distortion of the audio signal to be output is analyzed, the relation between the input voltage and the amplitude of the audio signal is updated based on the current working voltage and the amplitude of the target signal, the situation that the determined target working voltage does not cause the distortion of the audio signal to be output is effectively ensured, the problem that the output audio signal cannot be effectively controlled due to the limitation of the application scene of a Brown-out mechanism at present is solved, the scheme for controlling the audio signal in advance is realized, the risk of the distortion of the output audio signal is effectively reduced, and the output sound effect of the output audio signal is ensured.
Drawings
Fig. 1 is a flow chart of an audio signal processing method according to an embodiment of the present application;
fig. 2 is a flowchart of another audio signal processing method according to an embodiment of the present application;
fig. 3 is a flowchart of another audio signal processing method according to an embodiment of the present application;
fig. 4 is a flowchart of an audio signal processing method according to another embodiment of the present application;
fig. 5 is a flowchart illustrating another audio signal processing method according to another embodiment of the present application;
fig. 6 is a schematic diagram of a system architecture of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic diagram of an implementation basic flow of audio signal processing according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
An embodiment of the present application provides an audio signal processing method, referring to fig. 1, the method is applied to an electronic device, and the method includes the following steps:
step 101, determining a target signal amplitude of an audio signal to be output.
In the embodiment of the application, the electronic device may be a device with an audio output function, for example, may be a computer electronic device, an intelligent mobile terminal device, an intelligent sound box, a vehicle-mounted terminal, and the like. The audio signal to be output may be an audio signal to be output, including a pure audio signal, or may be an audio signal in video information. The target signal amplitude of the audio signal to be output may be in the form of a voltage, or a volume, i.e. a loudness level, for example.
Step 102, detecting the current working voltage provided by the battery power supply for the target power amplifier.
The target power amplifier is used for controlling the audio signal to be output.
In an embodiment of the present application, the target power amplifier may be an intelligent power amplifier. The battery power supply is arranged in the electronic equipment and is used for supplying power to all power utilization components in the electronic equipment, including supplying power to the target power amplifier so as to provide a specific working voltage for the target power amplifier and ensure the sound quality of the output audio signal.
Step 103, determining a target working voltage based on a preset relation between the input voltage and the audio signal amplitude, the target signal amplitude and the current working voltage.
In the embodiment of the application, the preset relation between the input voltage and the audio signal amplitude is used for representing the distortion relation of the audio signal, so that the target signal amplitude and the current working voltage are analyzed according to the preset relation between the input voltage and the audio signal amplitude to determine the target working voltage, the output audio signal to be output is not distorted under the target working voltage, and the audio quality of the audio signal to be output is ensured.
Step 104, under the condition that the target working voltage is provided for the target power amplifier through the battery power supply to output the audio signal to be output, detecting an audio feedback signal aiming at the audio signal to be output.
In the embodiment of the application, when the audio signal to be output is output, the battery power supply is controlled to provide the voltage value corresponding to the target working voltage for the target power amplifier, and the audio signal output by the audio signal to be output is collected to obtain the audio feedback signal.
Step 105, if it is determined that signal distortion occurs when the audio signal to be output is output based on the audio feedback signal and the target signal amplitude, the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
In the embodiment of the application, the audio feedback signal and the target signal amplitude of the audio signal to be output are analyzed to determine whether the signal distortion phenomenon occurs when the audio signal to be output is output, if the signal distortion phenomenon occurs, the relation between the input voltage and the audio signal amplitude needs to be corrected and updated according to the current working voltage and the target signal amplitude so as to ensure that the working voltage of the target power amplifier obtained based on the relation between the input voltage and the audio signal amplitude ensures that the audio signal to be output is not distorted, and therefore, the working voltage of the target power amplifier is adjusted by a software analysis method, and the hardware cost is effectively reduced.
According to the audio signal processing method provided by the embodiment of the application, after the target signal amplitude of the audio signal to be output is determined, the current working voltage provided by the battery power supply for the target power amplifier is detected, then the target working voltage is determined based on the preset relation between the input voltage and the audio signal amplitude, the target signal amplitude and the current working voltage, and under the condition that the target working voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output, the audio feedback signal aiming at the audio signal to be output is detected, if the signal distortion occurs when the audio signal to be output is determined based on the audio feedback signal and the target signal amplitude, and the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude. In this way, based on the preset relation between the input voltage and the amplitude of the audio signal, the current working voltage provided by the battery power supply for the target power amplifier and the target signal amplitude of the audio signal to be output are analyzed, the target working voltage is determined, the battery power supply is controlled to provide the target working voltage for the target power amplifier to output the audio signal to be output, further, the audio feedback signal when the audio signal to be output is output under the target working voltage is analyzed, the signal distortion of the audio signal to be output is analyzed, the relation between the input voltage and the amplitude of the audio signal is updated based on the current working voltage and the amplitude of the target signal, the situation that the determined target working voltage does not cause the distortion of the audio signal to be output is effectively ensured, the problem that the output audio signal cannot be effectively controlled due to the limitation of the application scene of a Brown-out mechanism at present is solved, the scheme for controlling the audio signal in advance is realized, the risk of the distortion of the output audio signal is effectively reduced, and the output sound effect of the output audio signal is ensured.
Based on the foregoing embodiments, an embodiment of the present application provides an audio signal processing method, referring to fig. 2, the method is applied to an electronic device, and the method includes the steps of:
step 201, determining a target signal amplitude of an audio signal to be output.
In the embodiment of the application, the electronic device is taken as the mobile phone, and the mobile phone is currently in disconnection with an external power supply, that is, the mobile phone is currently only operated by taking a battery in the mobile phone as the power supply for example, the audio signal to be output can be an audio signal to be played for a specific duration, for example, when a section of audio signal can be divided into n sections of sub-audio signals according to the specific duration, if the 1 st section of sub-audio signal is currently played, the 2 nd section of sub-audio signal to be played can be determined as the audio signal to be output according to the playing time sequence, and correspondingly, when the 2 nd section of sub-audio signal is currently played, the 3 rd section of sub-audio signal is the audio signal to be output, and so on, and detailed description is omitted herein. The specific duration may be an empirical value determined based on the performance of the electronic device or may be an empirical value commonly used in processing audio signals.
In some application scenarios, the target signal amplitude may be an average (RMS) of the amplitude of the audio signal to be output.
Step 202, detecting the current working voltage provided by the battery power supply for the target power amplifier.
The target power amplifier is used for controlling the audio signal to be output.
In the embodiment of the application, the current working voltage provided by the battery power supply for the target power amplifier is the current output voltage of the battery power supply. The target power amplifier is exemplified as an intelligent power amplifier (Smart Power Amplifier, smart PA).
And 203, determining the theoretical working voltage when the audio signal to be output is output from the relation between the input voltage and the audio signal amplitude based on the target signal amplitude.
In the embodiment of the application, the relation between the input voltage and the audio signal amplitude can be in a list form, or can be a calculation formula related to the input voltage and the audio signal amplitude, so that under the condition of determining the target signal amplitude, the corresponding theoretical working voltage can be determined according to the relation between the input voltage and the audio signal amplitude.
Step 204, determining a desired output power for the target power amplifier based on the theoretical operating voltage.
In an embodiment of the present application, the desired output power may be determined based on a product of the theoretical operating voltage and the output current of the battery power supply.
Step 205, determining an actual output power for the target power amplifier based on the current operating voltage.
In the embodiment of the application, the actual output power of the target power amplifier can be determined according to the product of the current working voltage and the output current of the battery power supply.
Step 206, determining a target operating voltage based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude.
In the embodiment of the application, the expected output power, the actual output power, the current working voltage and the target signal amplitude are analyzed to determine the target working voltage.
Step 207, detecting an audio feedback signal for the audio signal to be output under the condition that the target power amplifier is provided with the target working voltage by the battery power supply to output the audio signal to be output.
In the embodiment of the application, when the battery power supply provides the target working voltage for the Smart PA, the audio signal to be output is output, and the audio feedback signal fed back by the signal feedback pin IV Sense of the Smart PA is determined, wherein the audio feedback signal can be a voltage current feedback signal.
Step 208, if it is determined that signal distortion occurs when the audio signal to be output is output based on the audio feedback signal and the target signal amplitude, the relationship between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
In the embodiment of the application, the audio feedback signal and the target signal amplitude are compared and analyzed to judge whether signal distortion occurs when the audio signal to be output is output, and when signal distortion occurs, the current working voltage and the target signal amplitude are adopted for correcting the relation between the input voltage and the audio signal amplitude, so that the updated relation between the input voltage and the audio signal amplitude is obtained.
It should be noted that, in this embodiment, the descriptions of the same steps and the same content as those in other embodiments may refer to the descriptions in other embodiments, and are not repeated here.
The embodiment of the application provides an audio signal processing method, which is used for analyzing the current working voltage provided by a battery power supply for a target power amplifier and the target signal amplitude of an audio signal to be output based on the preset relation between the input voltage and the audio signal amplitude, determining the target working voltage, controlling the battery power supply to provide the target working voltage for the target power amplifier to output the audio signal to be output, further analyzing an audio feedback signal when the audio signal to be output is output under the target working voltage, analyzing the signal distortion of the audio signal to be output, updating the relation between the input voltage and the audio signal amplitude based on the current working voltage and the target signal amplitude, effectively ensuring that the determined target working voltage cannot cause the distortion of the audio signal to be output, solving the problem that the output audio signal cannot be effectively controlled due to the limitation of Brown-out mechanism application scene at present, realizing a scheme for controlling the audio signal in advance, effectively reducing the risk of the distortion of the output audio signal and ensuring the output audio signal.
Based on the foregoing embodiments, an embodiment of the present application provides an audio signal processing method, referring to fig. 3, the method is applied to an electronic device, and the method includes the steps of:
step 301, determining a target signal amplitude of an audio signal to be output.
Step 302, detecting a current operating voltage provided by the battery power supply for the target power amplifier.
The target power amplifier is used for controlling the audio signal to be output.
Step 303, determining a theoretical working voltage when outputting the audio signal to be output from the relation between the input voltage and the audio signal amplitude based on the target signal amplitude.
Step 304, determining a desired output power for the target power amplifier based on the theoretical operating voltage.
Step 305, determining the actual output power for the target power amplifier based on the current operating voltage.
Step 306, if the current operating voltage is less than the first voltage threshold, determining a target difference between the desired output power and the actual output power.
In the embodiment of the application, the first voltage threshold is an empirical value obtained in advance according to a large number of experiments. If the current working voltage is greater than or equal to the first voltage threshold, the audio signal to be output can be directly output based on the current working voltage. Target difference = desired output power-actual output power.
Step 307, if the target difference is greater than or equal to the power threshold, counting a target duty ratio that the target signal amplitude of the audio signal to be output is greater than the amplitude threshold.
In the embodiment of the application, the power threshold is an empirical value obtained according to a large number of experiments, and the amplitude threshold is an empirical value of a large audio signal obtained according to a large number of experiments.
Step 308, if the target duty ratio is smaller than the preset duty ratio, determining that the target working voltage is the preset maximum output voltage.
In the embodiment of the application, the preset duty ratio is an empirical value of duty ratio obtained according to a large number of experiments. The preset maximum output voltage is an empirical value obtained from a number of experiments.
Step 309, in the case of providing the target power amplifier with the target operating voltage by the battery power supply to output the audio signal to be output, detecting an audio feedback signal for the audio signal to be output.
Step 310, if it is determined that signal distortion occurs when the audio signal to be output is output based on the audio feedback signal and the target signal amplitude, the relationship between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
Based on the foregoing embodiments, in other embodiments of the present application, referring to fig. 4, after the electronic device performs step 307, steps 311 to 312 are performed:
Step 311, if the target duty ratio is greater than or equal to the preset duty ratio, determining a first target control parameter of the target power amplifier based on the current operating voltage.
In an embodiment of the present application, the first target control parameter of the target power amplifier may be a gain of the target power amplifier and/or an operating voltage parameter of the target power amplifier.
Step 312, controlling the working parameter of the target power amplifier to be the first target control parameter.
In the embodiment of the application, the electronic equipment controls the target power amplifier to work with the first target control parameter so as to output the audio signal to be output.
Based on the foregoing embodiments, in other embodiments of the present application, step 311 may be implemented by steps 311a to 311b, or steps 311a and 311 c:
step 311a, if the target duty ratio is greater than or equal to the preset duty ratio, estimating a drop operating voltage of the battery power supply after the target power amplifier voltage drops based on the current operating voltage.
Step 311b, if the identification content of the target power amplifier is non-low electric control identification information, and the drop working voltage is smaller than the second voltage threshold, or the current working voltage is smaller than the second voltage threshold, determining a voltage uplink hysteresis threshold.
Wherein the second voltage threshold is less than the first voltage threshold.
In the embodiment of the application, when the identification content of the target power amplifier is the non-low voltage control identification information, the indication that the target power amplifier is not currently processing the low-voltage protection mode is provided. The second voltage threshold is a voltage experience threshold which is preset according to a large number, and can be expressed by voltage percentage, and the second voltage threshold is a low voltage threshold. The voltage up hysteresis threshold is a voltage threshold obtained according to a large number of experiments.
Step 311c, if the current operating voltage is greater than or equal to the voltage hysteresis threshold, determining the first target control parameter as the initialization gain value.
In the embodiment of the present application, the initialization gain is generally set to 0.
Based on the foregoing embodiments, in other embodiments of the present application, the step 311 may be implemented by the steps 311d to 311e, or the steps 311d and 311 f:
and 311d, if the current working voltage is smaller than the voltage up hysteresis threshold, updating the low electric control identification content aiming at the target power amplifier into low electric control identification information, and starting timing.
In the embodiment of the application, updating the low-power control identification content for the target power amplifier to the low-power control identification information indicates that the low-power control protection mode is currently entered for the target power amplifier.
Step 311e, if the current gain value of the target power amplifier is the first preset gain value and the timing duration is within the preset gain holding duration, determining the first target control parameter as the first gain value.
The preset gain holding time length and the first preset gain value have an association relation.
In the embodiment of the present application, in order to ensure stability of an output audio signal, when the gain of the target power amplifier is controlled to be a first preset gain value, the target power amplifier is required to maintain the gain to be the first preset gain value for a preset gain maintaining period, and the preset gain maintaining period is an empirical value obtained according to a large number of experiments. The first preset gain is determined by querying an operating gain table corresponding to the target power amplifier according to the current operating voltage.
Step 311f, if the current gain value is not the first preset gain value and the timing duration is within the preset gain maintaining duration, reducing and adjusting the gain of the target power amplifier from the current gain value according to the gain adjustment step value, so as to obtain a second gain value.
Wherein the first target control parameter comprises a second gain value.
In the embodiment of the present application, the gain step value may be determined by combining the magnitude of the amplitude of the audio signal to be output with a preset ratio. However, in some application scenarios, the gain step value may be an empirical value determined according to a large number of experiments, and the correction may be modified according to actual requirements.
Based on the foregoing embodiment, in other embodiments of the present application, the step 311 may be further implemented by steps 311g to 311 j:
step 311g, if the timing time is longer than the preset gain holding time, determining a change relation between the current working voltage and the previous historical voltage at the time adjacent to the current time.
In the embodiment of the application, the change relation between the current working voltage and the previous historical voltage at the moment adjacent to the current moment comprises three relations of voltage increase, voltage decrease or voltage invariance.
Step 311h, determining a low voltage hysteresis region of the current working voltage based on the change relation.
In the embodiment of the application, when the change relation between the current working voltage and the previous historical voltage adjacent to the current moment is different, different low-voltage hysteresis areas are set for different voltages, for example, the different low-voltage hysteresis areas set for different voltages can be expressed in a list form or can be determined by adopting a specific calculation formula. For example, when the change relation is that the voltage is large, a relation of low-voltage hysteresis regions corresponding to different operation voltages is provided, and when the change relation is that the voltage is small, a relation of low-voltage hysteresis regions corresponding to different operation voltages is provided. The voltage-increasing hysteresis condition may be determined as a case where the change relation is that the voltage is large, and the voltage-decreasing hysteresis condition may be determined as a case where the change relation is that the voltage is small, so that the two relations are different.
It should be noted that, after the electronic device executes step 311h, step 311i may be selectively executed, or step 311j may be selectively executed if the low voltage hysteresis region is different from the previous history voltage hysteresis region at the time adjacent to the current time, and step 311i may be selectively executed if the low voltage hysteresis region is the same as the history voltage hysteresis region.
Step 311i, if the low voltage hysteresis region is different from the previous history voltage hysteresis region at a time adjacent to the current time, determining that the first target control parameter is a first gain value corresponding to the current working voltage and a first duration for maintaining the first gain value.
In the embodiment of the present application, the first gain value may be calculated according to a relationship between the current working voltage and a preset voltage and gain. The first time period for maintaining the first gain value is typically an empirical value obtained from a number of experiments. However, in some application scenarios, the first duration corresponding to the first gain value may also be determined according to a relationship between the gain value and the retention duration, and in particular may be determined according to an actual application scenario, which is not limited in any way.
Step 311j, if the low voltage hysteresis region is the same as the history voltage hysteresis region, determining that the first target control parameter is a history gain value corresponding to the previous history voltage hysteresis region.
Thus, when the current working voltage is lower than a certain percentage, the output gain of the SmartPA is gradually reduced by combining the magnitude of the amplitude of the output audio signal and reducing the output gain of the target power amplifier in proportion, namely, hysteresis control logic is adopted to determine the output gain of the SmartPA. It should be noted that, after the output gain of SmartPA is reduced, the output gain of SmartPA is complemented when the electric quantity of the battery power supply is required to be restored to the upper electric quantity threshold, that is, if the voltage threshold N > N-1, the output gain of SmartPA is reduced when the voltage of the current battery power supply output to SmartPA is lower than the voltage threshold N-1, and the output gain of SmartPA is adjusted and restored only when the voltage of the battery power supply output to SmartPA is increased beyond the N threshold.
It should be noted that, in this embodiment, the descriptions of the same steps and the same content as those in other embodiments may refer to the descriptions in other embodiments, and are not repeated here.
The embodiment of the application provides an audio signal processing method, which is used for analyzing the current working voltage provided by a battery power supply for a target power amplifier and the target signal amplitude of an audio signal to be output based on the preset relation between the input voltage and the audio signal amplitude, determining the target working voltage, controlling the battery power supply to provide the target working voltage for the target power amplifier to output the audio signal to be output, further analyzing an audio feedback signal when the audio signal to be output is output under the target working voltage, analyzing the signal distortion of the audio signal to be output, updating the relation between the input voltage and the audio signal amplitude based on the current working voltage and the target signal amplitude, effectively ensuring that the determined target working voltage cannot cause the distortion of the audio signal to be output, solving the problem that the output audio signal cannot be effectively controlled due to the limitation of Brown-out mechanism application scene at present, realizing a scheme for controlling the audio signal in advance, effectively reducing the risk of the distortion of the output audio signal and ensuring the output audio signal.
Based on the foregoing embodiments, an embodiment of the present application provides an audio signal processing method, referring to fig. 5, the method being applied to an electronic device, the method including the steps of:
step 401, determining a target signal amplitude of an audio signal to be output.
Step 402, detecting a current operating voltage provided by a battery power supply for a target power amplifier.
The target power amplifier is used for controlling the audio signal to be output.
Step 403, determining a target working voltage based on a preset relation between the input voltage and the audio signal amplitude, the target signal amplitude and the current working voltage.
Step 404, detecting an audio feedback signal for the audio signal to be output under the condition that the target power amplifier is provided with a target working voltage by the battery power supply to output the audio signal to be output.
Step 405, if it is determined that signal distortion occurs when the audio signal to be output is output based on the audio feedback signal and the target signal amplitude, the relationship between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
Step 406, obtaining a first historical input voltage provided by the battery power supply for the target power amplifier in the first n sampling moments adjacent to the current moment.
Wherein n is an integer greater than 1.
In the embodiment of the application, a first historical input voltage provided by a battery power supply in n sampling moments for a target power amplifier is obtained in a previous period adjacent to the current moment.
In the embodiment of the present application, after the electronic device performs step 406, steps 407 to 408 may be selectively performed, or steps 409 to 411 may be selectively performed, or steps 412 to 413 may be selectively performed. If it is determined that the voltage drops significantly based on the first historical input voltage and the current operating voltage is less than or equal to the third voltage threshold, steps 407 to 408 are selectively performed, if it is determined that the voltage drops significantly based on the first historical input voltage and the current operating voltage is greater than the third voltage threshold, steps 409 to 411 are selectively performed, and if it is determined that the voltage drops significantly based on the first historical input voltage and the current operating voltage is greater than the third voltage threshold and the current operating voltage is less than the first voltage, steps 412 to 413 are selectively performed.
Step 407, if it is determined that a significant drop occurs in the voltage based on the first historical input voltage, and the current operating voltage is less than or equal to the third voltage threshold, determining a first maximum preset current and a third gain value based on the current operating voltage.
In the embodiment of the application, the third voltage threshold is an alert threshold. The present operating voltage and the first historical input voltage are determined to have a significant dip, i.e., the present operating voltage is significantly reduced compared to the first historical input voltage, i.e., the difference between the present operating voltage and the first historical input voltage differs by more than a voltage threshold. If the current working voltage is not obviously lower than the first historical input voltage, whether the target power amplifier is currently in voltage fluctuation protection or not can be determined, and if the current working voltage is not in voltage fluctuation protection, the subsequent other monitoring management operation for the target power amplifier is executed; and if the voltage fluctuation is in the protection of the voltage fluctuation, carrying out voltage fluctuation feedback. The first preset maximum current is a preset maximum current value which can be provided under the condition of ensuring that the audio signal to be output is not distorted when the target power amplifier ensures the output of the audio signal to be output.
The third gain value may be referenced to a hold gain value during low voltage protection.
Step 408, controlling the battery power supply to provide a first maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be a third gain value.
Step 409, if it is determined that the voltage drops obviously based on the first historical input voltage, the current working voltage is greater than the third voltage threshold, and the current working voltage is greater than or equal to the first voltage, counting the number of voltage fluctuation repetitions occurring in the previous n sampling moments and the current moment range.
The first voltage is a voltage at a previous time adjacent to the current time in the first historical input voltage.
Step 410, if the number of ripple iterations is greater than the preset number, determining a second target control parameter for the target power amplifier based on the current operating voltage.
In the embodiment of the present application, the preset number of times is an empirical value, which may be set to 1. When the number of fluctuation iterations is greater than 1, the voltage fluctuation is determined to be a repetitive fluctuation.
If the number of ripple iterations is less than or equal to the preset number, a first maximum preset current and a third gain value are determined based on the current operating voltage, i.e., if the number of ripple iterations is less than or equal to the preset number, the same operation as step 407 is performed to determine the first maximum preset current and the third gain value for the target power amplifier.
Step 411, the control target power amplifier outputs an audio signal to be output based on the second target control parameter.
Step 412, if it is determined that a significant drop occurs in the voltage based on the first historical input voltage, and the current operating voltage is greater than the third voltage threshold, and the current operating voltage is less than the first voltage, determining a second maximum preset current and a fourth gain value based on the current operating voltage.
In the embodiment of the present application, it is determined that a significant drop occurs in the voltage based on the first historical input voltage, and the current operating voltage is greater than the third voltage threshold, and the case that the current operating voltage is less than the first voltage may be determined as a case that the voltage continuously drops, where the process of determining the second maximum preset current and the fourth gain value based on the current operating voltage is the same as the process of determining the first maximum preset current and the third gain value in step 407.
Step 413, controlling the battery power supply to provide a second maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be a fourth gain value.
Based on the foregoing embodiments, in other embodiments of the present application, the step 410 may be implemented by the step 410a, or the step 410b, the step 410c, or the step 410d, corresponding to a voltage fluctuation feedback scenario when the voltage fluctuates repeatedly:
step 410a, if the number of ripple iterations is greater than the preset number, and it is determined that the target power amplifier is currently in the voltage ripple protection mode, it is determined that the second target control parameter is a historical gain value set at a time before voltage ripple protection.
In the embodiment of the application, if the target power amplifier is currently in voltage fluctuation protection and the voltage fluctuation protection exit time is satisfied, the gain setting before the voltage fluctuation protection is restored.
Step 410b, if the number of fluctuation repetitions is greater than the preset number, and the current fluctuation of the working voltage is the first occurrence after the target power amplifier exits the voltage fluctuation protection mode, determining the second target control parameter as a preset minimum gain value and a second duration for performing voltage fluctuation protection again.
The second target control parameter comprises a preset minimum gain value and a second duration.
In the embodiment of the application, the fluctuation repetition number is greater than the preset number, and the first occurrence of the fluctuation of the current working voltage after the target power amplifier exits the voltage fluctuation protection mode indicates that the voltage fluctuation problem is reappeared just after the protection is exited, namely the voltage fluctuation protection is failed, and the voltage fluctuation protection needs to be continued, namely the recovery time of the gain of the target power amplifier is delayed by setting low gain for the target power amplifier and setting the voltage fluctuation protection exit time to a plurality of detection history periods.
Step 410c, if the number of fluctuation repetitions is greater than the preset number, and the fluctuation of the current operating voltage belongs to at least the 2 nd occurrence after the current power amplifier has exited the voltage fluctuation protection mode, obtaining historical output audio signals in the first n times adjacent to the current time.
In the embodiment of the application, the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage belongs to at least the 2 nd occurrence after the current power amplifier exits the voltage fluctuation protection mode, which shows that the current voltage fluctuation problem appears, and whether the historical output audio signal has the repetition phenomenon is judged in the previous period of the current time, namely in the previous n sampling times, namely in the time corresponding to the first historical input voltage.
Step 410d, determining a second target control parameter based on the historical output audio signal.
Based on the foregoing embodiments, in other embodiments of the present application, step 410d may be implemented by step a11 or step a 12:
and a step a11 of determining the second target control parameter as a preset minimum gain value if the historical output audio signal fluctuates repeatedly at least twice.
In an embodiment of the application, the occurrence of at least two repeated fluctuations in the historical output audio signal indicates that the voltage fluctuation of the battery power supply is due to a change in the output audio signal.
And a12, if the historical output audio signal does not have repeated fluctuation and the current working voltage is lower than the second voltage threshold, determining a first target control parameter of the target power amplifier based on the current working voltage.
In the embodiment of the present application, after step 408, step 411 or step 413 is performed, the subsequent voltage change of the battery power supply may be further monitored, if it is detected that the voltage fluctuation problem provided by the battery power supply disappears and the protection exit conditions such as the recovery time are satisfied, the voltage fluctuation protection may be attempted to be removed and the gain value of the target power amplifier may be recovered, and in the recovery process, the step value may be gradually adjusted according to the gain. It should be noted that, if the problem of voltage fluctuation occurs after the fluctuation removal protection and the restoration of the gain of the target power amplifier is removed, the protection needs to be tightened, the low gain before the restoration is maintained until the voltage provided by the battery power supply is stable, and if the problem occurs repeatedly, the conditions such as the duration of maintaining the low gain value of the restoration target power amplifier are continuously prolonged. In some application scenarios, after executing step a12, the identification information for the target power amplifier may also be set as voltage fluctuation protection identification information, and the duration of exiting the voltage fluctuation protection may be set.
The historical output audio signal does not show up repeatedly, indicating that the voltage fluctuation of the battery power supply is caused by other causes of the external system.
Based on the foregoing embodiments, the embodiment of the present application provides a system architecture of an electronic device, and referring to fig. 6, the system architecture of the electronic device includes a sound source module a, a peak control module B, a low-voltage control module C, a voltage drop protection module E, a voltage fluctuation protection module D, a signal distortion feedback module F, a SmartPA G, and a battery power source H. Wherein:
The audio source module is used for providing an audio signal to be output, and the peak value control module is used for realizing the process of determining the target working voltage based on the preset relation between the input voltage and the audio signal amplitude, the target signal amplitude and the current working voltage.
The signal distortion feedback module is used for realizing the process of determining signal distortion when the audio signal to be output is output based on the audio feedback signal and the target signal amplitude.
The voltage drop protection template is used for realizing the process that the voltage fluctuation protection module is used for realizing the first maximum preset current and the third gain value based on the current working voltage if the voltage drop is determined to be obviously dropped based on the first historical input voltage and the current working voltage is smaller than or equal to the third voltage threshold value.
The voltage fluctuation protection module is used for determining a second target control parameter of the target power amplifier based on the current working voltage if the fluctuation repetition number is larger than the preset number;
the battery power supply is used for providing working voltages for the SmartPA, the sound source module and the hardware module for operating the peak control module, the low-voltage control module, the voltage drop protection module, the voltage fluctuation protection module and the signal distortion feedback module.
Based on the system architecture shown in fig. 6, the basic flow of the implemented audio signal processing may be as shown in fig. 7, including:
step 501, data acquisition.
The data acquisition includes acquiring a current input voltage of the SmartPA and an IV Sense feedback signal of the SmartPA, where the current input voltage of the SmartPA is a current working voltage provided by the battery power supply for the target power amplifier, and the IV Sense feedback signal of the SmartPA is an audio feedback signal of the audio signal to be output.
Step 502, basic calculation.
The basic calculation comprises the steps of obtaining an audio signal to be output, calculating the overall signal size, the large signal amplitude and the large signal amplitude duty ratio of the audio signal to be output, evaluating the load size and the output capacity of the system according to the voltage size and the sound source amplitude, outputting working parameters of the audio signal to be output aiming at SmartPA, and the like; the overall signal size of the audio signal to be output is the target signal amplitude of the audio signal to be output, the large signal amplitude is the signal amplitude of the audio signal to be output, the target signal amplitude of which is counted to be greater than the amplitude threshold, and the large signal amplitude ratio is the ratio of the large signal amplitude to the target signal amplitude.
Step 503, module processing.
The module processing comprises various processing of a peak value control module, a low-voltage control module, a voltage drop protection module, a voltage fluctuation protection module and a signal distortion feedback module.
The peak control module determines a peak working parameter, such as a maximum working voltage, for SmartPA when outputting an audio signal to be output according to the relation between the input voltage and the audio signal amplitude recorded by the signal distortion feedback module. The signal distortion feedback module corrects the relation between the input voltage and the amplitude of the audio signal according to the control result of the peak value control module.
The low-voltage control module is used for adjusting the system gain by adopting a hysteresis loop method under the condition of too low electric quantity or too heavy load provided by the battery power supply.
The voltage drop protection module is used for adjusting the working gain of the SmartPA and limiting the maximum current provided to the SmartPA if the voltage provided by the battery power supply has serious drop or continuously and greatly drops.
The voltage fluctuation protection module is used for setting and keeping the working gain of the SmartPA to be low according to the fluctuation reason until the fluctuation of the voltage provided by the battery power supply disappears if the voltage provided by the battery power supply has repeated fluctuation. The voltage fluctuation protection module belongs to a special case in voltage drop under the condition of specific voltage fluctuation.
It should be noted that, in this embodiment, the descriptions of the same steps and the same content as those in other embodiments may refer to the descriptions in other embodiments, and are not repeated here.
The embodiment of the application provides an audio signal processing method, which is used for analyzing the current working voltage provided by a battery power supply for a target power amplifier and the target signal amplitude of an audio signal to be output based on the preset relation between the input voltage and the audio signal amplitude, determining the target working voltage, controlling the battery power supply to provide the target working voltage for the target power amplifier to output the audio signal to be output, further analyzing an audio feedback signal when the audio signal to be output is output under the target working voltage, analyzing the signal distortion of the audio signal to be output, updating the relation between the input voltage and the audio signal amplitude based on the current working voltage and the target signal amplitude, effectively ensuring that the determined target working voltage cannot cause the distortion of the audio signal to be output, solving the problem that the output audio signal cannot be effectively controlled due to the limitation of Brown-out mechanism application scene at present, realizing a scheme for controlling the audio signal in advance, effectively reducing the risk of the distortion of the output audio signal and ensuring the output audio signal.
Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, which may be applied to the audio signal processing method provided in the corresponding embodiment of fig. 1 to 5, and referring to fig. 8, the electronic device 6 may include: a battery power supply 61, a processor 62 and an audio processing system 63 comprising a target power amplifier, wherein:
a processor 62 for determining a target signal amplitude of an audio signal to be output; detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output; determining a target working voltage based on a preset relation between the input voltage and the amplitude of the audio signal, the target signal amplitude and the current working voltage; generating a control instruction for controlling the battery power supply to provide a target working voltage for the audio processing system to the battery power supply;
a battery power supply 61 for receiving a control instruction and providing a power supply corresponding to a target operating voltage for the audio processing system;
an audio processing system 63 for outputting an audio signal to be output based on the target operating voltage;
the processor 62 is further configured to detect an audio feedback signal for the audio signal to be output in a case where the target power amplifier is provided with a target operating voltage by the battery power source to output the audio signal to be output; if the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude.
In other embodiments of the present application, the processor is configured to perform the step of determining the target operating voltage based on a preset relationship between the input voltage and the audio signal amplitude, the target signal amplitude, and the current operating voltage, by:
determining a theoretical working voltage when an audio signal to be output is output from the relation between the input voltage and the audio signal amplitude based on the target signal amplitude;
determining a desired output power for the target power amplifier based on the theoretical operating voltage;
determining an actual output power for the target power amplifier based on the current operating voltage;
the target operating voltage is determined based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude.
In other embodiments of the present application, the processor is configured to perform the step of determining the target operating voltage based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude, by:
if the current working voltage is smaller than the first voltage threshold value, determining a target difference value between the expected output power and the actual output power;
if the target difference value is greater than or equal to the power threshold value, counting a target duty ratio that the target signal amplitude of the audio signal to be output is greater than the amplitude threshold value;
And if the target duty ratio is smaller than the preset duty ratio, determining the target working voltage as the preset maximum output voltage.
In other embodiments of the present application, the processor is further configured to perform the steps of:
if the target duty ratio is greater than or equal to the preset duty ratio, determining a first target control parameter of the target power amplifier based on the current working voltage;
the operating parameter of the control target power amplifier is a first target control parameter.
In other embodiments of the present application, the processor is configured to perform the step of determining the first target control parameter of the target power amplifier based on the current operating voltage if the target duty ratio is greater than or equal to the preset duty ratio, by:
if the target duty ratio is greater than or equal to the preset duty ratio, estimating the dropping working voltage of the battery power supply after the voltage drop of the target power amplifier based on the current working voltage;
if the identification content of the target power amplifier is non-low electric control identification information and the drop working voltage is smaller than the second voltage threshold or the current working voltage is smaller than the second voltage threshold, determining a voltage uplink hysteresis threshold; wherein the second voltage threshold is less than the first voltage threshold;
if the current working voltage is greater than or equal to the voltage upward hysteresis threshold, determining the first target control parameter as an initialization gain value.
In other embodiments of the present application, the processor is further configured to perform the steps of:
if the current working voltage is smaller than the voltage uplink hysteresis threshold, updating the low electric control identification content aiming at the target power amplifier into low electric control identification information, and starting timing;
if the current gain value of the target power amplifier is a first preset gain value and the timing duration is within the preset gain holding duration, determining a first target control parameter as the first gain value; the preset gain holding time length and the first preset gain value have an association relation;
if the current gain value is not the first preset gain value and the timing duration is within the preset gain holding duration, reducing and adjusting the gain of the target power amplifier from the current gain value according to the gain adjustment stepping value to obtain a second gain value; wherein the first target control parameter comprises a second gain value.
In other embodiments of the present application, the processor is further configured to perform the steps of:
if the timing time length is longer than the preset gain holding time length, determining a change relation between the current working voltage and the previous historical voltage at the moment adjacent to the current moment;
determining a low-voltage hysteresis region of the current working voltage based on the change relation;
If the low-voltage hysteresis region is different from a previous historical voltage hysteresis region at a moment adjacent to the current moment, determining a first target control parameter as a first gain value corresponding to the current working voltage and a first duration for maintaining the first gain value;
if the low-voltage hysteresis region is the same as the historical voltage hysteresis region, determining that the first target control parameter is a historical gain value corresponding to the previous historical voltage hysteresis region.
In other embodiments of the present application, the processor is further configured to perform the steps of:
acquiring first historical input voltages provided by battery power supplies in the first n sampling moments adjacent to the current moment for a target power amplifier; wherein n is an integer greater than 1;
if the voltage is determined to have obvious drop based on the first historical input voltage, and the current working voltage is smaller than or equal to a third voltage threshold value, determining a first maximum preset current and a third gain value based on the current working voltage;
controlling a battery power supply to provide a first maximum preset current for a target power amplifier, and controlling the gain of the target power amplifier to be a third gain value;
if the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than a third voltage threshold value, the current working voltage is larger than or equal to the first voltage, and the number of voltage fluctuation repetition times in the range of the previous n sampling moments and the current moment is counted; the first voltage is a voltage of a previous moment adjacent to the current moment in the first historical input voltage;
If the fluctuation repetition number is greater than the preset number, determining a second target control parameter for the target power amplifier based on the current working voltage;
the control target power amplifier outputs an audio signal to be output based on the second target control parameter;
if the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than a third voltage threshold value, the current working voltage is smaller than the first voltage, and a second maximum preset current and a fourth gain value are determined based on the current working voltage;
and controlling the battery power supply to provide a second maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be a fourth gain value.
In other embodiments of the present application, the processor is configured to perform the step of determining the second target control parameter for the target power amplifier based on the current operating voltage if the number of ripple iterations is greater than a preset number, by:
if the fluctuation repetition number is greater than the preset number, determining that the target power amplifier is currently in a voltage fluctuation protection mode, and determining that the second target control parameter is a historical gain value set at the moment before voltage fluctuation protection;
If the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage is the first occurrence after the target power amplifier exits the voltage fluctuation protection mode, determining a second target control parameter as a preset minimum gain value and a second duration for carrying out voltage fluctuation protection again; the second target control parameter comprises a preset minimum gain value and a second duration;
if the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage belongs to at least the 2 nd occurrence after the current power amplifier exits the voltage fluctuation protection mode, acquiring historical output audio signals in the first n times adjacent to the current time;
a second target control parameter is determined based on the historical output audio signal.
In other embodiments of the present application, the processor is configured to perform the step of determining the second target control parameter based on the historical output audio signal by:
if the historical output audio signal repeatedly fluctuates at least twice, determining that the second target control parameter is a preset minimum gain value;
if the historical output audio signal does not have repeated fluctuation and the current working voltage is lower than the second voltage threshold, determining a first target control parameter of the target power amplifier based on the current working voltage; wherein the second target control parameter comprises the first target control parameter.
It should be noted that, the specific implementation process of the steps executed by the processor in this embodiment may refer to the implementation process in the audio signal processing method provided in the corresponding embodiment of fig. 1 to 5, which is not described herein again.
According to the electronic equipment provided by the embodiment of the application, the current working voltage provided by the battery power supply for the target power amplifier and the target signal amplitude of the audio signal to be output are analyzed based on the preset relation between the input voltage and the audio signal amplitude, the target working voltage is determined, the battery power supply is controlled to provide the target working voltage for the target power amplifier to output the audio signal to be output, further, the audio feedback signal when the audio signal to be output is output under the target working voltage is analyzed to analyze the signal distortion of the audio signal to be output, and the relation between the input voltage and the audio signal amplitude is updated based on the current working voltage and the target signal amplitude, so that the situation that the determined target working voltage cannot cause the distortion of the audio signal to be output is effectively ensured, the problem that the output audio signal cannot be effectively controlled due to the limitation of a Brown-out mechanism application scene is solved, the scheme for controlling the audio signal in advance is realized, the risk of the distortion of the output audio signal is effectively reduced, and the output sound effect of the output audio signal is ensured.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium, which may be simply referred to as a storage medium, and the computer-readable storage medium stores one or more programs, and the one or more programs may be executed by one or more processors, so as to implement the implementation procedure of the audio signal processing method provided in the embodiments corresponding to fig. 1 to 5, which is not described herein again.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A method of audio signal processing, the method comprising:
determining a target signal amplitude of an audio signal to be output;
detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output;
Determining a target working voltage based on a preset relation between input voltage and audio signal amplitude, the target signal amplitude and the current working voltage;
detecting an audio feedback signal for the audio signal to be output under the condition that the target working voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output;
if the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, updating the relation between the input voltage and the audio signal amplitude based on the current working voltage and the target signal amplitude;
acquiring first historical input voltages provided by the battery power supply for the target power amplifier in the first n sampling moments adjacent to the current moment; wherein n is an integer greater than 1;
if the voltage is determined to have obvious drop based on the first historical input voltage, and the current working voltage is smaller than or equal to a third voltage threshold value, determining a first maximum preset current and a third gain value based on the current working voltage;
and controlling the battery power supply to provide the first maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be the third gain value.
2. The method of claim 1, the determining a target operating voltage based on a preset input voltage to audio signal amplitude relationship, the target signal amplitude, and the current operating voltage, comprising:
determining a theoretical working voltage when the audio signal to be output is output from the relation between the input voltage and the audio signal amplitude based on the target signal amplitude;
determining a desired output power for the target power amplifier based on the theoretical operating voltage;
determining an actual output power for the target power amplifier based on the current operating voltage;
the target operating voltage is determined based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude.
3. The method of claim 2, the determining the target operating voltage based on the current operating voltage, the desired output power, the actual output power, and the target signal amplitude, comprising:
if the current working voltage is smaller than a first voltage threshold value, determining a target difference value between the expected output power and the actual output power;
if the target difference value is larger than or equal to a power threshold value, counting a target duty ratio that the target signal amplitude of the audio signal to be output is larger than an amplitude threshold value;
And if the target duty ratio is smaller than the preset duty ratio, determining that the target working voltage is the preset maximum output voltage.
4. A method according to claim 3, the method further comprising:
if the target duty ratio is greater than or equal to the preset duty ratio, determining a first target control parameter of the target power amplifier based on the current working voltage;
and controlling the working parameter of the target power amplifier to be the first target control parameter.
5. The method of claim 4, wherein determining the first target control parameter of the target power amplifier based on the current operating voltage if the target duty cycle is greater than or equal to the preset duty cycle comprises:
if the target duty ratio is greater than or equal to the preset duty ratio, estimating a dropping working voltage of the battery power supply after the voltage of the target power amplifier drops based on the current working voltage;
if the identification content of the target power amplifier is non-low electric control identification information and the drop working voltage is smaller than a second voltage threshold or the current working voltage is smaller than the second voltage threshold, determining a voltage uplink hysteresis threshold; wherein the second voltage threshold is less than the first voltage threshold;
And if the current working voltage is greater than or equal to the voltage upward hysteresis threshold, determining the first target control parameter as an initialization gain value.
6. The method of claim 5, the method further comprising:
if the current working voltage is smaller than the voltage uplink hysteresis threshold, updating the low electric control identification content aiming at the target power amplifier into low electric control identification information, and starting timing;
if the current gain value of the target power amplifier is a first preset gain value and the timing duration is within the preset gain holding duration, determining that the first target control parameter is the first gain value; wherein the preset gain holding time length and the first preset gain value have an association relation;
if the current gain value is not the first preset gain value and the timing duration is within the preset gain holding duration, reducing and adjusting the gain of the target power amplifier from the current gain value according to a gain adjustment stepping value to obtain a second gain value; wherein the first target control parameter comprises the second gain value.
7. The method of claim 6, the method further comprising:
If the timing time is longer than the preset gain holding time, determining a change relation between the current working voltage and the previous historical voltage at the moment adjacent to the current moment;
determining a low-voltage hysteresis region of the current working voltage based on the change relation;
if the low-voltage hysteresis region is different from a previous historical voltage hysteresis region at a time adjacent to the current time, determining that the first target control parameter is a first gain value corresponding to the current working voltage and a first duration for maintaining the first gain value;
and if the low-voltage hysteresis region is the same as the historical voltage hysteresis region, determining that the first target control parameter is a historical gain value corresponding to the historical voltage hysteresis region.
8. The method of claim 1, the method further comprising:
if the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than the third voltage threshold value, and the current working voltage is larger than or equal to the first voltage, counting the voltage fluctuation repetition times in the range of the first n sampling moments and the current moment; the first voltage is a voltage of a previous moment adjacent to the current moment in the first historical input voltage;
If the fluctuation repetition number is greater than a preset number, determining a second target control parameter for the target power amplifier based on the current working voltage;
controlling the target power amplifier to output the audio signal to be output based on the second target control parameter;
if the voltage is determined to have obvious drop based on the first historical input voltage, the current working voltage is larger than the third voltage threshold value, the current working voltage is smaller than the first voltage, and a second maximum preset current and a fourth gain value are determined based on the current working voltage;
and controlling the battery power supply to provide the second maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be the fourth gain value.
9. The method of claim 8, wherein determining a second target control parameter for the target power amplifier based on the current operating voltage if the number of ripple iterations is greater than a preset number comprises:
if the fluctuation repetition number is greater than a preset number, determining that the target power amplifier is currently in a voltage fluctuation protection mode, and determining that the second target control parameter is a historical gain value set at the moment before the voltage fluctuation protection;
If the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage is the first occurrence after the target power amplifier exits the voltage fluctuation protection mode, determining the second target control parameter as a preset minimum gain value and a second duration for performing voltage fluctuation protection again; wherein the second target control parameter includes the preset minimum gain value and the second duration;
if the fluctuation repetition number is greater than the preset number, and the fluctuation of the current working voltage belongs to at least the 2 nd occurrence after the current power amplifier exits the voltage fluctuation protection mode, acquiring historical output audio signals in the first n times adjacent to the current time;
determining the second target control parameter based on the historical output audio signal;
still further, the determining the second target control parameter based on the historical output audio signal includes:
if the historical output audio signal repeatedly fluctuates at least twice, determining that the second target control parameter is the preset minimum gain value;
if the historical output audio signal does not have repeated fluctuation and the current working voltage is lower than a second voltage threshold, determining a first target control parameter of the target power amplifier based on the current working voltage; wherein the second target control parameter comprises the first target control parameter.
10. An electronic device, the electronic device comprising: a battery power supply, a processor, and an audio processing system including a target power amplifier; wherein:
the processor is used for determining a target signal amplitude of an audio signal to be output; detecting the current working voltage provided by a battery power supply for a target power amplifier; the target power amplifier is used for controlling the audio signal to be output; determining a target working voltage based on a preset relation between input voltage and audio signal amplitude, the target signal amplitude and the current working voltage; generating a control instruction to the battery power supply for controlling the battery power supply to provide the target operating voltage for the audio processing system;
the battery power supply is used for receiving the control instruction and providing a power supply corresponding to the target working voltage for the audio processing system;
the audio processing system is used for outputting the audio signal to be output based on the target working voltage;
the processor is further configured to detect an audio feedback signal for the audio signal to be output when the target operating voltage is provided for the target power amplifier by the battery power supply to output the audio signal to be output; if the signal distortion occurs when the audio signal to be output is determined to be output based on the audio feedback signal and the target signal amplitude, updating the relation between the input voltage and the audio signal amplitude based on the current working voltage and the target signal amplitude;
The processor is further configured to obtain a first historical input voltage provided by the battery power supply for the target power amplifier in the first n sampling moments adjacent to the current moment; wherein n is an integer greater than 1; if the voltage is determined to have obvious drop based on the first historical input voltage, and the current working voltage is smaller than or equal to a third voltage threshold value, determining a first maximum preset current and a third gain value based on the current working voltage; and controlling the battery power supply to provide the first maximum preset current for the target power amplifier, and controlling the gain of the target power amplifier to be the third gain value.
CN202110340601.7A 2021-03-30 2021-03-30 Audio signal processing method, electronic equipment and storage medium Active CN113132856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110340601.7A CN113132856B (en) 2021-03-30 2021-03-30 Audio signal processing method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110340601.7A CN113132856B (en) 2021-03-30 2021-03-30 Audio signal processing method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113132856A CN113132856A (en) 2021-07-16
CN113132856B true CN113132856B (en) 2023-08-18

Family

ID=76775499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110340601.7A Active CN113132856B (en) 2021-03-30 2021-03-30 Audio signal processing method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113132856B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691677B (en) * 2021-08-25 2022-12-16 Oppo广东移动通信有限公司 Audio output control method and device, electronic equipment and storage medium
CN114281139B (en) * 2021-12-14 2023-11-10 科大讯飞(苏州)科技有限公司 Voltage regulation method of vehicle, voltage regulation circuit and electric vehicle

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60196098A (en) * 1984-03-19 1985-10-04 Matsushita Electric Ind Co Ltd Speaker device of low distortion
CN1643784A (en) * 2002-01-18 2005-07-20 美国技术公司 Modulator- amplifier
CN103414444A (en) * 2013-07-09 2013-11-27 苏州佳世达电通有限公司 Voice output control method, control system thereof and intelligent mobile terminal
CN104167209A (en) * 2014-08-06 2014-11-26 华为软件技术有限公司 Method and device for detecting audio distortion
CN104811153A (en) * 2014-05-27 2015-07-29 深圳市三德大康电子有限公司 Power amplifier capable of adjusting gain and dynamic range along with cell voltage change
CN105553434A (en) * 2015-10-28 2016-05-04 东莞酷派软件技术有限公司 Intelligent terminal audio control method and system and intelligent terminal
CN109379689A (en) * 2018-10-30 2019-02-22 Oppo广东移动通信有限公司 Loudspeaker total harmonic distortion measurement method, device, storage medium and measuring system
WO2019190551A1 (en) * 2018-03-30 2019-10-03 Armando Cova Feedback control systems for wireless devices
CN110868672A (en) * 2018-08-28 2020-03-06 武汉市聚芯微电子有限责任公司 Loudspeaker signal protection device and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012196774A (en) * 2011-03-18 2012-10-18 Seiko Epson Corp Ejection testing device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60196098A (en) * 1984-03-19 1985-10-04 Matsushita Electric Ind Co Ltd Speaker device of low distortion
CN1643784A (en) * 2002-01-18 2005-07-20 美国技术公司 Modulator- amplifier
CN103414444A (en) * 2013-07-09 2013-11-27 苏州佳世达电通有限公司 Voice output control method, control system thereof and intelligent mobile terminal
CN104811153A (en) * 2014-05-27 2015-07-29 深圳市三德大康电子有限公司 Power amplifier capable of adjusting gain and dynamic range along with cell voltage change
CN104167209A (en) * 2014-08-06 2014-11-26 华为软件技术有限公司 Method and device for detecting audio distortion
CN105553434A (en) * 2015-10-28 2016-05-04 东莞酷派软件技术有限公司 Intelligent terminal audio control method and system and intelligent terminal
WO2019190551A1 (en) * 2018-03-30 2019-10-03 Armando Cova Feedback control systems for wireless devices
CN110868672A (en) * 2018-08-28 2020-03-06 武汉市聚芯微电子有限责任公司 Loudspeaker signal protection device and method
CN109379689A (en) * 2018-10-30 2019-02-22 Oppo广东移动通信有限公司 Loudspeaker total harmonic distortion measurement method, device, storage medium and measuring system

Also Published As

Publication number Publication date
CN113132856A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN113132856B (en) Audio signal processing method, electronic equipment and storage medium
US10498156B2 (en) Charging control method, charging control device and terminal
EP3036600B1 (en) Method and controller for power throttling system on portable device, corresponding portable device, and corresponding computer program product
US9307495B2 (en) Monitoring a battery in a portable electronic device
US20170358931A1 (en) Charging method and electronic device
US8478567B2 (en) Systems and methods for measuring the effectiveness of a workload predictor on a mobile device
CN112667407B (en) Processor parameter adjusting method and device, electronic equipment and storage medium
CN104953814B (en) A kind of method and apparatus for controlling pfc circuit
JP2013183633A (en) Electronic device, and power failure protection device and method applied to said electronic device
US20240079010A1 (en) Method for controlling remote controller to avoid loss of function through a low voltage condition, remote controller device, and non-transitory storage medium
CN111024410B (en) Power overrun fault detection method and device for vehicle, vehicle and storage medium
CN112039064A (en) Control method based on power supply system and related device
CN113629654B (en) Power supply control method, circuit, device and readable storage medium
CN114142752B (en) Power self-adaptive adjusting method of energy storage inverter power supply and computer readable storage medium
CN115313870A (en) Soft start pre-charging control method, device, equipment and storage medium
CN110556879B (en) Control method and device of energy storage system, server and storage medium
TW201946478A (en) An optimized method and device for power supply of a smart speaker battery
CN110112805B (en) Battery charging and discharging control method and system, mobile terminal and storage medium
CN107708036B (en) Method and device for debugging output power of audio equipment
CN112640247B (en) Power supply management equipment and control method
CN112152291B (en) Battery control method and electronic equipment
CN115809173A (en) Power determination method, audio adjustment method, device, storage medium and electronic equipment
CN114850623A (en) Output control method and system of gas shielded welding machine
CN116653697A (en) Power battery charging method, device, equipment and medium
CN112730971A (en) Reactive power measuring system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant