Audio processing chip and earphone
Technical Field
The invention relates to the field of audio output equipment, in particular to an audio processing chip and an earphone.
Background
Recently, earphones are widely used, but users suffer from various degrees of damage to their ears while enjoying music and talking. Therefore, a gain adaptive control technique has been developed, which can control the volume of sound output from the earphone to protect the user's hearing. The existing gain adaptive controller comprises an evaluation unit for estimating the level of the input signal; a subtractor for calculating a difference between the level estimated by the evaluation unit and a predetermined reference value; and a gain controller outputting a control value by nonlinearly scaling the difference output by the subtractor. Although the technology achieves the purpose of automatically controlling the signal gain, the structure is complex. And the existing resistance attenuation also inevitably increases the energy consumption. In view of this, it is urgently needed to provide an audio processing chip carrying a novel gain adaptive controller to protect hearing, simplify the structure, and reduce energy consumption.
Disclosure of Invention
In view of the above-mentioned shortcomings in the prior art, the present invention provides an audio processing chip, comprising: an audio decoder for decoding the audio segments stored in the storage device; a digital-to-analog converter for converting the decoded digital audio signal into an analog audio signal; the audio amplifier is used for amplifying the analog audio signal converted by the digital-to-analog converter; the audio output port is used for outputting the amplified analog audio signal; and the gain self-adaptive controller is connected between the audio amplifier and the audio output port, amplified audio signals are input into the gain self-adaptive controller, the audio signals at the signal output end of the gain self-adaptive controller are sampled and subjected to integral processing, the audio signals are adjusted according to integral processing results, and the adjusted audio signals are output to the audio output port to realize automatic adjustment of the volume of output sound.
Preferably, the gain adaptive controller includes: the device comprises an input end, a signal output end, a change-over switch, an attenuation circuit, a signal sampling circuit and an analog-to-digital converter.
Preferably, the change-over switch is connected with an input end, the attenuation circuit is connected with the output end group of the change-over switch and the signal output end, the signal sampling circuit is connected with the signal output end, and the analog-to-digital converter is respectively connected with the sampling circuit and the control end group of the change-over switch.
Preferably, the attenuation circuit includes at least two attenuation branch groups, each attenuation branch group including a plurality of attenuation branches, each attenuation branch being used for attenuating a signal input from the input terminal to a different degree.
Preferably, each attenuation branch in each attenuation branch group of the attenuation circuit is not connected in series or is connected in series with resistors with different resistance values, so that signals input from the input end are attenuated to different degrees correspondingly.
Preferably, the signal sampling circuit is configured to obtain a sampled signal from the signal output terminal; the analog-to-digital converter is used for converting the sampling signal from an analog quantity to a digital quantity, and the digital quantity control conversion switch selects a corresponding attenuation branch in the attenuation circuit to transmit the signal input from the input end to the signal output end.
Preferably, the analog-to-digital converter divides the analog quantity of the sampling signal into N numerical value sections according to the size through presetting, wherein N is an integer greater than 1, and the numerical value sections are numbered 1, 2 and 3 … … N; corresponding to the N binary numbers, the N binary numbers are generated after analog-to-digital conversion; when a certain sampling signal falls into a certain numerical value section of the analog quantity, the analog-to-digital converter generates corresponding digital quantity according to the numerical value section; the digital quantity is input to the change-over switch through the control end group of the change-over switch.
Preferably, the change-over switch controls the off or on state of each output port in the output port group according to the digital quantity.
Preferably, the change-over switch controls the corresponding output port in the output port group to be switched on according to the digital quantity, and the other output ports are switched off.
Preferably, the audio processing chip further comprises a custom input interface for receiving a user setting for sampling signal analog quantity division, and then changing the preset setting in the analog-to-digital converter.
Preferably, the audio processing chip further comprises an ambient noise input interface for receiving ambient noise and changing the preset in the analog-to-digital converter based on the ambient noise adjustment.
Preferably, the audio processing chip further comprises a feedback controller, and the gain adaptive controller further comprises a feedback output end; the feedback controller is connected between the feedback output end of the gain self-adaptive controller and the audio amplifier and is used for gradually reducing the amplification amplitude of the audio amplifier to the audio signal when the change-over switch controls the audio signal to pass through the attenuation branch with the nonzero resistance value of the resistor in the attenuation circuit until the change-over switch controls the audio signal to pass through the attenuation branch with the zero resistance value of the resistor in the attenuation circuit.
The present invention also provides an earphone comprising: an input terminal for inputting an audio electrical signal; the loudspeaker is used for converting the audio signal into sound wave from the electric signal; the input end, the audio processing chip and the loudspeaker are connected in sequence; and audio signals are input to the audio processing chip through an input end for processing, the processed audio signals are output to the loudspeaker, and the audio signals are converted into sound waves.
Preferably, the earphone further comprises a wire controller, and a user can also manually control the volume output by the loudspeaker by adjusting the wire controller.
Preferably, the wire controller is connected between the speaker and the gain adaptive controller or between the input terminal and the gain adaptive controller.
The invention provides an audio processing chip and an earphone.A sampling signal at a signal output end is obtained through a gain self-adaptive controller, the sampling signal is converted from analog quantity to digital quantity, a change-over switch is controlled by the sampling signal of the digital quantity to select a corresponding attenuation branch, and the change-over switch and the attenuation branch are utilized to transmit a signal input from an input end to the signal output end; compared with the prior art, the chip realizes automatic control of output volume, avoids overlarge volume of output sound, achieves the purpose of protecting hearing, uses less hardware, is convenient to implement and saves energy.
Drawings
Fig. 1 is a block diagram of an audio processing chip according to an embodiment of the present invention.
Fig. 2 is a block diagram of a gain adaptive controller according to an embodiment of the present invention.
The audio processing chip-100, the audio decoder-110, the digital-to-analog converter-120, the audio amplifier-130, the gain adaptive controller-140, the audio output port-150, the feedback controller-160, the left input port-141, the right input port-142, the left output port-143, the right output port-144, the sampling circuit 145, the analog-to-digital converter-146, the change-over switch-147, the attenuation circuit-148, the feedback output port-149, the left control port group-A, the right control port group-B, the left output port group-C, the right output port group-D, the left attenuation branch group-E, the right attenuation branch group-F, the resistor-r 1, the r2, the r3 and the rn.
Detailed Description
In order to solve the problems of the existing earphone system, the audio processing chip and the earphone provided by the invention are realized by the following technical scheme:
example 1:
the present embodiment provides an audio processing chip 100, please refer to fig. 1, which includes: an audio decoder 110 for decoding the audio segments stored in the storage means; a digital-to-analog converter 120 for converting the decoded digital audio signal into an analog audio signal; an audio amplifier 130 for amplifying the analog audio signal converted by the digital-to-analog converter 120; an audio output port 150 for outputting the amplified analog audio signal; and the gain adaptive controller 140 is connected between the audio amplifier 130 and the audio output port 150, and the amplified audio signal is input to the gain adaptive controller 140, the audio signal at the signal output end of the gain adaptive controller 140 is sampled and subjected to integral processing, the audio signal is adjusted according to the integral processing result, and the adjusted audio signal is output to the audio output port 150, so that the volume of the output sound is automatically adjusted.
Specifically, the gain adaptive controller 140, please refer to fig. 2, which includes: left and right input terminals 141, 142, left and right signal output terminals 143, 144, a changeover switch 147, an attenuation circuit 148, a signal sampling circuit 145 and an analog-to-digital converter 146.
Specifically, the switch 147 is connected to the left and right input terminals 141 and 142, the attenuator circuit 148 is connected to the left and right output terminals C, D and the left and right signal output terminals 143 and 144 of the switch 147, the signal sampling circuit 145 is connected to the left and right signal output terminals 143 and 144, and the analog-to-digital converter 146 is connected to the sampling circuit 145 and the control terminal group A, B of the switch 17, respectively.
Specifically, the attenuation circuit 148 includes at least two attenuation branch groups, i.e., left and right attenuation branch groups E, F, each of which includes a plurality of attenuation branches, each of which is used for attenuating the signals inputted from the left and right input terminals 141, 142 to different degrees.
Specifically, each attenuation branch in each attenuation branch group of the attenuation circuit 148 is not connected in series or connected in series with resistors r1, r2, r3 and rn with different resistances, so that the signal input from the input end is attenuated to different degrees correspondingly.
Specifically, the signal sampling circuit 145 is configured to obtain sampling signals from the left and right signal output terminals 143, 144; the analog-to-digital converter 146 is configured to convert the sampled signal from an analog quantity to a digital quantity, and the digital quantity control switch 147 selects a corresponding attenuation branch in the attenuation circuit 148 to transmit the signal input from the left and right input terminals 141, 142 to the left and right signal output terminals 143, 144.
Specifically, the analog-to-digital converter 146 divides the analog quantity of the sampling signal into N number of value segments according to the preset size, where N is an integer greater than 1, and the number of the value segments is 1, 2, and 3 … … N; corresponding to the N binary numbers, the N binary numbers are generated after analog-to-digital conversion; when a sampling signal falls into a value section of the analog quantity, the analog-to-digital converter 146 generates a corresponding digital quantity according to the value section; the digital quantity is input to the changeover switch 147 via the left and right control terminal groups A, B of the changeover switch.
Specifically, the transfer switch 147 controls the off or on state of each output port in the left and right output terminal groups C, D according to the digital quantity.
Specifically, the switch 147 controls the corresponding output ports of the left and right output port groups C, D to be turned on and the other output ports to be turned off according to the digital quantity.
Specifically, the audio processing chip 100 further includes a custom input interface for receiving a user setting for the analog quantity division of the sampling signal and then changing the preset setting in the analog-to-digital converter 146.
Specifically, the audio processing chip 100 further comprises an ambient noise input interface for receiving ambient noise and changing the preset in the analog-to-digital converter 146 based on the ambient noise adjustment.
Specifically, the audio processing chip 100 further comprises a feedback controller 160, and the gain adaptive controller 140 further comprises a feedback output 149; the feedback controller 160 is connected between the feedback output end 149 of the gain adaptive controller 140 and the audio amplifier 130, and is configured to gradually reduce the amplification amplitude of the audio signal by the audio amplifier 130 when the change-over switch 147 controls the audio signal to pass through the attenuation branch with a nonzero resistance value in the attenuation circuit 148 until the change-over switch 147 controls the audio signal to pass through the attenuation branch with a zero resistance value in the attenuation circuit 148. Thereby reducing unnecessary power consumption.
The audio processing chip 100 provided by the invention obtains the sampling signal of the signal output end through the gain adaptive controller 140, converts the sampling signal from analog quantity to digital quantity, controls the change-over switch to select the corresponding attenuation branch by using the sampling signal of the digital quantity, and transmits the signal input from the input end to the signal output end by using the change-over switch and the attenuation branch; compared with the prior art, the chip realizes automatic control of output volume, avoids overlarge volume of output sound, achieves the purpose of protecting hearing, uses less hardware, is convenient to implement and saves energy.
Example 2:
the present embodiment provides a headset, including: an input terminal for inputting an audio electrical signal; the loudspeaker is used for converting the audio signal into sound wave from the electric signal; the input end of the audio processing chip 100, the audio processing chip 100 and the loudspeaker are connected in sequence; the audio signal is input to the audio processing chip processing 100 through the input end, and the processed audio signal is output to the speaker, so that the audio signal is converted into sound waves. The earphone provided by the invention has the same performance as the audio processing chip 100, and is not described again.
Specifically, the earphone further comprises a wire controller, and a user can manually control the volume output by the loudspeaker by adjusting the wire controller.
Specifically, the wire controller is connected between the speaker and the gain adaptive controller 140 or between the input terminal and the gain adaptive controller 140.
It should be noted that the above-mentioned embodiments are provided for further detailed description of the present invention, and the present invention is not limited to the above-mentioned embodiments, and those skilled in the art can make various modifications and variations on the above-mentioned embodiments without departing from the scope of the present invention.