Audio codec circuit
By designing the audio codec circuit in the true wireless earphones and using components such as voltage detection, output processing and correction circuits, the problem of inconsistency in audio processing of the left and right ear units is solved, and the synchronization and consistency of the broadcast volume are achieved. Adapt to power supply changes and process drift.
Patent Information
- Application Number
- CN202010092670.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-14
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-02-14
AI Technical Summary
The audio processing inconsistency between the left and right ear units in true wireless headphones makes it difficult to achieve broadcast volume synchronization and volume consistency.
Design an audio codec circuit, including voltage detection circuit, output processing circuit, digital to analog circuit, audio amplification circuit and other components. By compensating the input voltage and output circuit parameters, it ensures that the analog audio output by the left and right ear units is consistent. performance, and optimize the output of the audio amplification circuit through correction circuits and switching switches.
It improves the consistency of audio processing between the left and right ear units, ensures the synchronization and consistency of broadcast volume, adapts to power supply voltage changes and process drift, and reduces the differences between different audio codec circuits.
Smart Images

Figure CN113345445B
Abstract
Description
Technical Field
[0001] The invention relates to a codec circuit, in particular to an audio codec circuit. Background Art
[0002] True Wireless Stereo refers to a headset without any wires connecting the left and right ear units and the main unit. The main unit transmits signals wirelessly to the left and right ear units of the true wireless headset. Some true wireless headsets transmit signals wirelessly between the left and right ear units to obtain better dialing and reception quality, while other true wireless headsets do not transmit signals between the left and right ear units.
[0003] In the design of true wireless earphones, there are relatively high requirements for the synchronization of the broadcasting between the two ears and the consistency of the broadcasting volume. Factors that affect the broadcasting volume between the two ears include the consistency of the audio processing of the left and right ear units and the consistency of the broadcasting of the speakers of the left and right ear units. The key to the consistency of the speakers is that the smaller the difference between the speakers, the better. That is, for the same analog audio, the closer the volume of the speakers of the two ears is, the better. The consistency of the audio processing of the left and right ear units is that after the left and right ear units convert the same digital audio into analog audio, the analog audio output by the two is as close as possible. Summary of the invention
[0004] Based on the above requirements of true wireless headphones, this case proposes an audio codec circuit, which can improve the consistency of audio processing between left and right ear units.
[0005] According to some embodiments, a wireless and audio codec circuit includes a wireless circuit and an audio codec circuit.
[0006] According to some embodiments, an audio codec circuit includes a voltage detection circuit, an output processing circuit, a digital-to-analog circuit, and an audio amplifier circuit. The voltage detection circuit is used to detect an input voltage. The output processing circuit obtains a first output compensation value based on the input voltage, an output circuit parameter, and a first output reference. The output processing circuit processes a digital audio and compensates the processed audio with the first output compensation value. The digital-to-analog circuit is used to perform digital-to-analog conversion on the compensated audio to obtain an analog audio. The audio amplifier circuit is used to amplify the analog audio and output it.
[0007] According to some embodiments, the first output reference is a standard voltage obtained by the output processing circuit according to the input voltage and the output circuit parameters when the input voltage is a standard voltage.
[0008] According to some embodiments, the audio codec circuit has a second output compensation value, which is an output comparison value of the amplified analog audio and the digital audio when the input voltage is the standard voltage, and the output processing circuit compensates the processed audio with the first output compensation value and the second output compensation value.
[0009] According to some embodiments, the audio codec circuit further includes a preamplifier circuit, an analog-to-digital circuit, and an input processing circuit. The preamplifier circuit is used to amplify a received audio signal. The analog-to-digital circuit is used to convert the amplified signal into a digital signal. The input processing circuit obtains a first input compensation value according to the input voltage, an input circuit parameter, and a first input reference value. The input processing circuit processes and compensates the digital signal with the first input compensation value and outputs it.
[0010] According to some embodiments, the audio codec circuit includes a level generating circuit, which is used to generate a level voltage based on the input voltage. The audio codec circuit has a second input compensation value, and the second input compensation is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The input processing circuit compensates the digital signal with the first input compensation value and the second input compensation value. The audio amplification circuit is used to amplify and output the analog audio based on the level voltage. The digital-to-analog circuit is used to perform digital-to-analog conversion on the compensated digital audio based on the level voltage to obtain an analog audio.
[0011] According to some embodiments, an audio codec circuit includes an output processing circuit, a digital-to-analog circuit, an audio amplifier circuit, a loopback gain circuit, a loopback analog-to-digital conversion circuit, and a correction circuit. The output processing circuit is used to process a digital audio and output it. The digital-to-analog circuit is used to perform digital-to-analog conversion on the output of the output processing circuit to output an analog audio. The audio amplifier circuit is used to amplify the analog audio to output an amplified audio. The loopback gain circuit is used to gain the amplified audio to output a gained audio. The loopback analog-to-digital conversion circuit is used to perform analog-to-digital conversion on the gained audio to a digital loopback audio. The correction circuit is used to control the output processing circuit to use a test audio as the output of the output processing circuit, and to compare the digital loopback audio with the test audio to obtain a correction compensation value, and the correction circuit controls the output processing circuit to compensate the processed digital audio with the correction compensation value and use the compensated digital audio as the output of the output processing circuit.
[0012] According to some embodiments, the audio codec circuit further includes a control circuit, which, when activated, controls the output processing circuit to use the test audio as the output of the output processing circuit, enables the correction circuit to compare the digital feedback audio and the test audio to obtain the correction compensation value, and controls the output processing circuit to compensate the processed digital audio with the correction compensation value and use the compensated digital audio as the output of the output processing circuit.
[0013] According to some embodiments, the audio codec circuit has a second output compensation value, which is an output comparison value of the amplified analog audio and the digital audio when the input voltage is a standard voltage. The output processing circuit compensates the processed digital audio with the correction compensation value and the second output compensation value, and uses the compensated digital audio as the output of the output processing circuit.
[0014] According to some embodiments, the audio codec circuit further includes a switching switch. When the correction circuit controls the output processing circuit to use a test audio as the output of the output processing circuit, the correction circuit also controls the switching switch so that the output of the audio amplifier circuit is electrically connected to the loopback gain circuit. When the correction circuit controls the output processing circuit to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit, the correction circuit also controls the switching switch so that the output of the audio amplifier circuit is electrically connected to the speaker.
[0015] According to some embodiments, the audio codec circuit further includes a preamplifier circuit, an analog-to-digital converter, and an input processing circuit. The preamplifier circuit is used to amplify a received audio signal. The analog-to-digital converter is used to convert the amplified signal into a digital signal. The input processing circuit is used to process and output the digital signal after compensating it with a second input compensation value, wherein the second input compensation is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage.
[0016] According to some embodiments, the audio codec circuit includes an output processing circuit, a digital-to-analog circuit, an audio amplifier circuit, a preamplifier circuit, an analog-to-digital circuit, an input processing circuit, and a correction circuit. The output processing circuit is used to process a digital audio and output it. The digital-to-analog circuit is used to perform digital-to-analog conversion on the output of the output processing circuit to output an analog audio. The audio amplifier circuit is used to amplify the analog audio to output an amplified analog audio. The preamplifier circuit is used to amplify a radio signal. The analog-to-digital circuit is used to convert the amplified radio signal into a digital signal. The input processing circuit is used to process the digital signal and output it. The correction circuit 124 is used to control the output processing circuit to use a test audio as the output of the output processing circuit, to use the amplified analog audio as the reception signal, and to compare the digital signal and the test audio to obtain a correction compensation value. The correction circuit controls the output processing circuit to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit.
[0017] In summary, according to some embodiments, when the audio codec circuit is configured in the left and right ear units, the consistency of the audio processing of the left and right ear units can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A functional block diagram of a true wireless headset and its application according to some embodiments is shown;
[0019] Figure 2 A functional block diagram of an audio codec circuit according to some embodiments is shown;
[0020] Figure 3 A functional block diagram of an audio codec circuit according to some embodiments is shown; and
[0021] Figure 4 FIG. 4 is a functional block diagram of an audio codec circuit according to some embodiments. DETAILED DESCRIPTION
[0022] Please refer to Figure 1 , Figure 1 A functional block diagram of a true wireless headset and its application according to some embodiments is shown. The true wireless headset includes a left ear unit 10 and a right ear unit 50. The left ear unit 10 and the right ear unit 50 communicate with the main device 90 in a wireless manner. The left ear unit 10 includes a wireless circuit 150, a power circuit 140, an audio codec circuit 100, a speaker 170, and a microphone 160. Similarly, the right ear unit 50 includes a wireless circuit 550, a power circuit 540, an audio codec circuit 500, a speaker 570, and a microphone 560.
[0023] In some embodiments, the main device 90 is a device that can play sound, such as an MP3 player, a mobile phone, a laptop computer, a desktop computer, a car audio and video device, a stereo, a karaoke, etc. In some embodiments, the main device 90 is a device that can receive sound, such as a recorder, a voice recorder, an amplifier, a mobile phone, a laptop computer, a desktop computer, a car audio and video device, a stereo, a karaoke, etc. In some embodiments, the main device 90 is a device that can broadcast and receive sound, such as a mobile phone, a laptop computer, a desktop computer, a car audio and video device, a stereo, a karaoke, etc.
[0024] The wireless communication standards of the wireless circuits 150, 550 of the main device 90 and the left and right ear units 10, 50 are consistent. In some embodiments, the main device 90 communicates wirelessly with the left and right ear units 10, 50 in a Bluetooth manner. In this example, the wireless circuit 150, 550 is a Bluetooth wireless circuit, and the wireless circuit is but not limited to a Bluetooth chip (Bluetooth Host / Chip). However, the wireless communication between the main device 90 and the left and right ear units 10, 50 can be other wireless communication protocols, and other wireless communication protocols are but not limited to WiFi and ZigBee. Taking the wireless circuit 150, 550 as a Bluetooth chip as an example, the Bluetooth chip includes a radio frequency circuit (RF circuit, Radio Frequency circuit), a modulation circuit (Modulating Circuit), and a baseband circuit (Baseband Circuit / Baseband Processor).
[0025] During broadcasting, the main device 90 communicates with the left and right ear units 10, 50 by wireless communication, and transmits the audio to be played to the left and right ear units 10, 50, the wireless circuit 150, 550 and the main device 90 receive and transmit the audio to the audio codec circuit 100, 500, the audio codec circuit 100, 500 processes the audio and converts it into analog audio, the audio codec circuit 100, 500 provides the analog audio to the speaker 170, 570, and the speaker 170, 570 plays the analog audio as the corresponding sound.
[0026] When receiving sound (for example, when the user speaks to the microphone 160), the microphone 160 converts the sound into a receiving signal, and the audio codec circuit 100, 500 converts the receiving signal into digital sound and transmits it to the wireless circuit 150, 550, and the wireless circuit 150, 550 transmits the digital sound to the main device 90 via wireless communication.
[0027] The power circuit 140, 540 is used to provide power to the wireless circuit 150, 550 and the audio codec circuit 100, 500. In some embodiments, the power circuit 140, 540 includes a battery and a power management circuit (not shown).
[0028] The structure of the right ear unit 50 is similar to that of the left ear unit 10 . The left ear unit 10 is used for explanation below, and the right ear unit 50 is not described in detail.
[0029] Please refer to Figure 2 , Figure 2 The functional block diagram of the audio codec circuit according to some embodiments is shown. The audio codec circuit 100 includes a voltage detection circuit 101, an output processing circuit 102, a digital-to-analog circuit 104, and an audio amplifier circuit 106. The voltage detection circuit 101 is used to detect an input voltage. The output processing circuit 102 obtains a first output compensation value according to the input voltage, an output circuit parameter, and a first output reference. The output processing circuit 102 processes a digital audio and compensates the processed digital audio with the first output compensation value. The digital-to-analog circuit 104 is used to perform digital-to-analog conversion on the compensated digital audio to obtain an analog audio. The audio amplifier circuit 106 is used to amplify the analog audio and output it.
[0030] The audio codec circuit 100 receives power from the power circuit 140, and the voltage detection circuit 101 is used to detect the input voltage of the power. In some embodiments, the audio codec circuit 100 includes a power input terminal 108, and the power input terminal 108 is used to receive the power from the power circuit 140. The voltage detection circuit 101 is used to detect the input voltage of the power input terminal 108.
[0031] The digital audio processed by the output processing circuit 102 may be digital audio from outside the output processing circuit 102, for example, digital audio received by a digital interface 110 of the audio codec circuit 100. Figure 1 For example, the digital audio comes from the wireless circuit 150. The output processing circuit 102 processes the digital audio by, but is not limited to, equalizing the digital audio, increasing the sampling frequency of the digital audio (upsampling), etc. In some embodiments, the output processing circuit 102 increases the sampling frequency of the digital audio by interpolating to advance the sampling frequency. After the output processing circuit 102 processes the digital audio, the processed digital audio is obtained.
[0032] In some embodiments, the first output reference is the output voltage (also referred to as the specification voltage) of the audio amplifier circuit 106 obtained by the output processing circuit 102 according to the output circuit parameter and the standard voltage (i.e., the input voltage) when the audio codec circuit 100 is supplied with a power supply having a standard voltage. In some embodiments, the relationship between the output circuit parameter Co, the standard voltage Vs, and the output voltage Vo is Vo=Co*Vs*Di, where Di is the digital audio output by the output processing circuit 102. The output circuit parameter Co is related to the design specifications of the digital-to-analog circuit 104 and the audio amplifier circuit 106, so the output voltage of the audio amplifier circuit 106 obtained by the output processing circuit 102 according to the output circuit parameter and the standard voltage can also be referred to as the specification voltage. For example, if the standard voltage is 1.8V and the output circuit parameter is Co, the output voltage value Vo is 1.8*Co*Di, and this 1.8Co is the first output reference (i.e., the output voltage value Vo divided by the digital audio Di output by the output processing circuit 102).
[0033] In some embodiments, the aforementioned standard voltage is the rated voltage (RatedVoltage) of the audio codec circuit 100 .
[0034] The output voltage Vo of the audio amplifier circuit 106 (i.e., the output voltage after conversion by the digital-to-analog circuit 104 and amplification by the audio amplifier circuit 106) is related to the input voltage supplied to the audio codec circuit 100, that is, the output voltage Vo of the audio amplifier circuit 106 is related to the input voltage Vdd detected by the voltage detection circuit 101: Vo=Co*Vdd. Figure 1 In the embodiment of the invention, the audio codec circuit 100 is supplied with power by the power circuit 140, and the voltage of the power may change over time. For example, the power circuit 140 includes a battery. The voltage of a brand new battery may be higher than the standard voltage, and the battery voltage may decrease over time. Therefore, the output voltage of the audio amplifier circuit 106 will change accordingly, resulting in a difference from the first output reference at the time of design. Therefore, the output processing circuit 102 obtains the first output compensation value according to the input voltage Vdd, the output circuit parameter Co, and the first output reference. For example, the standard voltage is 1.8V, and the first output reference is 1.8Co. When the input voltage Vdd obtained by the voltage detection circuit 101 is 1.7V, the output voltage of the audio amplifier circuit 106 is 1.7Co, and a difference of 0.1Co is generated between the two. At this time, the output processing circuit 102 obtains the first output compensation value corresponding to the difference value of 0.1Co.
[0035] Next, the output processing circuit 102 processes the digital audio and compensates the processed audio with the first output compensation value. Taking the aforementioned first output compensation value of 0.1Co as an example, the output processing circuit 102 compensates the processed digital audio with the first output compensation value of 0.1Co. In this way, the audio codec circuit 100 can compensate for the difference in output voltage caused by the difference between the supplied voltage and the standard voltage (which can also be the design voltage). Therefore, when the voltage supplied by the power circuit 140, 540 is different between the left ear unit 10 with the audio codec circuit 100 and the right ear unit 50 with the audio codec circuit 500, there will be no difference in the output voltage of the audio codec circuit 100, 50 of the left and right ear units 10, 50, that is, when the voltage supplied by the power circuit 140, 540 changes, the left and right ear units 10, 50 can still output a relatively consistent output voltage, and the corresponding speakers 170, 570 can also emit a relatively consistent volume.
[0036] The first output reference may be stored in a memory inside the output processing circuit 102 , may be stored in the firmware of the output processing circuit 102 , or may be stored in a memory outside the output processing circuit 102 .
[0037] The digital-to-analog circuit 104 is used to perform digital-to-analog conversion on the compensated audio to obtain an analog audio. The digital-to-analog conversion is to convert a digital signal into an analog signal. The audio amplifier circuit 106 (Audio amplifier / Headphone amplifier) is used to amplify the analog audio and output an amplified analog audio.
[0038] The power input terminal 108 receives power from the power circuit 140 and supplies the power to all components within the audio codec circuit 100 , such as but not limited to the voltage detection circuit 101 , the output processing circuit 102 , the digital-to-analog circuit 104 , and the audio amplifier circuit 106 .
[0039] In some embodiments, the first output reference is a standard voltage of the audio codec circuit 100, and the output processing circuit 102 obtains a first output compensation value according to the input voltage Vdd, the output circuit parameter Co, and the first output reference. According to the above example, when the standard voltage is 1.8V (volts), the output voltage of the audio amplifier circuit is 1.8Co, and when the input voltage obtained by the voltage detection circuit 101 is 1.65V (volts), the output voltage of the audio amplifier circuit is 1.65Co, therefore, the first output compensation value obtained by the output processing circuit 102 is a compensation value corresponding to 0.15Co (1.8Co-1.65Co).
[0040] The output processing circuit 102 compensates the processed digital audio with the first output compensation value, so that the output voltage of the audio amplifier circuit 106 at the input voltage is consistent with the output voltage of the audio amplifier circuit 106 at the standard voltage.
[0041] As can be seen from the above description, the first output reference can be "the standard voltage of the audio codec circuit 100" or "the output voltage of the audio amplifier circuit 106 obtained according to the output circuit parameters and the standard voltage when the audio codec circuit 100 is supplied with a power supply having a standard voltage." When the first output reference is the standard voltage of the audio codec circuit 100, the output processing circuit 102 obtains the first output compensation value according to (Vs-Vdd)*Co.
[0042] The audio codec circuit 100 compensates the digital signal according to the first output compensation value, which can compensate for the difference of the audio codec circuit 100 caused by the input voltage change, so that there will be no difference in output analog audio caused by the input voltage change between multiple audio codec circuits 100.
[0043] In some embodiments, the first output compensation value also compensates for the differences between the multiple voltage detection circuits 101 due to process drift. Specifically, the voltage detection circuit 101 is used to detect the input voltage and convert it into a corresponding digital voltage signal. When the voltage detection circuit 101 is manufactured, there may be differences between the multiple voltage detection circuits 101 due to process drift. For example, during design, when the voltage detection circuit 101 detects a 1.8V voltage, it should output a digital voltage signal corresponding to 1.8V. However, when some actual products of the voltage detection circuit 101 detect 1.8V, they output a digital voltage signal corresponding to 1.82V or 1.79V, where -0.02V (1.8-1.82) or 0.01V (1.8-1.79) is the difference between the voltage detection circuit 101 due to the process. In order to compensate for the difference caused by the process, the first output compensation value also compensates for the difference caused by the process.
[0044] The difference of the voltage detection circuit 101 caused by the manufacturing process can be obtained by testing the calibration machine and reading the digital voltage signal output by the voltage detection circuit 101 before the audio codec circuit 100 leaves the factory. Continuing with the example of the first output compensation value, the calibration machine provides a standard voltage of 1.8V to the audio codec circuit 100, and the calibration machine reads the digital voltage signal 1.78V output by the voltage detection circuit 101, and obtains a difference value of 0.02V (1.8-1.78). When the audio codec circuit 100 is operating, when the input voltage detected by the voltage detection circuit 101 is 1.73, the first output compensation value is 0.05V (1.8-(1.73+0.02)), therefore, the output processing circuit 102 compensates the digital audio with the first output compensation value (0.05V).
[0045] In some embodiments, the audio codec circuit 100 includes a level generating circuit 118, which is used to generate a level voltage according to the input voltage, and provide the level voltage to the digital-to-analog circuit 104 and the audio amplifier circuit 106. The digital-to-analog circuit 104 performs digital-to-analog conversion on the compensated audio according to the level voltage to obtain the analog audio. The audio amplifier circuit 106 amplifies the analog audio according to the level voltage and outputs it.
[0046] In some embodiments, the audio codec circuit 100 has a second output compensation value, which is an output comparison value of the amplified analog audio and the digital audio when the input voltage is the standard voltage, and the output processing circuit 102 compensates the processed audio with the first output compensation value and the second output compensation value.
[0047] The second output compensation value is used to compensate for the differences between multiple audio codec circuits 100 caused by process drift when the audio codec circuit 100 is manufactured. This second output compensation value can be obtained by a calibration machine (or a calibration fixture, not shown in the figure) before the audio codec circuit 100 leaves the factory. The calibration machine provides a power supply with a standard voltage to the audio codec circuit 100, and the calibration machine provides the digital audio to the audio codec circuit 100 via the digital interface 110. Then, the output processing circuit 102 processes the digital audio and compensates the processed audio with the first output compensation value. The digital-to-analog circuit 104 is used to perform digital-to-analog conversion on the compensated audio to obtain an analog audio. The audio amplifier circuit 106 is used to amplify the analog audio and output it. The calibration machine receives the amplified analog audio and compares the amplified analog audio with the digital audio to obtain an output comparison value. For example, the volume of digital audio is 9 decibels (dB). When designing, the voltage corresponding to 9dB of the amplified analog audio is a corresponding voltage. The calibration machine compares the voltage of the amplified analog audio with the corresponding voltage to obtain the output comparison value. The calibration machine then obtains the second output compensation value based on the output comparison value and stores the second output compensation value in the audio codec circuit 100.
[0048] The second output compensation value obtained by the test of the calibration machine is used to compensate for the differences caused by the process in the digital-to-analog circuit 104, the level generating circuit 118, and the audio amplifier circuit 106 of the audio codec circuit 100. The error of the process drift is also explained by the relationship between the output voltage value Vo and the input digital audio Di. When the audio codec circuit 100 is designed, its output circuit parameter is Co, so the output voltage value Vo during design is Vdd*Co*Di. However, due to process factors, the output circuit parameter of the actual product is Co', so that the actual output voltage value Vo' is Vdd*Co'*Di. There is a difference between Vo and Vo'. Therefore, the actual output voltage value of the audio codec circuit 100 at the standard voltage of 1.8V is measured by the calibration machine, and the second output compensation value is obtained. In some embodiments, the second output compensation value A is Vo / Vo'=1.8*Di*Co / (1.8*Di*Co')=Co / Co', and the output processing circuit 102 compensates the digital audio Di with the second output compensation value A to be Di*A. Therefore, the actual output voltage of the audio amplifier circuit 106 is Vdd*Co'*Di*A. Substituting A, the actual output voltage is Vdd*Co'*Di*(Co / Co')=Vdd*Co*Di, and this actual output voltage is the designed output voltage. In this way, the errors caused by the process of the plurality of audio codec circuits 100 can be compensated by the second output compensation value.
[0049] Since the audio codec circuit 100 is supplied with a power source having the standard voltage, the first compensation value is zero, and the calibration machine will not be affected by the first compensation value when testing and measuring the corresponding voltage.
[0050] Therefore, the audio codec circuit 100 subsequently compensates the processed digital audio with the first output compensation value and the second output compensation value. This approach can eliminate the differences between different audio codec circuits 100 caused by process drift and the differences caused by different power supply voltages supplied to the audio codec circuit 100, thereby improving the consistency of the volume of the left and right ear units 10, 50.
[0051] The second output compensation value may be stored in a memory inside the audio codec circuit 100 , for example but not limited to, the second output compensation value is stored in a memory inside or outside the output processing circuit 102 , or the second output compensation value may be stored in the firmware of the output processing circuit 102 .
[0052] In some embodiments, the audio codec circuit 100 further includes a preamplifier circuit 112, an analog-to-digital converter circuit 114, and an input processing circuit 116. The preamplifier circuit 112 is used to amplify a received audio signal. The analog-to-digital converter circuit 114 is used to convert the amplified signal into a digital signal. The input processing circuit 116 obtains a first input compensation value according to the input voltage, an input circuit parameter, and a first input reference value. The input processing circuit processes and compensates the digital signal with the first input compensation value and outputs it.
[0053] The order in which the input processing circuit 116 processes and compensates the digital signal with the second input compensation value can be reversed, that is, the input processing circuit 116 first processes the digital signal and then compensates the processed digital signal with the second input compensation value, or the input processing circuit 116 first compensates the digital signal with the second input compensation value and then processes the compensated digital signal.
[0054] The aforementioned audio signal comes from the microphone 160. The preamplifier circuit 112 is used to amplify the audio signal. The analog-to-digital circuit 114 is used to convert the amplified signal into a digital signal. The input processing circuit 116 processes the digital signal by downsampling the digital signal. In some embodiments, the input processing circuit 116 includes a digital decimation filter.
[0055] The first input reference value may be stored in a memory inside the input processing circuit 116 , may be stored in the firmware of the input processing circuit 116 , or may be stored in a memory outside the input processing circuit 116 .
[0056] The first input reference value has a similar concept to the first output reference value. The first input reference value is the volume of the digital signal obtained according to the design specifications after the audio signal passes through the preamplifier circuit 112 and the analog-to-digital conversion circuit 114 when the audio codec circuit 100 is supplied with a power supply having a standard voltage. Therefore, the input circuit parameter Ci is related to the design specifications of the preamplifier circuit 112 and the analog-to-digital conversion circuit 114. In some embodiments, the relationship between the input circuit parameter Ci, the standard voltage Vs, and the voltage Vmi of the audio signal is Vi=Ci*Vmi*Vs, where Vi is the digital signal output from the analog-to-digital conversion circuit 114 to the input processing circuit 116, and Vmi is the voltage of the audio signal from the microphone 160 passing through the preamplifier circuit 112. For example, if the standard voltage is 1.8V and the input circuit parameter is Ci, the voltage value Vi of the digital signal is 1.8*Ci*Vmi, and this 1.8Ci*Vmi is the first input reference.
[0057] Similar to the concept of the first output reference described above, the relationship between the input circuit parameter Ci, the input voltage Vdd, the voltage Vmi of the audio signal, and the digital signal Vi is Vi=Ci*Vdd*Vmi. Therefore, when the voltage of the power supply provided by the power circuit 140 to the audio codec circuit 100 changes, the amplification of the preamplifier circuit 112 and the conversion result of the analog-to-digital circuit 114 will also change. For example, the standard voltage is 1.8V, the first input reference is 1.8Ci, when the input voltage changes to 1.65V, Vi changes to 1.65Ci*Vmi, and the difference between Vi and the first input reference is 0.15Ci*Vmi, where 0.15 is the remainder of 1.8-1.65, and the input processing circuit 116 obtains the first input reference corresponding to the difference 0.15Ci*Vmi.
[0058] Similar to the first output reference, in some embodiments, the first input reference can also be the "standard voltage of the audio codec circuit 100", or "the volume of the analog to digital output obtained based on the input circuit parameters and the standard voltage when the audio codec circuit 100 is supplied with a power supply with a standard voltage."
[0059] Therefore, the input processing circuit 116 obtains the first input compensation value according to the input voltage, the input circuit parameter, and the first input reference value. The input processing circuit 116 processes the digital signal and compensates the processed digital signal with the first input compensation value and outputs it. The compensated digital signal output by the input processing circuit 116 is output to the wireless circuit 150 via the digital interface 110. The wireless circuit 150 transmits the compensated digital signal to the main device 90 via wireless communication.
[0060] In addition, the level voltage generated by the level generating circuit 118 is also provided to the analog-to-digital conversion circuit 114 and the preamplifier circuit 112 .
[0061] In some embodiments, the audio codec circuit 100 has a second input compensation value, which is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The input processing circuit 116 compensates the digital signal with the first input compensation value and the second input compensation value.
[0062] Similar to the aforementioned second output compensation value, the second input compensation value may be obtained by calibration using a calibration machine (or calibration fixture, not shown) before the audio codec circuit 100 leaves the factory. The calibration machine provides a power supply with a standard voltage to the audio codec circuit 100, and the calibration machine provides a predetermined received audio signal to the preamplifier circuit 112. The preamplifier circuit 112 amplifies the received audio signal, the analog-to-digital circuit 114 converts the amplified received audio signal into a digital signal, and the input processing circuit 116 processes the digital signal and outputs the processed digital signal after compensating it with the first input compensation value. The calibration machine receives the compensated digital signal from the digital interface 110, and compares the compensated digital signal with the received audio signal to obtain the input comparison value. The calibration machine obtains the second input compensation value based on the input comparison value, and transmits it to the audio codec circuit 100 via the digital interface 110. The audio codec circuit 100 stores the second input compensation value, and the second input compensation value can be stored in the input processing circuit 116. For example, according to the design specification of the audio codec circuit 100, after receiving and processing the predetermined received audio signal, the volume of the digital signal output by the audio codec circuit 100 to the wireless circuit 150 is 9dB. However, when the calibration is performed by the calibration machine, the volume of the digital signal output by the audio codec circuit 100 is 8.88dB, which means that the audio codec circuit 100 is 0.12dB different from the design specification. Therefore, the calibration circuit will transmit the second input compensation value corresponding to 0.12dB to the audio codec circuit 100 so that the input processing circuit 116 can compensate accordingly.
[0063] Therefore, the audio codec circuit 100 subsequently compensates the processed digital signal with the first input compensation value and the second input compensation value. This approach can eliminate the differences between different audio codec circuits 100 caused by process drift and the differences caused by the different power supply voltages supplied to the audio codec circuit 100, thereby improving the consistency of the sound reception of the left and right ear units 10, 50.
[0064] In some embodiments, the calibration machine for obtaining the second output compensation value may also be implemented by a control circuit (such as Figure 3 as shown).
[0065] Please refer to Figure 3 , Figure 3 The functional block diagram of the audio codec circuit according to some embodiments is shown. The audio codec circuit 100a includes an output processing circuit 102, a digital-to-analog circuit 104, an audio amplifier circuit 106, a loopback gain circuit 120, a loopback analog-to-digital conversion circuit 122, and a correction circuit 124. The output processing circuit 102 is used to process a digital audio and output it. The digital-to-analog circuit 104 is used to perform digital-to-analog conversion on the output of the output processing circuit 102 to output an analog audio. The audio amplifier circuit 106 is used to amplify the analog audio to output an amplified audio (amplified analog audio). The loopback gain circuit 120 is used to gain the amplified audio to output a gained audio. The loopback analog-to-digital conversion circuit 122 is used to perform analog-to-digital conversion on the gained audio to a digital loopback audio. The correction circuit 124 is used to control the output processing circuit 102 to use a test audio as the output of the output processing circuit 102, and to compare the digital feedback audio and the test audio to obtain a correction compensation value. The correction circuit 124 controls the output processing circuit 102 to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit 102.
[0066] The digital-to-analog conversion of the digital-to-analog circuit 104 refers to converting a digital signal into an analog signal. The analog-to-digital conversion of the loopback analog-to-digital conversion circuit refers to converting an analog signal into a digital signal.
[0067] After the test audio passes through the digital-to-analog circuit 104, the audio amplifier circuit 106, the loopback gain circuit 120, and the loopback analog-to-digital conversion circuit 122, in theory, when the audio codec circuit 100a that meets the design specifications is supplied with a power supply having a standard voltage, the digital loopback audio output by the loopback analog-to-digital conversion circuit 122 should be consistent with the test audio. Since the voltage of the power supply provided by the power supply circuit 140 is different from the standard voltage or other environmental factors (such as temperature, etc.) cause the difference between the left and right ear units 10, 50, the digital loopback audio output by the loopback analog-to-digital conversion circuit 122 is different from the test audio. The correction circuit 124 obtains a corresponding correction compensation value according to the difference between the digital loopback audio and the test audio, so that the output processing circuit 102 processes the digital audio and compensates the processed digital audio with the correction compensation value, and the output processing circuit 102 uses the compensated digital audio as the output of the output processing circuit 102. Next, the audio amplifier circuit 106 amplifies the output of the output processing circuit 102 (i.e., the compensated digital audio) to output the amplified audio. In this way, the audio codec circuit 100a can compensate for the difference in power supply voltage supplied by the power supply circuit 140 and other environmental changes caused by the difference in the audio codec circuit 100a of the left and right ear units 10, 50.
[0068] In some embodiments, the correction circuit 124 performs the aforementioned test audio operation and obtains the correction compensation value when the audio codec circuit 100a is initialized (i.e., when power is first supplied), and thereafter, the output processing circuit 102 processes the digital audio and compensates the processed digital audio with the correction compensation value.
[0069] In some embodiments, the audio codec circuit 100a further includes a control interface 126 and a control circuit 128. When the control circuit 128 is activated, it controls the output processing circuit 102 to use the test audio as the output of the output processing circuit 102, causes the correction circuit 124 to compare the digital feedback audio with the test audio to obtain the correction compensation value, and controls the output processing circuit 102 to compensate the processed digital audio with the correction compensation value and use the compensated digital audio as the output of the output processing circuit 102. The control circuit 128 is activated when receiving a command from the control interface 126. The wireless circuit 150 or the correction machine takes out the command through the control interface 126 to activate the control circuit 128.
[0070] In some embodiments, the control circuit 128 controls the correction circuit 124 to perform the aforementioned test audio operation and obtain the correction compensation value when the audio codec circuit 100a is initialized. In some embodiments, the control circuit 128 periodically controls the correction circuit 124 to perform the aforementioned test audio operation and obtain the correction compensation value. The length of the periodicity depends on the design, and the period is but not limited to every hour, every two hours, every three hours, etc. In some embodiments, the control circuit 128 non-periodically controls the correction circuit 124 to perform the aforementioned test audio operation and obtain the correction compensation value. For example, when the audio codec circuit 100a does not receive any digital audio from the digital interface 110, the control circuit 128 controls the correction circuit 124 to perform the aforementioned test audio operation and obtain the correction compensation value. The aforementioned digital interface 110 is suitable for receiving the digital audio from outside the audio codec circuit 100a, such as but not limited to the digital audio from the wireless circuit 150.
[0071] There are several implementations of the correction circuit 124 controlling the output processing circuit 102 to use a test audio as the output of the output processing circuit 102, such as but not limited to the following examples. 1: The correction circuit 124 controls the output processing circuit 102, and the output processing circuit 102 generates the test audio. 2: The correction circuit 124 generates and transmits the test audio to the output processing circuit 102, and the output processing circuit 102 outputs the test audio. 3: The correction machine (not shown) commands the control circuit 128 via the control interface 126 to control the correction circuit 124 and the output processing circuit 102 accordingly. The correction machine inputs the test audio via the digital interface 110, and the correction machine controls the output processing circuit 102 via the control circuit 128 to directly use the test audio as the output of the output processing circuit 102. Then, the correction machine controls the correction circuit 124 to compare the digital feedback audio with the test audio to obtain the correction compensation value. 4: The calibration machine transmits a preset audio to the output processing circuit 102 via the digital interface 110, wherein the preset audio will form the test audio after being processed by the output processing circuit 102. Therefore, the output processing circuit 102 will output the test audio. Then, the calibration machine controls the calibration circuit 124 to compare the digital feedback audio and the test audio to obtain the calibration compensation value.
[0072] Please refer to Figure 3In some embodiments, the audio codec circuit 100a further includes a switching switch 130. When the correction circuit 124 controls the output processing circuit 102 to use a test audio as the output of the output processing circuit 102, the correction circuit 124 also controls the switching switch 130 to electrically connect the output of the audio amplifier circuit 106 to the loopback gain circuit 120. When the correction circuit 124 controls the output processing circuit 102 to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit 102, the correction circuit 124 also controls the switching switch 130 to electrically connect the output of the audio amplifier circuit 106 to the speaker 170.
[0073] In some embodiments, the audio codec circuit 100a further includes a preamplifier circuit 112, an analog-to-digital converter circuit 114, and an input processing circuit 116. The preamplifier circuit 112 is used to amplify a received audio signal. The analog-to-digital converter circuit 114 is used to convert the amplified signal into a digital signal. The input processing circuit 116 is used to process and compensate the digital signal with a second input compensation value and then output it. The second input compensation is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The order in which the input processing circuit 116 processes and compensates the digital signal with the second input compensation value can be reversed, that is, the input processing circuit 116 first processes the digital signal and then compensates the processed digital signal with the second input compensation value, or the input processing circuit 116 first compensates the digital signal with the second input compensation value and then processes the compensated digital signal.
[0074] In some embodiments, the audio codec circuit 100 includes a plurality of level generating circuits 118a, 118b, the level generating circuits 118a, 118b are used to generate a level voltage according to the input voltage, and provide the level voltage to the digital-to-analog circuit 104, the audio amplifier circuit 106, the loopback gain circuit 120, the loopback analog-to-digital conversion circuit 122, the preamplifier circuit 112, and the analog-to-digital circuit 114. The digital-to-analog circuit 104 performs digital-to-analog conversion on the compensated audio according to the level voltage to obtain the analog audio. The audio amplifier circuit 106 amplifies the analog audio according to the level voltage and outputs it. The loopback gain circuit 120 gains the amplified audio according to the level voltage to output the gained audio. The loopback analog-to-digital conversion circuit 122 performs analog-to-digital conversion on the gained audio according to the level voltage to obtain the digital loopback audio. The preamplifier circuit 112 amplifies the received audio signal according to the level voltage. The analog-to-digital circuit 114 converts the amplified signal into the digital signal according to the voltage level.
[0075] See also Figure 4 , Figure 4 The functional block diagram of the audio codec circuit according to some embodiments is shown. The audio codec circuit 100b includes an output processing circuit 102, a digital-to-analog circuit 104, an audio amplifier circuit 106, a preamplifier circuit 112, an analog-to-digital circuit 114, an input processing circuit 116, and a correction circuit 124. The output processing circuit 102 is used to process a digital audio and output it. The digital-to-analog circuit 104 is used to perform digital-to-analog conversion on the output of the output processing circuit 102 to output an analog audio. The audio amplifier circuit 106 is used to amplify the analog audio to output the amplified analog audio. The preamplifier circuit 112 is used to amplify a received audio signal. The analog-to-digital circuit 114 is used to convert the amplified received audio signal into a digital signal. The input processing circuit 116 is used to process the digital signal and output it. The correction circuit 124 is used to control the output processing circuit 102 to use a test audio as the output of the output processing circuit 102, to use the amplified analog audio as the reception signal, and to compare the digital signal and the test audio to obtain a correction compensation value. The correction circuit 124 controls the output processing circuit 102 to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit.
[0076] The output processing circuit 102 can compensate the difference between the left and right ear monomers 10 and 50 caused by the difference between the voltage of the power provided by the power circuit 140 and the standard voltage or other environmental factors (such as temperature, etc.) by using the compensation of the calibration compensation value.
[0077] Figure 4 Examples and Figure 3 Similar to the embodiment, Figure 4 In the calibration phase of the embodiment, the calibration circuit 124 controls the output processing circuit 102 to use the test audio as the output of the output processing circuit 102, and uses the amplified analog audio output by the audio amplifier circuit 106 as the received audio signal, which is provided to the preamplifier circuit 112. The preamplifier circuit 112 amplifies the received audio signal, and the analog-to-digital circuit 114 converts the amplified analog signal into the digital signal. Then, the calibration circuit 124 compares the digital signal with the test audio to obtain the calibration compensation value. In this way, Figure 4 Compared with the embodiment of Figure 3 An embodiment of Figure 4 The audio codec circuit 100b does not need to be set Figure 3 The loopback gain circuit 120 and the loopback analog-to-digital conversion circuit 122 of the audio codec circuit 110a, Figure 4 The audio codec circuit 100b has a more compact circuit and lower cost.
[0078] In some embodiments, the audio codec circuit 100b further includes two switching switches 132, 134. When the correction circuit 124 controls the output processing circuit 102 to use the test audio as the output of the output processing circuit 102, the correction circuit 124 also controls the switching switches 132, 134 to electrically connect the output of the audio amplifier circuit 106 to the preamplifier circuit 112. When the correction circuit 124 controls the output processing circuit 102 to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit 102, the correction circuit 124 also controls the switching switches 132, 134 to electrically connect the output of the audio amplifier circuit 106 to the speaker 170.
[0079] In some embodiments, the audio codec circuit 100b has a second output compensation value, which is an output comparison value of the amplified analog audio and the digital audio when the input voltage is a standard voltage. The output processing circuit 102 compensates the processed digital audio with the correction compensation value and the second output compensation value, and uses the compensated digital audio as the output of the output processing circuit 102.
[0080] In some embodiments, the audio codec circuit 100b has a second input compensation value, which is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The input processing circuit 116 compensates the processed digital audio with the second input compensation value and uses the compensated digital audio as the output of the input processing circuit 116.
[0081] In some embodiments, the audio codec circuit 100b further includes a digital interface 110 and a plurality of level generating circuits 118a, 118b. In some embodiments, the audio codec circuit 100b further includes a control circuit 128 and a control interface 126. The digital interface 110, the level generating circuits 118a, 118b, the control circuit 128, and the control interface 126 are connected to the Figure 3 The corresponding circuits are similar and will not be described in detail.
[0082] Please refer to Figure 1 In some embodiments, the wireless and audio codec circuit (also referred to as a wireless and audio codec chip, or a wireless and audio codec integrated chip) includes a wireless circuit 150 and an audio codec circuit 100. The audio codec circuit 100 in the wireless and audio codec circuit may be Figure 2 The audio codec circuit 100, Figure 3 The audio codec circuit 100a, or Figure 4Any embodiment of the audio codec circuit 100b.
[0083] In summary, according to some embodiments, when the audio codec circuit is configured in the left and right ear units, the consistency of the audio processing of the left and right ear units can be improved.
[0084]
Explanation of symbols
[0085] 10: Left ear unit
[0086] 50: Right ear unit
[0087] 90: Main device
[0088] 100,500: Audio codec circuit
[0089] 100a, 100b: Audio codec circuit
[0090] 101: Voltage detection circuit
[0091] 102: Output processing circuit
[0092] 104: Digital to Analog Circuit
[0093] 106: Audio amplifier circuit
[0094] 108: Power input terminal
[0095] 110: Digital interface
[0096] 112: Preamplifier circuit
[0097] 114: Analog to digital circuit
[0098] 116: Input processing circuit
[0099] 118, 118a, 118b: Level generating circuit
[0100] 120: loopback gain circuit
[0101] 122: loopback analog-to-digital conversion circuit
[0102] 124: Correction circuit
[0103] 126: Control interface
[0104] 128: Control circuit
[0105] 130,132,134: Toggle switch
[0106] 140,540: Power circuit
[0107] 150,550: Wireless circuit
[0108] 160,560: Microphone
[0109] 170,570:Speaker.
Claims
1. An audio codec circuit, comprising: a voltage detection circuit for detecting an input voltage; an output processing circuit, wherein the output processing circuit obtains a first output compensation value according to the input voltage, an output circuit parameter, and a first output reference, and the output processing circuit processes a digital audio and compensates the processed digital audio with the first output compensation value; a digital-to-analog circuit for performing digital-to-analog conversion on the compensated digital audio to obtain an analog audio; and An audio amplifier circuit, used to amplify the analog audio and output it; The output circuit parameters are related to the design specifications of the digital-to-analog circuit and the audio amplifier circuit.
2. The audio codec circuit according to claim 1, wherein the first output reference is a standard voltage obtained by the output processing circuit according to the input voltage and the output circuit parameter when the input voltage is a standard voltage.
3. The audio codec circuit according to claim 2, wherein the audio codec circuit includes a level generating circuit, the level generating circuit is used to generate a level voltage according to the input voltage, the audio codec circuit has a second output compensation value, the second output compensation value is an output comparison value of the amplified analog audio and the digital audio when the input voltage is the standard voltage, the output processing circuit compensates the processed digital audio with the first output compensation value and the second output compensation value, the audio amplifier circuit is used to amplify the analog audio according to the level voltage and output it, and the digital-to-analog circuit is used to perform digital-to-analog conversion on the compensated digital audio according to the level voltage to obtain the analog audio.
4. The audio codec circuit according to any one of claims 2 to 3, further comprising: A preamplifier circuit for amplifying a received audio signal; An analog-to-digital circuit for converting the amplified signal into a digital signal; and An input processing circuit obtains a first input compensation value according to the input voltage, an input circuit parameter, and a first input reference value. The input processing circuit processes and compensates the digital signal with the first input compensation value and outputs the digital signal; The audio codec circuit has a second input compensation value, which is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The input processing circuit compensates the digital signal with the first input compensation value and the second input compensation value.
5. An audio codec circuit, comprising: An output processing circuit, used for processing a digital audio and outputting it; a digital-to-analog circuit for performing digital-to-analog conversion on the output of the output processing circuit to output an analog audio; An audio amplifier circuit, used for amplifying the analog audio to output an amplified analog audio; a loopback gain circuit for gaining the amplified analog audio to output a gained analog audio; A loopback analog-to-digital conversion circuit is used to convert the analog audio with gain into a digital loopback audio; and A correction circuit is used to control the output processing circuit to use a test audio as the output of the output processing circuit, and to compare the digital feedback audio and the test audio to obtain a correction compensation value. The correction circuit controls the output processing circuit to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit.
6. The audio codec circuit according to claim 5, wherein the audio codec circuit includes a level generating circuit, the level generating circuit is used to generate a level voltage according to an input voltage, the audio codec circuit has a second output compensation value, the second output compensation value is an output comparison value of the amplified analog audio and the digital audio when the input voltage is a standard voltage, the output processing circuit compensates the processed digital audio with the correction compensation value and the second output compensation value, and uses the compensated digital audio as the output of the output processing circuit, the audio amplifier circuit is used to amplify the analog audio according to the level voltage and output it, and the digital-to-analog circuit is used to perform digital-to-analog conversion on the compensated digital audio according to the level voltage to obtain the analog audio.
7. The audio codec circuit according to claim 6, further comprising: A preamplifier circuit for amplifying a received audio signal; an analog-to-digital circuit for converting the amplified signal into a digital signal; and An input processing circuit is used for processing and compensating the digital signal with a second input compensation value and then outputting the digital signal. The second input compensation value is an input comparison value of the digital signal and the audio signal when the input voltage is the standard voltage.
8. An audio codec circuit, comprising: An output processing circuit, used for processing a digital audio and outputting it; a digital-to-analog circuit for performing digital-to-analog conversion on the output of the output processing circuit to output an analog audio; An audio amplifier circuit, used for amplifying the analog audio to output an amplified analog audio; A preamplifier circuit for amplifying a received audio signal; An analog-to-digital circuit for converting the amplified audio signal into a digital signal; An input processing circuit for processing the digital signal and outputting it; and A correction circuit is used to control the output processing circuit to use a test audio as the output of the output processing circuit, to use the amplified analog audio as the received audio signal, and to compare the digital signal and the test audio to obtain a correction compensation value. The correction circuit controls the output processing circuit to compensate the processed digital audio with the correction compensation value and uses the compensated digital audio as the output of the output processing circuit.
9. The audio codec circuit according to claim 8, wherein the audio codec circuit includes a level generating circuit, the level generating circuit is used to generate a level voltage according to an input voltage, the audio codec circuit has a second output compensation value, the second output compensation value is an output comparison value of the amplified analog audio and the digital audio when the input voltage is a standard voltage, the output processing circuit compensates the processed digital audio with the correction compensation value and the second output compensation value, and uses the compensated digital audio as the output of the output processing circuit, the audio amplifier circuit is used to amplify the analog audio according to the level voltage and output it, and the digital-to-analog circuit is used to perform digital-to-analog conversion on the compensated digital audio according to the level voltage to obtain the analog audio.
10. The audio codec circuit according to claim 9, wherein: The audio codec circuit has a second input compensation value, which is an input comparison value of the digital signal and the received audio signal when the input voltage is the standard voltage. The input processing circuit compensates the processed digital audio with the second input compensation value and uses the compensated digital audio as the output of the input processing circuit.
