Amplitude control method and device, electronic equipment and medium
By obtaining the air pressure value and input audio signal at the position of the micro speaker, and determining and limiting the amplitude of its amplitude, the problem that the micro speakers have an amplitude beyond the safe range in a low-voltage environment is solved, and the effect of effectively controlling the amplitude and improving playback performance and service life is achieved.
Patent Information
- Application Number
- CN202411791277.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
In low-voltage environments, the amplitude of the micro speakers is prone to exceed the safety range, resulting in the problem of noise and disconnection of the voice coil.
By obtaining the air pressure value and input audio signal at the position of the micro speaker, the amplitude of the micro speaker is determined and the input audio signal is limited according to the amplitude to ensure that the amplitude is within a safe range.
Effectively control the amplitude of the micro speakers in low-voltage environments, prevent noise and voice coil from being disconnected, improve playback performance and extend service life.
Smart Images

Figure CN119729306A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of audio processing technology, and specifically relates to an amplitude control method, device, electronic device and medium. Background Art
[0002] The sound cavity of the micro speaker is small. In order to increase the volume of the micro speaker, the power amplifier (PA or Amp) at the front end of the micro speaker is modeled in a high voltage manner. In this way, under normal air pressure, when the micro speaker plays music at the maximum volume, the PA cooperates with the speaker protection algorithm to keep the amplitude of the micro speaker within the safe amplitude. However, in high altitude areas, the micro speaker is in a low air pressure state, which makes the amplitude of the micro speaker abnormally higher than the safe amplitude, resulting in noise in the micro speaker and even causing the voice coil of the micro speaker to break.
[0003] Therefore, how to control the amplitude of micro speakers in a low-pressure environment is an urgent problem to be solved. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an amplitude control method, device, electronic device and medium, which can effectively control the amplitude of a micro speaker in a low-pressure environment.
[0005] In a first aspect, an embodiment of the present application provides an amplitude control method, the method comprising: obtaining a first air pressure value at a position where a micro-speaker is located; determining a first amplitude of the micro-speaker based on the first air pressure value and an input audio signal of the micro-speaker; and performing limiting processing on the input audio signal based on the first amplitude.
[0006] In a second aspect, an embodiment of the present application provides an amplitude control device, which includes: an acquisition module and a processing module; the acquisition module is used to acquire a first air pressure value at the position of the micro-speaker; the processing module is used to determine a first amplitude of the micro-speaker based on the first air pressure value acquired by the acquisition module and the input audio signal of the micro-speaker; the processing module is also used to perform limiting processing on the input audio signal based on the first amplitude.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In the embodiment of the present application, since the amplitude of the micro-speaker can be determined according to the air pressure value at the location of the micro-speaker and the current input audio signal of the micro-speaker, and the input audio signal is limited according to the determined amplitude, it can be ensured that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker. Therefore, even if the micro-speaker is in a low-pressure environment (such as the ambient air pressure is less than the standard atmospheric pressure), the amplitude of the micro-speaker can be effectively controlled, thereby improving the playback performance of the micro-speaker and extending the service life of the micro-speaker. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flow chart of an amplitude control method provided in an embodiment of the present application;
[0013] Figure 2A is a schematic diagram of a displacement response curve in an amplitude control method provided in an embodiment of the present application;
[0014] Figure 2B is a schematic diagram of an impedance curve in an amplitude control method provided in an embodiment of the present application;
[0015] Figure 3A It is a schematic diagram of the strength of the first functional relationship in an amplitude control method provided in an embodiment of the present application;
[0016] Figure 3B It is a schematic diagram of the strength of the second functional relationship in an amplitude control method provided in an embodiment of the present application;
[0017] Figure 4 It is a schematic diagram of a modeling process of micro-speaker parameters in an amplitude control method provided in an embodiment of the present application;
[0018] Figure 5 It is a flow chart of an amplitude control method provided in an embodiment of the present application;
[0019] Figure 6 is a structural schematic diagram of an amplitude control device provided in an embodiment of the present application;
[0020] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0021] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0024] The amplitude control method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0025] The amplitude control method, device, electronic device, and medium provided in the embodiments of the present application can be applied to the scenario of controlling the amplitude of a micro speaker.
[0026] Exemplarily, when the micro-speaker is in a low-pressure environment, the first air pressure value of the location of the micro-speaker can be obtained; and according to the first air pressure value and the input audio signal of the micro-speaker, the first amplitude of the micro-speaker is determined; according to the first amplitude, the input audio signal is limited so that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker, thereby avoiding noise and voice coil disconnection in the micro-speaker, and further improving the playback performance and service life of the micro-speaker. Among them, "low-pressure environment" means that the difference between the air pressure of the environment in which the micro-speaker is located and the standard atmospheric pressure is large. For example, if the ambient air pressure of the environment in which the micro-speaker is located is 0.6*standard atmospheric pressure, then the environment in which the micro-speaker is located can be considered to be a low-pressure environment.
[0027] Exemplarily, when the micro-speaker is in a normal air pressure environment, the first air pressure value of the position of the micro-speaker can be obtained; and according to the first air pressure value and the input audio signal of the micro-speaker, the first amplitude of the micro-speaker is determined; according to the first amplitude, the input audio signal is limited so that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker, thereby avoiding noise and voice coil disconnection in the micro-speaker, and further improving the playback performance and service life of the micro-speaker. Among them, "normal air pressure environment" means that the difference between the air pressure of the environment in which the micro-speaker is located and the standard atmospheric pressure is small. For example, if the ambient air pressure of the environment in which the micro-speaker is located is 0.9*standard atmospheric pressure, then the environment in which the micro-speaker is located can be considered to be a normal air pressure environment.
[0028] The embodiment of the present application provides an amplitude control method. The amplitude control method provided by the embodiment of the present application can be executed by an amplitude control device, or an electronic device, or a functional module or entity in the electronic device. In the embodiment of the present application, an image processing device executing the amplitude control method is taken as an example to illustrate the amplitude control method provided by the embodiment of the present application.
[0029] The present application embodiment provides an amplitude control method, such as Figure 1 As shown, the amplitude control method may include the following steps 101 to 103.
[0030] Step 101: The electronic device obtains a first air pressure value at a location of the micro speaker.
[0031] In some embodiments of the present application, the distance between the electronic device and the micro speaker is less than or equal to a preset distance. For example, the electronic device and the micro speaker are both devices carried by the user.
[0032] In some embodiments of the present application, the micro speaker can be a micro speaker in an electronic device or a micro speaker in other devices, which is not limited in the embodiments of the present application. When the micro speaker is a micro speaker in other devices, the other devices are connected to the electronic device for communication.
[0033] In some embodiments of the present application, the electronic device may obtain the first air pressure value through a positioning module, or may obtain the first air pressure value through an air pressure sensor.
[0034] In some embodiments of the present application, the above step 101 can be implemented by the following steps 101A to 101C.
[0035] Step 101A: The electronic device obtains location information of the micro speaker.
[0036] In some embodiments of the present application, the electronic device may use a positioning system to obtain location information of the micro speaker.
[0037] Among them, the above-mentioned positioning system may include but is not limited to any of the following: Global Navigation Satellite System (GNSS), Global Positioning System (GPS), BeiDou Navigation Satellite System (BDS), Global Orbiting Navigation Satellite System (GLONASS), and Galileo satellite navigation system (GALILEO), etc.
[0038] In some embodiments of the present application, the above-mentioned position information may be coordinate information of the position of the micro speaker.
[0039] Step 101B: The electronic device determines the altitude information of the location of the micro speaker according to the location information of the location of the micro speaker.
[0040] In some embodiments of the present application, after the electronic device obtains the location information of the micro speaker, it can determine the altitude information of the location of the micro speaker according to the location information of the micro speaker and the first correspondence list, wherein the first correspondence list is a correspondence list between the location information in the world map and the altitude information.
[0041] Step 101C: The electronic device determines a first air pressure value according to the altitude information of the location of the micro speaker.
[0042] In some embodiments of the present application, the electronic device may use Formula 1 according to the position information of the micro speaker: Calculate the altitude information of the location of the micro speaker. Where h is the altitude information of the location of the micro speaker, in meters; P0 is the standard atmospheric pressure, which is 101.325 kPa; P is the first atmospheric pressure, in kPa. The atmospheric pressure in high altitude areas is less than the standard atmospheric pressure, and the ratio of the first atmospheric pressure to the standard atmospheric pressure is in the range of [0.5, 1].
[0043] For example, the altitude corresponding to 0.6-0.9 standard atmospheric pressure is calculated according to Formula 1 as follows:
[0044] 0.6 standard atmospheres: 44330*(1-(0.6)^(1 / 5.255))=4106 meters;
[0045] 0.7 standard atmospheres: 44330*(1-(0.7)^(1 / 5.255))=2909 meters;
[0046] 0.8 standard atmosphere: 44330*(1-(0.8)^(1 / 5.255))=1843 meters;
[0047] 0.9 standard atmospheric pressure: 44330*(1-(0.9)^(1 / 5.255))=880 meters.
[0048] According to map information statistics, the altitude range of high altitude areas is 1000 meters to 4000 meters; thus, the above calculation result is consistent with the altitude range of high altitude areas. Therefore, the amplitude control method provided in the embodiment of the present application can be applied to the atmospheric pressure range of 0.6-0.9, and can achieve speaker amplitude protection in high altitude and low pressure areas. In other words, according to the above formula 1, it is feasible and reliable to calculate the air pressure value at the location of the micro speaker.
[0049] In this way, since the position information of the micro-speaker can be obtained according to the positioning module, and the altitude information of the micro-speaker can be determined according to the position information, and the first air pressure value of the micro-speaker can be determined according to the altitude information, that is, the air pressure value can be indirectly obtained according to the existing module in the electronic device, thereby saving the production cost of the electronic device and the internal space of the electronic device.
[0050] Step 102: The electronic device determines a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker.
[0051] In some embodiments of the present application, the input audio signal may be a current input audio signal of the micro-speaker.
[0052] In some embodiments of the present application, the input audio signal may be a digital audio signal.
[0053] In some embodiments of the present application, the electronic device may determine the first amplitude of the micro-speaker according to the voltage value of the input audio signal of the micro-speaker and the first air pressure value.
[0054] It can be understood that the first amplitude is: when the air pressure at the location of the micro-speaker is the first air pressure value, when the micro-speaker is driven by the above input audio signal to make a sound, the determined amplitude or theoretical amplitude of the micro-speaker.
[0055] In some embodiments of the present application, the electronic device may first perform high-pass filtering on the input audio signal to filter out low-frequency signals within 100 Hz, and then determine the first amplitude based on the filtered input audio signal and the first air pressure value to improve the determination accuracy.
[0056] It can be understood that the extremely low frequency signal in the audio signal has a nonlinear characteristic in amplitude, which may lead to inaccurate amplitude determination results, and the human ear cannot hear the audio signal of the micro speaker in this frequency band.
[0057] In some embodiments of the present application, the above step 102 can be implemented through the following steps 102A to 102C.
[0058] Step 102A: The electronic device determines a first speaker parameter of the micro-speaker at the first air pressure value according to the first air pressure value.
[0059] It can be understood that the “first speaker parameter of the micro speaker at the first air pressure value” can be: the speaker parameter of the micro speaker when the micro speaker is in an environment with the first air pressure value. In other words, the first speaker parameter is: the speaker parameter of the micro speaker corresponding to the first air pressure value.
[0060] In some embodiments of the present application, the air pressure values at the locations where the micro-speakers are located are different, and the speaker parameters of the micro-speakers may be different.
[0061] In some embodiments of the present application, the speaker parameters of the micro speaker may include parameter 1 and parameter 2. Parameter 1 may include but is not limited to at least one of the following:
[0062] DC resistance R e , in ohms;
[0063] Force factor Bl, unit N / A;
[0064] Total mechanical mass M ms , the unit is Kg;
[0065] Air damping coefficient R ms , unit is kg / s;
[0066] Compliance coefficient C ms , unit is mm / N.
[0067] Parameter 2 may include but is not limited to at least one of the following: resonant frequency F0, in Hz; quality factor Q ts .
[0068] In some embodiments of the present application, the resonant frequency and quality factor of the micro-speaker can be evaluated based on one or more of the DC resistance, force factor, total mechanical mass, air damping coefficient and force compliance coefficient of the micro-speaker.
[0069] In some embodiments of the present application, the above step 102A can be implemented through the following step 102A1.
[0070] Step 102A1: The electronic device determines the first speaker parameter according to the first air pressure value and the functional relationship between the speaker parameter of the micro speaker and the air pressure value at the position where the micro speaker is located.
[0071] In some embodiments of the present application, the above functional relationship can be determined by speaker parameters obtained by modeling the micro-speaker under multiple air pressures.
[0072] In some embodiments of the present application, the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker can represent the influence of the air pressure value of the environment in which the micro-speaker is located on the speaker parameters of the micro-speaker.
[0073] In this way, since the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker can characterize the influence of the air pressure value of the environment in which the micro-speaker is located on the speaker parameters of the micro-speaker, the speaker parameters of the micro-speaker under specific air pressure can be accurately determined according to the first air pressure value according to the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker, thereby improving the reliability of the determined speaker parameters of the micro-speaker.
[0074] Step 102B: The electronic device updates the amplitude filter coefficient of the micro-speaker according to the first speaker parameter.
[0075] Step 102C: The electronic device determines a first amplitude according to the input audio signal and the updated amplitude filter coefficient of the micro-speaker.
[0076] In some embodiments of the present application, the electronic device may convert the speaker parameters of the micro-speaker into the first amplitude filter coefficients, and update the amplitude filter coefficients of the micro-speaker to the first amplitude filter coefficients.
[0077] For a detailed description of converting the speaker parameters into the amplitude filter coefficients and determining the first amplitude according to the input audio signal and the updated amplitude filter coefficients of the micro-speaker, please refer to the related art, which will not be described here to avoid repetition.
[0078] It can be understood that, since the electronic device determines the amplitude of the micro-speaker according to the air pressure value of the current environment of the micro-speaker and the above-mentioned functional relationship, compared with the scheme of setting an intelligent power amplifier for the micro-speaker, that is, setting an amplifier with feedback electrical information, the amplitude control method provided in the embodiment of the present application can save the production cost and material cost of the micro-speaker. In addition, since the amplitude is determined before the micro-speaker makes a sound, the amplitude control method provided in the embodiment of the present application belongs to the feedforward protection of the micro-speaker, thereby avoiding damage to the micro-speaker.
[0079] In some embodiments of the present application, the above step 102 can be implemented through the following step 102D.
[0080] Step 102D: When the pressure difference between the first air pressure value and the reference air pressure value is greater than or equal to the air pressure threshold, the electronic device determines a first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker.
[0081] The reference air pressure value is determined according to the air pressure values at the location of the micro-speaker acquired for the most recent M times, and M may be a positive integer.
[0082] For example, M may be 1. That is, the electronic device compares the currently acquired first air pressure value with the previously acquired air pressure value, and if the difference between the two is greater than or equal to the air pressure value threshold, determines the first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker.
[0083] For example, M may be 2. That is, the electronic device compares the currently acquired first air pressure value with the average of the two most recently acquired air pressure values, and if the difference between the two is greater than or equal to the air pressure value threshold, determines the first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker.
[0084] In some embodiments of the present application, the air pressure value threshold may be any possible air pressure value, such as 0.1 Pa or 0.15P.
[0085] In some embodiments of the present application, if the air pressure difference between the first air pressure value and the reference air pressure value is less than the air pressure threshold, the electronic device may not need to perform limiting processing on the input audio signal, that is, transmit the input audio signal to the micro speaker in accordance with the method in the related art.
[0086] In this way, since the electronic device can determine the amplitude of the micro-speaker when the difference between the currently obtained first air pressure value and the reference air pressure value is greater than or equal to the air pressure value threshold, that is, when the air pressure at the location of the micro-speaker changes greatly, it is possible not only to well control the amplitude of the micro-speaker but also to save power consumption of the electronic device.
[0087] Step 103: The electronic device performs a limiting process on the input audio signal according to the first amplitude.
[0088] In some embodiments of the present application, performing limiting processing on the input audio signal can also be referred to as: performing dynamic range compression (DRC) processing on the input audio signal so that the amplitude of the compressed input audio signal is within the safe amplitude range of the micro-speaker.
[0089] It can be understood that DRC processing is used to adjust the dynamic range of the audio signal to ensure that the amplitude of the adjusted audio signal is not too large or too small. The principle is to apply an amplitude gain to the input audio signal according to the amplitude of the input audio signal. When the input audio signal is detected to be a large signal, a small gain is applied to reduce the signal amplitude; when the input audio signal is detected to be a small signal, a large gain is applied to increase the signal amplitude.
[0090] In some embodiments of the present application, after the electronic device performs limiting processing on the input audio signal, it can first convert the processed input audio signal into an analog signal through an analog to digital converter (ADC), and then perform boost processing on the analog signal through a power amplifier, and input the boosted analog signal into a micro speaker to drive the micro speaker to play the analog signal.
[0091] In some embodiments of the present application, the micro speaker may include a suspension, a diaphragm, a frame, an opening, a voice coil, a magnet, and a magnetic path, etc. The voice coil is wound around the magnet, and the magnetic field generated by the magnet is fixed. When alternating current passes through the voice coil, an alternating magnetic field is generated, and the magnetic force causes the voice coil to push the diaphragm to vibrate and produce sound.
[0092] In some embodiments of the present application, the safe amplitude of the micro-speaker can be obtained through experiments or determined through big data.
[0093] In some embodiments of the present application, the safe amplitude of the micro speaker is the amplitude threshold value of the micro speaker, that is, when the amplitude of the micro speaker is less than or equal to the safe amplitude, the sound output by the micro speaker is not distorted or the distortion rate is small, and the voice coil of the micro speaker is ensured to be unbroken.
[0094] In some embodiments of the present application, the above step 103 can be implemented by the following steps 103A and 103B.
[0095] Step 103A: The electronic device calculates an amplitude gain corresponding to the input audio signal according to the first amplitude and the safe amplitude of the micro speaker.
[0096] Step 103B: The electronic device performs limiting processing on the input audio signal according to the amplitude gain.
[0097] In some embodiments of the present application, the electronic device may compare the first amplitude with the safety amplitude, and if the first amplitude is less than the safety amplitude, determine that the amplitude gain corresponding to the input audio signal is 1; if the first amplitude is greater than or equal to the safety amplitude, determine: Wherein, f is the amplitude gain, x is the first amplitude, X0 is the safety amplitude, and a is a constant less than 1. For example, a may be equal to 0.9, 0.85, 0.7 or 0.75, etc.
[0098] In this way, since the amplitude gain corresponding to the input audio signal can be calculated based on the determined first amplitude and the safety amplitude of the micro-speaker, and the input audio signal can be limited according to the amplitude gain, it can be ensured that when the micro-speaker plays the processed input audio signal, the amplitude of the micro-speaker is less than the safety amplitude, thereby ensuring that the sound output by the micro-speaker is not distorted and that the voice coil of the micro-speaker is not disconnected.
[0099] It should be noted that the amplitude protection method provided in the embodiment of the present application is to determine the amplitude of the micro-speaker when the audio signal is input to the micro-speaker in the current environment (such as the first amplitude mentioned above) based on the air pressure value at the location of the micro-speaker and the input audio signal, and then the electronic device can perform feed-forward limiting processing on the input audio signal according to the amplitude. That is, in the present application, before the input audio signal is transmitted to the micro-speaker, the input audio signal is first amplitude predicted and limited. Compared with the solution of performing limiting processing on the signal after it is input to the micro-speaker, this feed-forward processing solution can improve the protection of the micro-speaker.
[0100] Furthermore, the amplitude control method provided in the embodiment of the present application is based on the air pressure value of the environment in which the micro-speaker is located to achieve feedforward amplitude protection for the micro-speaker. Compared with the solution in the related art of setting up an intelligent power amplifier with feedback current and voltage, and performing feedforward protection on the speaker according to the current and voltage fed back by the intelligent power amplifier, the amplitude protection method provided in the embodiment of the present application is more versatile and can save the production cost of the micro-speaker, such as saving the material cost of the intelligent power amplifier.
[0101] In the amplitude control method provided in the embodiment of the present application, since the electronic device can determine the amplitude of the micro-speaker according to the air pressure value at the location of the micro-speaker and the current input audio signal of the micro-speaker, and perform limiting processing on the input audio signal according to the determined amplitude, it can ensure that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker. Therefore, even if the micro-speaker is in a low-pressure environment (such as the ambient air pressure is less than the standard atmospheric pressure), the amplitude of the micro-speaker can be effectively controlled, thereby improving the playback performance of the micro-speaker and extending the service life of the micro-speaker.
[0102] In some embodiments of the present application, before the above step 102, the amplitude control method provided in the embodiment of the present application may further include the following step 104, and the above step 102 may be specifically implemented by the following step 102E.
[0103] Step 104: The electronic device determines a functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker based on the second speaker parameters of the micro-speaker at the second atmospheric pressure value, the third speaker parameters of the micro-speaker at the third atmospheric pressure value, the second atmospheric pressure value, and the third atmospheric pressure value.
[0104] Step 102E: The electronic device determines the first amplitude according to the first air pressure value, the input audio signal and the functional relationship.
[0105] The second air pressure value is the air pressure value of standard atmospheric pressure, and the third air pressure value is less than the second air pressure value.
[0106] In some embodiments of the present application, the second speaker parameter and the third speaker parameter are speaker parameters obtained by modeling the micro speaker under standard atmospheric pressure (ie, the second atmospheric pressure) and low atmospheric pressure (the third atmospheric pressure), respectively.
[0107] In some embodiments of the present application, the electronic device may first determine the first speaker parameter of the micro-speaker at the first air pressure value according to the above functional relationship based on the first air pressure value; then the electronic device may update the amplitude filter coefficient of the micro-speaker according to the first speaker parameter; and determine the first amplitude according to the input audio signal and the updated amplitude filter coefficient of the micro-speaker. For details, please refer to the relevant description of the above steps 102A to 102C.
[0108] It can be understood that the amplitude control method provided in the embodiment of the present application can provide two modeling of the micro-speaker (once at standard air pressure and once at low air pressure), and the speaker parameters under other low-pressure conditions are automatically determined. Modeling needs to be performed during the use of the micro-speaker, thereby improving the working efficiency of the micro-speaker.
[0109] In some embodiments of the present application, the second speaker parameter and the third speaker parameter are obtained based on speaker modeling, and therefore can both be referred to as speaker modeling parameters.
[0110] In some embodiments of the present application, the electronic device may obtain the speaker modeling parameters of the micro speaker by the following steps:
[0111] Step 1: Prepare to play the test sound source, usually a sweep signal.
[0112] In some embodiments of the present application, in order to accurately determine the amplitude of the micro-speaker at a high volume (ie, the frequency of the input audio signal is relatively large), a large signal needs to be used as a frequency sweep signal.
[0113] In some embodiments of the present application, the frequency sweep signal may include signals of multiple frequency points. For example, the frequency band of the frequency sweep signal may range from 2 Hz to 10 KHz, or from 5 Hz to 10 KHz.
[0114] Step 2: Link the micro-speaker cavity to a measuring instrument to measure the amplitude of the micro-speaker and a feedback signal of the micro-speaker through the measuring instrument.
[0115] In some embodiments of the present application, the measuring instruments may include but are not limited to:
[0116] A laser meter to measure the amplitude of microspeakers;
[0117] A feedback path is used to read the feedback signal of the micro speaker.
[0118] It can be understood that the measuring instrument can measure the amplitude and feedback signal of the micro-speaker when the micro-speaker plays the swept frequency signal.
[0119] In some embodiments of the present application, the feedback path may include: a feedback current path and a feedback voltage path.
[0120] The feedback current path is used to read the feedback current of the micro speaker, and the feedback voltage path can be used to read the feedback voltage of the micro speaker.
[0121] Step 3: When the micro-speaker is in a specific air pressure environment, the micro-speaker is controlled to play a frequency sweep signal, and an amplitude sequence and a feedback signal sequence of the micro-speaker are obtained through a measuring instrument.
[0122] Specifically, the micro-speaker is controlled to play the swept frequency signal in an environment of the first air pressure value, and the amplitude sequence 1 and feedback signal sequence 1 of the micro-speaker are obtained through the measuring instrument. Then, the micro-speaker is controlled to play the swept frequency signal again in an environment of the second air pressure value, and the amplitude sequence 2 and feedback signal sequence 2 of the micro-speaker are obtained through the measuring instrument. The amplitude sequence includes the amplitude corresponding to each signal in the swept frequency signal, and the feedback signal sequence includes the feedback signal corresponding to each signal in the swept frequency signal.
[0123] In some embodiments of the present application, the above-mentioned various feedback signal sequences may include a feedback current signal sequence and a feedback voltage signal sequence.
[0124] Specifically, the feedback signal sequence 1 includes a feedback current signal sequence 1' and a feedback voltage signal sequence 1", and the feedback signal sequence 2 includes a feedback current signal sequence 2' and a feedback voltage signal sequence 2".
[0125] It is understandable that the user can place the micro-speaker and the measuring instrument in an environment with adjustable air pressure, such as in a box with adjustable air pressure, so that the air pressure of the environment in which the micro-speaker is located can be adjusted by adjusting the air pressure of the box.
[0126] Step 4: Determine the impedance curve and amplitude-related displacement response curve of the micro-speaker at a specific air pressure based on the amplitude sequence, feedback signal sequence and frequency of the sweep signal obtained by the measuring instrument.
[0127] It can be understood that the impedance curve is a curve between the frequency of the swept frequency signal and the impedance of the micro-speaker, and the displacement response curve is a curve between the frequency of the swept frequency signal and the displacement response of the micro-speaker.
[0128] In some embodiments of the present application, reference Figure 2A The electronic device can determine the measured displacement response curve a1 of the micro-speaker under the second air pressure according to the amplitude sequence 1 and the feedback voltage sequence 1', and fit the measured response curve to obtain the fitted displacement response curve a1'; then, refer to Figure 2BThe electronic device can determine the measured impedance curve b1 of the micro-speaker under the first air pressure according to the feedback current sequence 1' and the feedback voltage sequence 1", and fit the measured response curve b1 to obtain the fitted displacement response curve b1'. Further, referring to Figure 2A , the electronic device can determine the displacement response curve a1" without creep based on the fitted displacement response curve a1' and the measured displacement response curve a1.
[0129] Similarly, the electronic device can fit the measured displacement response curve a2 of the micro-speaker at the second air pressure according to the amplitude sequence 2 and the feedback voltage sequence 2", and fit the measured response curve to obtain the fitted displacement response curve a2'; and determine the impedance curve b2 of the micro-speaker at the first air pressure according to the feedback current sequence 2' and the feedback voltage sequence 2", and fit the measured response curve b2 to obtain the fitted displacement response curve b2'.
[0130] It can be understood that the electronic device determines the speaker modeling parameters of the micro speaker under a specific air pressure based on the fitted displacement response curve and the fitted impedance curve.
[0131] Step 5: Determine speaker modeling parameters of the micro-speaker at the specific air pressure according to the impedance curve and displacement response curve of the micro-speaker at the specific air pressure.
[0132] Specifically, the electronic device can calculate the parameter 1 of the micro speaker at a specific air pressure according to the impedance curve of the micro speaker at a specific air pressure and according to Formula 2. Wherein, Formula 2 is as follows:
[0133]
[0134] Where Z(s) is the impedance of the micro speaker, V(s) is the feedback voltage signal of the micro speaker, I(s) is the feedback current signal of the micro speaker, R e is the DC resistance of the micro-speaker, s is the complex frequency domain of the micro-speaker, s=jw, j is an imaginary number, w is the frequency of the sweep signal, Le is the inductance of the micro-speaker, Bl is the force factor of the micro-speaker, M ms is the total mechanical mass of the micro speaker, R ms is the air damping coefficient of the microspeaker, C ms is the compliance coefficient of the micro speaker. The inductance is very small and can be ignored.
[0135] In some embodiments of the present application, the electronic device can calculate the parameter 2 of the micro-speaker at a specific air pressure according to the displacement response curve of the micro-speaker at a specific air pressure according to Formula 3. Formula 3 is as follows:
[0136]
[0137] thereby:
[0138]
[0139] Among them, H x (s) is the displacement response of the micro-speaker, Bl is the force factor of the micro-speaker, M ms is the total mechanical mass of the micro speaker, R e is the DC resistance of the micro-speaker, s is the complex frequency domain of the micro-speaker, s=jw, j is an imaginary number, w is the frequency of the sweep signal, C ms is the compliance coefficient of the micro speaker, K ms is the stiffness-displacement characteristic parameter of the microspeaker, W s is the power of the micro speaker, F0 is the resonant frequency of the micro speaker, Q ts is the quality factor of the micro speaker, Q es is the electrical quality factor of the micro speaker, Q ms is the mechanical quality factor of the micro speaker.
[0140] It can be understood that the electronic device establishes a set of equations based on the impedance curve and formula 2. After solving the set of equations, parameter 1 of the micro speaker under a specific air pressure state can be obtained; similarly, the electronic device establishes a set of equations based on the impedance curve and formula 3. After solving the set of equations, parameter 2 of the micro speaker under a specific air pressure state can be obtained.
[0141] In some embodiments of the present application, the second speaker parameter can be obtained by controlling the micro-speaker to play a frequency sweep signal under standard atmospheric pressure; the third speaker parameter can be obtained by controlling the micro-speaker to play a frequency sweep signal under a lower pressure. Moreover, compared with the standard atmospheric pressure environment, the speaker parameters of the micro-speaker in the low pressure environment change as follows:
[0142] The DC resistance remains unchanged;
[0143] The force factor remains unchanged;
[0144] The change in the total mechanical mass is small, and the effect on the change in amplitude can be ignored;
[0145] The air damping coefficient decreases linearly;
[0146] The force compliance coefficient increases linearly.
[0147] It can be understood that according to the second speaker parameter and the third speaker parameter, the change in air pressure has the greatest impact on the air damping coefficient and the force compliance coefficient of the micro speaker, and these two parameters also have a greater impact on the amplitude of the micro speaker.
[0148] In some embodiments of the present application, the electronic device may first normalize the second air pressure value and the third air pressure value, and determine the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker based on the normalized second air pressure value, the normalized third air pressure value, the second speaker parameters and the third speaker parameters.
[0149] Specifically, the electronic device may divide the second air pressure value by the standard atmospheric pressure P0 to obtain a normalized second air pressure value. Similarly, the electronic device may divide the third air pressure value by the standard atmospheric pressure P0 to obtain a normalized third air pressure value.
[0150] In some embodiments of the present application, for each speaker parameter of the micro-speaker, the electronic device can determine the functional relationship between the each speaker parameter and the air pressure value based on the second air pressure value, the third air pressure value, the corresponding parameter value in the second speaker parameter and the corresponding parameter value in the third speaker parameter.
[0151] In some embodiments of the present application, the first speaker parameters include a first compliance coefficient and a first air damping coefficient, and the second speaker parameters include a second compliance coefficient and a second air damping coefficient; the above step 104 can be implemented by the following steps 104A and 104B.
[0152] Step 104A: The electronic device determines a first functional relationship between the compliance coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second air pressure value, the third air pressure value, the first compliance coefficient, and the second compliance coefficient.
[0153] In some embodiments of the present application, as the air pressure decreases, the compliance coefficient increases linearly. Therefore, the electronic device can establish a set of two-variable linear equations according to the second air pressure value, the third air pressure value, the first compliance coefficient and the second compliance coefficient, and solve the set of two-variable linear equations to obtain the slope k1 and the constant b1, so that the electronic device can determine the first functional relationship as: C ms =k1*P+b1, where P is the air pressure value at the location of the micro speaker.
[0154] For example, Figure 3A As shown, assuming that the second air pressure value is P0, the third air pressure value is 0.6*P0, the first force compliance coefficient is 0.38 and the second force compliance coefficient is 0.6, the electronic device can establish the equation group: The electronic device can then determine, b1=0.93.
[0155] Step 104B: The electronic device determines a second functional relationship between the air damping coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient.
[0156] In some embodiments of the present application, since the air pressure decreases, the air damping coefficient increases linearly. Therefore, the electronic device can establish a set of two-variable linear equations according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient, and solve the set of two-variable linear equations to obtain the slope k2 and the constant b2, so that the electronic device can determine the second functional relationship as: R ms =k2*P+b2. Wherein, P is the air pressure value at the location of the micro speaker, such as the first air pressure value mentioned above.
[0157] For example, Figure 3B As shown, assuming that the second air pressure value is P0, the third air pressure value is 0.6*P0, the first force compliance coefficient is 0.18 and the second force compliance coefficient is 0.12, the electronic device can establish the equation group: The electronic device can then determine, b2=0.03.
[0158] In some embodiments of the present application, Figure 4 As shown, the electronic device can model the micro-speaker under low pressure and standard atmospheric pressure, respectively, to obtain the second speaker parameters and the third speaker parameters, and then calculate the first functional relationship, the second functional relationship, and the remaining parameters except the force compliance coefficient and the air damping coefficient according to the second speaker parameters and the third speaker parameters and the corresponding air pressure values, and then the electronic device can output the first functional relationship, the second functional relationship, and the remaining parameters except the force compliance coefficient and the air damping coefficient.
[0159] In this way, since the force compliance coefficient and air damping coefficient of the micro-speaker vary linearly with the air pressure and have a greater impact on the amplitude of the micro-speaker, the first functional relationship between the force compliance coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker is determined according to the second air pressure value, the third air pressure value, the first force compliance coefficient, and the second force compliance coefficient; and after the second functional relationship between the air damping coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker is determined according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient, the processing efficiency of the subsequent limiting processing of the micro-speaker by the electronic device can be simplified.
[0160] In this way, since the speaker parameters of the micro-speaker under standard atmospheric pressure and low air pressure can be obtained respectively through speaker modeling, and the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker can be determined based on the two obtained speaker parameters, when the micro-speaker is used subsequently, the real-time speaker parameters of the micro-speaker can be determined based on the functional relationship and the air pressure value of the environment in which the micro-speaker is located, thereby improving the convenience and accuracy of determining the speaker parameters of the micro-speaker.
[0161] The following is combined with Figure 5 , the process of the amplitude control method provided in the embodiment of the present application is described.
[0162] The present application embodiment provides an amplitude control method, referring to Figure 5 , the amplitude control method may include the following steps:
[0163] Step 501: Acquire a digital audio signal.
[0164] Step 502: The input audio signal is processed by a high-pass filter to filter out low-frequency signals within 100 Hz, because the amplitude of the extremely low-frequency signal has nonlinear characteristics, and the human ear cannot hear the signal in this frequency band of the micro speaker.
[0165] Step 503: The electronic device compresses the filtered input audio signal according to the amplitude gain calculated by the amplitude protection module.
[0166] In some embodiments of the present application, the electronic device performs digital-to-analog conversion on the compressed input audio signal to convert the compressed input audio signal into an analog audio signal, and outputs the analog audio signal to a power amplifier.
[0167] Step 504: The electronic device performs a voltage-boosting process on the analog audio signal through a power amplifier, and transmits the processed analog audio signal to the micro speaker.
[0168] Step 505: The micro speaker outputs the processed analog audio signal.
[0169] In some embodiments of the present application, before the above step 503, the amplitude control method provided in the embodiment of the present application may further include the following steps:
[0170] Step 506: Obtain speaker modeling parameters of the micro-speaker at the second air pressure value and the third air pressure value, and determine the functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the position where the micro-speaker is located according to the obtained speaker modeling parameters.
[0171] Step 507: Acquire the location information of the micro speaker, and determine the altitude information of the location of the micro speaker according to the location information.
[0172] Step 508: Calculate the atmospheric pressure according to the altitude, and then divide it by the standard atmospheric pressure to obtain the normalized atmospheric pressure P.
[0173] When a change in the normalized air pressure P is detected, such as plus or minus 0.1 (or other threshold values), the current normalized air pressure value and a parameter update command are prepared to be sent to the speaker parameter update model.
[0174] Step 509, the speaker parameter update model calculates the corresponding Rms and Cms according to the normalized air pressure value P using the above functional relationship, and finally converts all speaker parameters of the speaker into amplitude filter coefficients for calculating the amplitude to achieve the update of the amplitude filter coefficients.
[0175] Step 510: Determine a first amplitude of the micro-speaker through a speaker amplitude model according to the updated amplitude filter coefficient and the filtered input audio signal.
[0176] Step 511: Calculate the amplitude protection gain. According to the first amplitude, determine whether the first amplitude exceeds the amplitude threshold, and if it exceeds the amplitude threshold, calculate the suppression gain.
[0177] In the amplitude control method provided in the embodiment of the present application, the output sound volume of the micro speaker under normal air pressure is not affected, and no intelligent power amplifier is required, thereby reducing material costs. The model parameters can be quickly established in advance to cover all low-pressure environments, while improving work efficiency.
[0178] The amplitude control method provided in the embodiment of the present application can be executed by an amplitude control device. In the embodiment, the amplitude control device executing the amplitude control method is taken as an example to illustrate that the amplitude control device provided in the embodiment of the present application is provided.
[0179] The present application embodiment provides an amplitude control device, such as Figure 6 As shown, the amplitude control device 600 provided in the embodiment of the present application may include: an acquisition module 601 and a processing module 602;
[0180] The acquisition module 601 is used to acquire a first air pressure value at the location of the micro speaker;
[0181] The processing module 602 is used to determine a first amplitude of the micro-speaker according to the first air pressure value obtained by the obtaining module 601 and the input audio signal of the micro-speaker;
[0182] The processing module 602 is further configured to perform a limiting process on the input audio signal according to the first amplitude.
[0183] In some embodiments of the present application, the processing module 602 is specifically used to:
[0184] determining, according to the first air pressure value, a first speaker parameter of the micro-speaker at the first air pressure value;
[0185] updating an amplitude filter coefficient of the micro-speaker according to the first speaker parameter;
[0186] The first amplitude is determined according to the input audio signal and the updated amplitude filter coefficient of the microspeaker.
[0187] In some embodiments of the present application, the processing module 602 is specifically configured to determine the first speaker parameter according to the first air pressure value and a functional relationship between the speaker parameter of the micro speaker and the air pressure value at the position where the micro speaker is located.
[0188] In some embodiments of the present application, the processing module 602 is further configured to determine, before determining the first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker, a functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second speaker parameters of the micro-speaker at the second atmospheric pressure value, the third speaker parameters of the micro-speaker at the third atmospheric pressure value, the second atmospheric pressure value, and the third atmospheric pressure value; the second air pressure value is the air pressure value of the standard atmospheric pressure, and the third air pressure value is less than the second air pressure value;
[0189] The processing module 602 is specifically configured to determine the first amplitude according to the first air pressure value, the input audio signal and the above functional relationship.
[0190] In some embodiments of the present application, the first speaker parameters include a first force compliance coefficient and a first air damping coefficient, and the second speaker parameters include a second force compliance coefficient and a second air damping coefficient;
[0191] The processing module 602 is specifically used for:
[0192] Determine a first functional relationship between the compliance coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second air pressure value, the third air pressure value, the first compliance coefficient, and the second compliance coefficient;
[0193] A second functional relationship between the air damping coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker is determined according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient.
[0194] In some embodiments of the present application, the processing module 602 is specifically used to:
[0195] Calculating an amplitude gain corresponding to the input audio signal according to the first amplitude and a safe amplitude of the micro-speaker;
[0196] According to the amplitude gain, a limiting process is performed on the input audio signal.
[0197] In some embodiments of the present application, the processing module is specifically configured to determine a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker when the air pressure difference between the first air pressure value and the reference air pressure value is greater than or equal to an air pressure value threshold;
[0198] The reference air pressure value is determined according to the air pressure values at the location of the micro-speaker acquired for the most recent M times, where M is a positive integer.
[0199] In some embodiments of the present application, the acquisition module is specifically used to acquire the position information of the position of the micro speaker;
[0200] The processing module is further used to determine the altitude information of the location of the micro speaker according to the location information acquired by the acquisition module; and determine the first air pressure value according to the altitude information.
[0201] In the amplitude control device provided in the embodiment of the present application, since the amplitude control device can determine the amplitude of the micro-speaker according to the air pressure value at the location of the micro-speaker and the current input audio signal of the micro-speaker, and perform limiting processing on the input audio signal according to the determined amplitude, it can ensure that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker. Therefore, even if the micro-speaker is in a low-pressure environment (such as the ambient air pressure is less than the standard atmospheric pressure), the amplitude of the micro-speaker can be effectively controlled, thereby improving the playback performance of the micro-speaker and extending the service life of the micro-speaker.
[0202] The amplitude control device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0203] The amplitude control device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0204] The amplitude control device provided in the embodiment of the present application can achieve Figures 1 to 5 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.
[0205] Alternatively, if Figure 7 As shown, an embodiment of the present application further provides an electronic device 700, including a processor 701 and a memory 702, wherein the memory 702 stores a program or instruction that can be executed on the processor 701, and when the program or instruction is executed by the processor 701, each step of the above-mentioned amplitude control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0206] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0207] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0208] The electronic device 1500 includes but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510 and other components.
[0209] Those skilled in the art will appreciate that the electronic device 1500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0210] Wherein, the sensor 1505 is used to obtain a first air pressure value at the location of the micro speaker;
[0211] The processor 1510 is configured to determine a first amplitude of the micro speaker according to the first air pressure value acquired by the sensor 1505 and an input audio signal of the micro speaker;
[0212] The processor 1510 is further configured to perform a limiting process on the input audio signal according to the first amplitude.
[0213] In some embodiments of the present application, the processor 1510 is specifically configured to:
[0214] determining, according to the first air pressure value, a first speaker parameter of the micro-speaker at the first air pressure value;
[0215] updating an amplitude filter coefficient of the micro-speaker according to the first speaker parameter;
[0216] The first amplitude is determined according to the input audio signal and the updated amplitude filter coefficient of the microspeaker.
[0217] In some embodiments of the present application, the processor 1510 is specifically configured to determine the first speaker parameter according to the first air pressure value and a functional relationship between the speaker parameter of the micro speaker and the air pressure value at the position where the micro speaker is located.
[0218] In some embodiments of the present application,
[0219] In some embodiments of the present application, the processor 1510 is further configured to determine, before determining the first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker, a functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second speaker parameters of the micro-speaker at the second atmospheric pressure value, the third speaker parameters of the micro-speaker at the third atmospheric pressure value, the second atmospheric pressure value, and the third atmospheric pressure value; the second air pressure value is the air pressure value of the standard atmospheric pressure, and the third air pressure value is less than the second air pressure value;
[0220] The processor 1510 is specifically configured to determine the first amplitude according to the first air pressure value, the input audio signal and the above functional relationship.
[0221] In some embodiments of the present application, the first speaker parameters include a first force compliance coefficient and a first air damping coefficient, and the second speaker parameters include a second force compliance coefficient and a second air damping coefficient;
[0222] The processor 1510 is specifically configured to:
[0223] Determine a first functional relationship between the compliance coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second air pressure value, the third air pressure value, the first compliance coefficient, and the second compliance coefficient;
[0224] A second functional relationship between the air damping coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker is determined according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient.
[0225] In some embodiments of the present application, the processor 1510 is specifically configured to:
[0226] Calculating an amplitude gain corresponding to the input audio signal according to the first amplitude and a safe amplitude of the micro-speaker;
[0227] According to the amplitude gain, a limiting process is performed on the input audio signal.
[0228] In some embodiments of the present application, the processor 1510 is specifically configured to determine a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker when the air pressure difference between the first air pressure value and the reference air pressure value is greater than or equal to an air pressure value threshold;
[0229] The reference air pressure value is determined according to the air pressure values at the location of the micro-speaker acquired for the most recent M times, where M is a positive integer.
[0230] In some embodiments of the present application, the sensor 1505 is specifically used to obtain the position information of the position of the micro speaker;
[0231] The processor 1510 is further configured to determine the altitude information of the location of the micro speaker according to the location information acquired by the sensor 1505; and determine the first air pressure value according to the altitude information.
[0232] In the electronic device provided in the embodiment of the present application, since the electronic device can determine the amplitude of the micro-speaker according to the air pressure value at the location of the micro-speaker and the current input audio signal of the micro-speaker, and perform limiting processing on the input audio signal according to the determined amplitude, it can ensure that the amplitude corresponding to the processed input audio signal is within the safe amplitude range of the micro-speaker. Therefore, even if the micro-speaker is in a low-pressure environment (such as the ambient air pressure is less than the standard atmospheric pressure), the amplitude of the micro-speaker can be effectively controlled, thereby improving the playback performance of the micro-speaker and extending the service life of the micro-speaker.
[0233] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processor (Graphics Processing Unit, GPU) 15041 and a microphone 15042, and the graphics processor 15041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1506 may include a display panel 15061, and the display panel 15061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include two parts: a touch detection device and a touch controller. Other input devices 15072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0234] The memory 1509 can be used to store software programs and various data. The memory 1509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1509 may include a volatile memory or a non-volatile memory, or the memory 1509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0235] The processor 1510 may include one or more processing units; optionally, the processor 1510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1510.
[0236] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned amplitude control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0237] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0238] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned amplitude control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0239] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0240] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned amplitude control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0241] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0242] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0243] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An amplitude control method, characterized in that: The method comprises: Obtaining a first air pressure value at a location of the micro speaker; determining a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker; According to the first amplitude, a limiting process is performed on the input audio signal.
2. The method according to claim 1, characterized in that The step of determining a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker comprises: determining, according to the first air pressure value, a first speaker parameter of the micro-speaker at the first air pressure value; updating an amplitude filter coefficient of the micro-speaker according to the first speaker parameter; The first amplitude is determined according to the input audio signal and the updated amplitude filter coefficient of the microspeaker.
3. The method according to claim 2, characterized in that The determining, according to the first air pressure value, a first speaker parameter of the micro-speaker at the first air pressure value comprises: According to the first air pressure value, the first speaker parameter is determined based on a functional relationship between the speaker parameter of the micro speaker and the air pressure value at the location where the micro speaker is located.
4. The method according to any one of claims 1 to 3, characterized in that Before determining the first amplitude of the micro-speaker according to the first air pressure value and the input audio signal of the micro-speaker, the method further includes: Determine a functional relationship between the speaker parameters of the micro-speaker and the air pressure value at the location of the micro-speaker according to a second speaker parameter of the micro-speaker at a second atmospheric pressure value, a third speaker parameter of the micro-speaker at a third atmospheric pressure value, the second atmospheric pressure value and the third atmospheric pressure value; the second atmospheric pressure value is an atmospheric pressure value of standard atmospheric pressure, and the third atmospheric pressure value is less than the second atmospheric pressure value; The step of determining a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker comprises: The first amplitude is determined according to the first air pressure value, the input audio signal and the functional relationship.
5. The method according to claim 4, characterized in that The first speaker parameters include a first force compliance coefficient and a first air damping coefficient, and the second speaker parameters include a second force compliance coefficient and a second air damping coefficient; The determining, according to a second speaker parameter of the micro-speaker at a second atmospheric pressure value, a third speaker parameter of the micro-speaker at a third atmospheric pressure value, the second atmospheric pressure value, and the third atmospheric pressure value, a functional relationship between the speaker parameter of the micro-speaker and the atmospheric pressure value at a location where the micro-speaker is located comprises: Determine a first functional relationship between the compliance coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker according to the second air pressure value, the third air pressure value, the first compliance coefficient, and the second compliance coefficient; A second functional relationship between the air damping coefficient of the micro-speaker and the air pressure value at the location of the micro-speaker is determined according to the second air pressure value, the third air pressure value, the first air damping coefficient, and the second air damping coefficient.
6. The method according to any one of claims 1 to 3, characterized in that The step of performing a limiting process on the input audio signal according to the first amplitude comprises: Calculating an amplitude gain corresponding to the input audio signal according to the first amplitude and a safe amplitude of the micro-speaker; According to the amplitude gain, a limiting process is performed on the input audio signal.
7. The method according to any one of claims 1 to 3, characterized in that The step of determining a first amplitude of the micro-speaker according to the first air pressure value and an input audio signal of the micro-speaker comprises: When the air pressure difference between the first air pressure value and the reference air pressure value is greater than or equal to an air pressure value threshold, determining the first amplitude according to the first air pressure value and an input audio signal of the micro-speaker; The reference air pressure value is determined according to the air pressure values at the location of the micro-speaker obtained M times, where M is a positive integer.
8. An amplitude control device, characterized in that: The device comprises: an acquisition module and a processing module; The acquisition module is used to acquire a first air pressure value at the location of the micro speaker; The processing module is used to determine a first amplitude of the micro-speaker according to the first air pressure value acquired by the acquisition module and an input audio signal of the micro-speaker; The processing module is further configured to perform a limiting process on the input audio signal according to the first amplitude.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the amplitude control method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the amplitude control method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Audio output method, device and system, storage medium and electronic equipment
CN112616108A
Simple associated monitoring method and system for resonant frequency of loudspeaker and ambient air pressure
CN112637752A
Audio playing method and device, audio playing equipment and readable storage medium
CN113655983A
System and method for estimating the displacement of a speaker cone
US20160134982A1