Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of mobile phone and distortion processing method thereof, and output gain that can automatic regulating audio, prevent the generation of distorsion.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of mobile phone is provided, comprises D/A converter module, internal gain module, power amplifier, loud speaker, analog-to-digital conversion module and control module.D/A converter module is converted to simulated audio signal by digital audio and video signals to be played.The internal gain module is amplified processing according to initial gain factor to this simulated audio signal.Power amplifier amplifies processing again to this simulated audio signal amplified after processing through this internal gain module, and wherein, this power amplifier comprises positive audio signal output and negative audio signal output end.Loud speaker is series at this positive audio signal output and should bears between audio signal output end, from power amplifier, obtains this simulated audio signal and plays.Analog-to-digital conversion module, be connected with this positive audio signal output, to obtain the first amplitude of this simulated audio signal, and is connected with the positive pole of the battery of this mobile phone, to obtain the first magnitude of voltage of this battery.Control module, relatively this first amplitude and this first magnitude of voltage, when this first amplitude is greater than this first magnitude of voltage, this initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient, this internal gain module is amplified processing according to this decrement gain coefficient to this simulated audio signal.This control module is further used for this first magnitude of voltage and first threshold multiplication, to obtain the first correction voltage, this control module is this first amplitude and this first correction voltage relatively, when this first amplitude is greater than this first correction voltage, this initial gain factor is reduced to a power grade, to obtain this decrement gain coefficient, this internal gain module is amplified processing according to this decrement gain coefficient to this simulated audio signal.When this first amplitude is less than this first correction voltage, this analog-to-digital conversion module further obtains the second voltage value of the second amplitude and this battery of this simulated audio signal, this control module is further by this second voltage value and Second Threshold multiplication, to obtain the second correction voltage, this control module is this second amplitude and this second correction voltage relatively, when this second amplitude is less than this second correction voltage, controls this internal gain module, according to this initial gain factor, this simulated audio signal is amplified to processing.
Wherein, this analog-to-digital conversion module obtains a plurality of these first amplitudes and a plurality of this first magnitude of voltage with very first time gap periods, wherein this first magnitude of voltage of obtaining is corresponding each this amplitude and same time, this control module is respectively by a plurality of these first magnitudes of voltage and this first threshold multiplication, to obtain a plurality of this first correction voltage, when the plurality of the first amplitude all is greater than with this corresponding the first correction voltage, this initial gain factor is reduced to a power grade, to obtain this decrement gain coefficient.
Wherein, this control module all is greater than while with corresponding this first, revising voltage determining the plurality of the first amplitude, this analog-to-digital conversion module further periodically obtains a plurality of the 3rd amplitudes of this simulated audio signal and obtains a plurality of tertiary voltage values of this battery from this positive pole of this battery from this positive audio signal output with second time interval, wherein this tertiary voltage value of obtaining is corresponding each the 3rd amplitude and same time, this control module is by a plurality of these tertiary voltage values and this first threshold multiplication, revise voltage to obtain the 3rd, when the 3rd amplitude all is greater than the 3rd correction voltage, this initial gain factor is reduced to a power grade, to obtain this decrement gain coefficient, wherein, this second time interval is less than this very first time interval.
For solving the problems of the technologies described above, another technical solution used in the present invention is: the distortion processing method that a kind of mobile phone is provided, analog-to-digital conversion module in mobile phone is set to be connected with the positive audio signal output of power amplifier in mobile phone, and this analog-to-digital conversion module is set is connected with the positive pole of the battery of this mobile phone, the method comprises the following steps: a. obtains the first amplitude of simulated audio signal from this positive audio signal output, obtains the first magnitude of voltage of this battery from this positive pole.B. relatively this first amplitude and this first magnitude of voltage, when this first amplitude is greater than this first magnitude of voltage, reduce a power grade by initial gain factor, to obtain the decrement gain coefficient.By this first magnitude of voltage and first threshold multiplication, to obtain the first correction voltage, relatively this first amplitude and this first revised voltage, when this first amplitude is greater than this first correction voltage, this initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient, according to the decrement gain coefficient, this simulated audio signal is amplified to processing.C. according to this decrement gain coefficient, simulated audio signal is amplified to processing.Wherein, in this step b, when this first amplitude is less than this first correction voltage, further from this positive audio signal output, obtain the second amplitude of this simulated audio signal and the second voltage value of obtaining this battery from this positive pole of this battery, further by this second voltage value and Second Threshold multiplication, to obtain the second correction voltage, relatively this second amplitude and this second revised voltage, when this second amplitude is less than this second correction voltage, in this step c, according to this initial gain factor, this simulated audio signal is amplified to processing.
Wherein, obtain a plurality of these first amplitudes and a plurality of this first magnitude of voltage with very first time gap periods, wherein this first magnitude of voltage of obtaining is corresponding each this amplitude and same time, in this step b, respectively by a plurality of these first magnitudes of voltage and this first threshold multiplication, to obtain a plurality of this first correction voltage, when the plurality of the first amplitude all is greater than with this corresponding the first correction voltage, this initial gain factor is reduced to a power grade, to obtain this decrement gain coefficient.
Wherein, in this step b, all be greater than while with corresponding this first, revising voltage determining the plurality of the first amplitude, further with second time interval, periodically from this positive audio signal output, obtain a plurality of the 3rd amplitudes of this simulated audio signal and obtain a plurality of tertiary voltage values of this battery from this positive pole of this battery, wherein this tertiary voltage value of obtaining is corresponding each the 3rd amplitude and same time, by a plurality of these tertiary voltage values and this first threshold multiplication, revise voltage to obtain the 3rd, when the 3rd amplitude all is greater than the 3rd correction voltage, this initial gain factor is reduced to a power grade, to obtain this decrement gain coefficient, wherein, this second time interval is less than this very first time interval.
The invention has the beneficial effects as follows: the situation that is different from prior art, mobile phone of the present invention and distortion processing method thereof pass through to compare the first amplitude of simulated audio signal and the first magnitude of voltage of battery, determine whether to reduce gain coefficient, can automatically reduce the output gain of audio signal, to prevent the generation of distorsion.
Embodiment
Consult Fig. 1, Fig. 1 is the schematic block diagram of a preferred embodiment of mobile phone of the present invention.Mobile phone of the present invention comprises baseband chip 1, power amplifier 4, loud speaker 5 and battery 8.Wherein, be integrated with again D/A converter module 2, internal gain module 3, analog-to-digital conversion module 6 and control module 7 in baseband chip 1.
D/A converter module 2 is converted to simulated audio signal by digital audio and video signals to be played.Internal gain module 3 is connected with D/A converter module 2, according to initial gain factor, the simulated audio signal of changing out through D/A converter module 2 is amplified to processing.4 pairs of simulated audio signals that amplify after processing through internal gain module 3 of power amplifier amplify processing again.Wherein, power amplifier 4 comprises positive audio signal output and negative audio signal output end.Loud speaker 5 is series between positive audio signal output and negative audio signal output end, from power amplifier 4, obtains simulated audio signal and plays.Wherein, the positive audio signal output of power amplifier 4 connects the positive pole of loud speaker 5, and the negative audio signal output end of power amplifier 4 connects the negative pole of loud speaker 5.
After the user selects play content (as selected to play a certain MP3 format file), digital audio and video signals to be played transfers to D/A converter module 2, by D/A converter module 2, digital audio and video signals is converted to the simulated audio signal that can be play by loud speaker 5.Simulated audio signal once amplifies and after the secondary of power amplifier 4 amplifies, finally by loud speaker 5, is play, thereby reach the effect of using mobile phone speaker to put outward through internal gain module 3.
Analog-to-digital conversion module 6 is connected with the positive audio signal output of power amplifier 4, to obtain the first amplitude of simulated audio signal, particularly, pattern modular converter 6 can obtain the magnitude of voltage of simulated audio signal within the sufficiently long time period with fixed frequency, and the maximum of finding out in these magnitudes of voltage is used as the first amplitude.And analog-to-digital conversion module 6 also is connected with the positive pole of the battery 8 of mobile phone, to obtain the first magnitude of voltage of battery 8.
In above embodiment, control module 7 directly compares the first amplitude and the first magnitude of voltage, when the first amplitude is greater than the first magnitude of voltage, initial gain factor is reduced to a power grade, obtains the decrement gain coefficient.Then, the decrement gain coefficient that internal gain module 3 obtains according to control module 7 amplifies processing to simulated audio signal.
In order to obtain more accurate comparative result, in a preferred embodiment, can very first time gap periods obtain the first amplitude of simulated audio signal and the first magnitude of voltage of battery, very first time interval can be arranged according to actual conditions, for example 1 second.In actual applications, because the problems such as the calibration error of analog-to-digital conversion module or other circuit errors, measurement result for the first magnitude of voltage may produce error, and generally speaking, measured value may be larger than actual value, therefore, in a preferred embodiment, more can be by the first magnitude of voltage and first threshold multiplication, to obtain correction voltage, this first threshold coefficient changes according to the difference of circuit error, is for example 98%.
Therefore, the first amplitude and correction voltage value that control module 7 can relatively be obtained by analog-to-digital conversion module 6, and, when the first amplitude is greater than correction voltage value, initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient.Wherein this power grade can be for example 1dB.Then, the decrement gain coefficient that internal gain module 3 obtains according to control module 7 amplifies processing to simulated audio signal.
And, in a preferred embodiment, can adopt analog-to-digital conversion module 6 to obtain the first amplitude of simulated audio signal and the first magnitude of voltage of battery with very first time gap periods, then by control module 7, repeatedly compared, thereby by repeatedly comparing the first amplitude and the first magnitude of voltage, to obtain accurate comparative result.In a preferred embodiment, also can be by repeatedly comparing the first amplitude and corresponding correction voltage value, to obtain accurate comparative result.
Further, control module 7 all is greater than when corresponding first revises voltage determining a plurality of the first amplitudes, analog-to-digital conversion module 6 further periodically obtains a plurality of the 3rd amplitudes of simulated audio signal from the positive audio signal output with second time interval, and obtains a plurality of tertiary voltage values of battery from the positive pole of battery 8.Wherein the tertiary voltage value obtained is corresponding each the 3rd amplitude and same time.Control module 7, by a plurality of tertiary voltage values and first threshold multiplication, is revised voltage to obtain the 3rd.When the 3rd amplitude all is greater than the 3rd correction voltage, initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient.Wherein, second time interval preferably was set to be less than very first time interval.And in other embodiments of the invention, can second time interval and very first time interval not limited.
When the first amplitude is less than correction voltage, analog-to-digital conversion module 6 further obtains the second voltage value of the second amplitude and the battery of simulated audio signal.Control module 7, further by second voltage value and Second Threshold multiplication, is for example 50%, to obtain the second correction voltage.Control module 7 relatively the second amplitude and second is revised voltage, when the second amplitude is less than the second correction voltage, controls internal gain module 3, according to initial gain factor, simulated audio signal is amplified to processing.Therefore, by the way, can recover output gain when volume is less than normal, prevent the inconvenience because of the volume user of causing less than normal, play the effect of dynamic adjustments.
Equally, in another embodiment, for relatively more accurate, but continuous several times is obtained the second amplitude and the second correction voltage, and repeatedly compares the second correction voltage whether the second amplitude is less than correspondence.When the second amplitude all is less than the second corresponding correction voltage, then controls internal gain modules 3 by control module 7, according to initial gain factor, simulated audio signal is amplified to processing.For example, when more all finding that the second amplitude all is less than the second corresponding correction voltage continuous 5 times, control internal gain modules 3 by control module 7 again, according to initial gain factor, simulated audio signal is amplified to processing, rather than only compare after the second amplitude is less than the second correction voltage and just by control module 7 control internal gain modules 3, according to initial gain factor, simulated audio signal is amplified to processing.This accuracy that can further improve comparative result by the mode of repeatedly obtaining magnitude of voltage and repeatedly compare.
Be different from the situation of prior art, mobile phone of the present invention passes through to compare the first amplitude of simulated audio signal and the first magnitude of voltage of battery, determines whether to reduce gain coefficient, can automatically reduce the output gain of audio frequency, prevents the generation of distorsion.
The distortion processing method of mobile phone of the present invention carries out based on said structure, analog-to-digital conversion module is set and is connected with the positive audio signal output of power amplifier, and analog-to-digital conversion module is set is connected with the positive pole of the battery of mobile phone.Referring to Fig. 2, Fig. 2 is the flow chart of the first embodiment of the distortion processing method of mobile phone of the present invention.In the present embodiment, the distortion processing method of mobile phone of the present invention comprises:
In step S101, open loud speaker.
In step S102, obtain the first amplitude of simulated audio signal from the positive audio signal output, obtain the first magnitude of voltage of battery from positive pole.
In step S103, relatively whether the first amplitude is greater than the first magnitude of voltage.If the first amplitude is greater than the first magnitude of voltage, enter step S104.If the first amplitude is not more than the first magnitude of voltage, return to step S102.
In step S104, initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient.
In step S105, according to the decrement gain coefficient, simulated audio signal is amplified to processing.
Referring to Fig. 3, Fig. 3 is the flow chart of the second embodiment of the distortion processing method of mobile phone of the present invention.In the present embodiment, the distortion processing method of mobile phone of the present invention comprises:
In step S201, open loud speaker.
In step S202, with very first time gap periods, from the positive audio signal output, obtain the first amplitude of simulated audio signal and obtain the first magnitude of voltage of battery from the positive pole of battery.Wherein, very first time interval is for example 1 second.
In step S203, by the first magnitude of voltage and a first threshold multiplication, to obtain the first correction voltage.This first threshold coefficient is mainly used in revising the measure error of analog-to-digital conversion module, can change according to the difference of circuit error, and be for example 98%.This step, only in order to reach better accuracy, is not therefore steps necessary, in other embodiment, can omit this step.
In step S204, relatively whether the first amplitude is greater than correction voltage.If the first amplitude is greater than correction voltage, judgment result is that " Y ", enter step S208.If the first amplitude is not more than correction voltage value, judgment result is that " N ", enter step S205.
In step S205, obtain the second voltage value of the second amplitude and the battery of simulated audio signal from the positive audio signal output, further by second voltage value and Second Threshold multiplication, to obtain the second correction voltage.This threshold value coefficient is preferably 50%.
In step S206, relatively whether the second amplitude is less than the second correction voltage, and, when judgment result is that " Y ", enters step S207.Otherwise, enter step S202.
In step S207, control the internal gain module, according to initial gain factor, simulated audio signal is amplified to processing.Therefore, by the way, can recover output gain when volume is less than normal, prevent the inconvenience because of the volume user of causing less than normal, play the effect of dynamic adjustments.
In step S208, periodically from the positive audio signal output, obtain the 3rd amplitude of simulated audio signal and obtain the tertiary voltage value of battery from the positive pole of battery with second time interval.In the present embodiment, second time interval preferably was set to be less than very first time interval.And in other embodiments of the invention, can second time interval and very first time interval not limited.
In step S209, tertiary voltage value and first threshold are multiplied each other, to obtain the 3rd correction voltage value.
In step S210, relatively whether the 3rd amplitude is greater than the 3rd and revises voltage, and when judgment result is that " Y ", execution step S211, on the contrary flow process jumps to step S202.Same, step S208-step S210 is all for judgement more accurately, but not steps necessary in other embodiments of the invention, can be omitted step S208-step S210.
In step S211, initial gain factor is reduced to a power grade, to obtain the decrement gain coefficient.
In step S212, according to the decrement gain coefficient, simulated audio signal is amplified to processing.
In another embodiment, in order to determine whether more accurately distorsion, can in step S202, repeatedly obtain the first amplitude of simulated audio signal and the first magnitude of voltage of battery.Wherein, the first magnitude of voltage of obtaining is corresponding each amplitude and same time.And, in step S203, respectively by a plurality of the first magnitudes of voltage and first threshold multiplication, to obtain a plurality of first, revise voltage.Then repeating step S204 repeatedly, by repeatedly relatively the first amplitude and corresponding correction voltage value, to obtain accurate comparative result.Repeatedly relatively in the first amplitude while all being greater than corresponding correction voltage value, carry out step S205.Equally for relatively more accurate, after the second amplitude that judgement is repeatedly obtained in step S206 all is less than the second corresponding correction voltage, for example continuous the second amplitude obtained for 5 times all is less than the second corresponding correction voltage, controls the internal gain module, according to initial gain factor, simulated audio signal is amplified to processing.In step S210, also can adopt equally the repeatedly method of contrast, repeat no more herein.
Be different from the situation of prior art, mobile phone of the present invention and distortion processing method thereof pass through to compare the first amplitude of simulated audio signal and the first magnitude of voltage of battery, determine whether to reduce gain coefficient, output gain that can automatic regulating audio, prevent the generation of distorsion.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.