WO2018176654A1 - 增益调节方法、装置、音频编码器及音响设备 - Google Patents
增益调节方法、装置、音频编码器及音响设备 Download PDFInfo
- Publication number
- WO2018176654A1 WO2018176654A1 PCT/CN2017/089323 CN2017089323W WO2018176654A1 WO 2018176654 A1 WO2018176654 A1 WO 2018176654A1 CN 2017089323 W CN2017089323 W CN 2017089323W WO 2018176654 A1 WO2018176654 A1 WO 2018176654A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- clipping
- audio signal
- gain adjustment
- audio encoder
- module
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000005236 sound signal Effects 0.000 claims abstract description 105
- 238000001514 detection method Methods 0.000 claims abstract description 89
- 238000005070 sampling Methods 0.000 claims abstract description 87
- 230000003321 amplification Effects 0.000 claims description 45
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 45
- 238000010586 diagram Methods 0.000 description 22
- 238000006243 chemical reaction Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 5
- 238000007493 shaping process Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000001629 suppression Effects 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/30—Automatic control in amplifiers having semiconductor devices
- H03G3/3005—Automatic control in amplifiers having semiconductor devices in amplifiers suitable for low-frequencies, e.g. audio amplifiers
Definitions
- the present invention relates to the field of audio coding technology, and more particularly to a gain adjustment method for an audio encoder, a gain adjustment device for an audio encoder, an audio encoder, and an audio device .
- An audio encoder is a device that converts an analog audio signal into a digital audio signal.
- the audio encoder generally includes a signal shaping module, an amplification module, and an analog-to-digital conversion module that are sequentially connected, and the signal shaping module is configured to limit and filter the input analog audio signal, and the amplification module is configured as a signal shaping module.
- the output signal is amplified, and the analog-to-digital conversion module is arranged to perform analog-to-digital conversion processing on the signal output from the amplifier to obtain a digital audio signal.
- the existing audio encoder Since the amplification module of the existing audio encoder can only perform fixed gain adjustment, the existing audio encoder has the following defects: 1) The dynamic range of the analog audio signal output by the mobile handheld device such as a mobile phone is 0 to 1 Vrms, and the CD player Or the dynamic range of the analog audio signal output by the AV decoder is 0 ⁇ 2Vrms. If the gain of the amplifier is configured according to the latter, when the user uses the mobile handheld device such as a mobile phone as the analog input source, the maximum output power of the sound will be larger than the rated maximum. The power is 6dB, which can't fully play the performance of the sound.
- a gain adjuster for an audio encoder Law which includes:
- the amplification gain of the audio encoder is reduced.
- the method further includes:
- Detecting whether the audio source device is connected to the analog audio signal input interface of the audio encoder if yes, first setting the amplification gain of the audio encoder to be equal to a default value, and then starting to cut the digital audio signal output by the audio encoder Wave detection.
- the method further includes:
- the reducing the amplification gain of the audio encoder comprises:
- the amplification gain of the audio encoder is reduced by a set fixed step.
- the performing clipping detection on the digital audio signal output by the audio encoder includes:
- the sampling point is marked as being clipped.
- the calculating the number of sampling points where the digital audio signal is clipped comprises:
- the calculating the number of sampling points where the digital audio signal is clipped includes:
- the number of sample points where clipping occurs in each successive number of sets of the digital audio signal is calculated.
- a gain adjustment apparatus for an audio encoder comprising:
- a clipping detection module configured to perform clipping detection on a digital audio signal output by the audio encoder
- a gain adjustment module configured to reduce an amplification gain of the audio encoder if the number of sampling points is greater than a set value.
- the gain adjustment device further includes:
- connection detecting module configured to detect whether the audio source device is connected to the analog audio signal input interface of the audio encoder, and if yes, notify the gain adjustment module to set the amplification gain of the audio encoder to be equal to a default value, and then notify The clipping detection module performs the clipping detection.
- the gain adjustment device further includes a connection detection module and a disconnection detection module;
- connection detecting module is configured to detect whether an audio source device is connected to an analog audio signal input interface of the audio encoder, and if yes, notify the disconnection detecting module to detect whether the audio source device is disconnected from the analog audio
- the signal input interface is connected, and the clipping detection module is notified to perform the clipping detection.
- the disconnection detecting module is configured to set an amplification gain of the audio encoder to be equal to a default value according to a detection result that the audio source device disconnects the connection with the analog audio signal input interface.
- the clipping detection module includes:
- a reading unit for reading a value of a sampling point of the digital audio signal
- a marking unit configured to mark the sampling point to be clipped if the value is greater than or equal to a preset clipping signal reference value.
- the clip counting module is configured to calculate a number of sampling points of the continuously occurring clipping of the digital audio signal, wherein the continuously occurring clipping is set to be an adjacent sampling point where clipping occurs.
- the number of sampling points between the intervals is less than or equal to the preset value; or,
- the clip count module is configured to calculate a continuous number of each set number of the digital audio signal The number of sample points where clipping occurred in the sample point.
- a gain adjustment apparatus for an audio encoder comprising a memory and a processor, the memory for storing an instruction for controlling the processor to operate To implement the gain adjustment method according to the first aspect of the invention.
- an audio encoder comprising the gain adjustment device according to the second or third aspect of the invention.
- an audio apparatus comprising the audio encoder according to the fourth aspect of the invention.
- FIG. 2 is a schematic flow chart of a gain adjustment method according to another embodiment of the present invention.
- FIG. 4 is a flow chart showing a specific example of a gain adjustment method according to the present invention.
- FIG. 5 is a schematic block diagram of a gain adjustment apparatus according to an embodiment of the present invention.
- FIG. 7 is a schematic block diagram of a gain adjustment apparatus according to a third embodiment of the present invention.
- Figure 8 is a block schematic diagram showing a hardware configuration of a gain adjusting device according to the present invention.
- FIG. 9 is a schematic block diagram of an audio encoder in accordance with an embodiment of the present invention.
- FIG. 10 is a schematic block diagram of an audio device in accordance with an embodiment of the present invention.
- FIG. 1 is a flow chart showing a gain adjustment method for performing a gain adjustment according to an embodiment of the present invention.
- the step of performing gain adjustment by the gain adjustment method of the present invention includes:
- Step S110 performing clipping detection on the digital audio signal output by the audio encoder.
- the audio encoder comprises a signal shaping module, an amplification module and an analog to digital conversion module.
- the amplification module is a gain adjustable amplification module.
- the gain adjustable amplification module can include a programmable gain amplifier to support gain adjustment in accordance with the gain adjustment method of the present invention.
- the digital audio signal is the output of an analog to digital conversion module of the audio encoder.
- the performing clipping detection on the digital audio signal output by the audio encoder in the step S110 may further include:
- Step S111 reading the value of the sampling point of the digital audio signal.
- This step S111 may be to read the sample point value of the digital audio signal in chronological order.
- the digital audio signal output by the analog to digital conversion module can be stored in the signal buffer, and the value of the sampling point of the digital audio signal can be further read from the signal buffer of the analog to digital conversion module at step S111.
- the digital audio signal output by the analog to digital conversion module can be stored in the signal buffer on a first in, first out basis.
- the step S111 can further read the value of the sampling point of the digital audio signal from the signal buffer of the analog-to-digital conversion module according to the principle of first in first out.
- Clipping occurs because the audio encoder allows the input analog audio signal to typically have a dynamic range that is greater than the maximum convertible range of the analog-to-digital conversion module.
- the maximum convertible range of the analog-to-digital conversion module is 0-2.1Vrms, but the input analog audio signal can reach 5V as an example. If the analog audio signal input to the analog-to-digital conversion module reaches 2.1Vrms or more, the analog-to-digital conversion module
- the output digital audio signal in PCM format is usually 0dBFS. Therefore, the clipped signal reference value can be set equal to the output value of the analog to digital conversion module when receiving an analog audio signal that is greater than its maximum convertible range.
- Step S120 calculating the number of sampling points at which the digital audio signal is clipped based on the detection result of the clipping detection.
- the number of sampling points in which the clipping occurs in the step S120 can be cumulatively counted according to the detection result until the end of the first gain adjustment.
- the number of sampling points for calculating the clipping of the digital audio signal in the step S120 may further be: calculating the digital audio signal according to the detection result of the clipping detection. The number of sampling points where clipping occurs continuously.
- the continuous occurrence of clipping can be set to be such that the number of sampling points between adjacent sampling points where clipping occurs is less than or equal to a preset value.
- This preset value can be equal to zero. This means that after detecting that the nth sample point is clipped, only the (n+1)th sample point is clipped, and the cumulative number of sample points is counted. Otherwise, the next time the clip is detected. The sampling point is restarted after the sampling point.
- the preset value may also be greater than or equal to one. Taking the preset value as 10 as an example, this means that after detecting that the nth sample point is clipped, if the mth sample point is detected, it is also clipped, and the number of samples between m and n is less than or If it is equal to 10, the cumulative counting of the number of sampling points will be performed. Otherwise, the number of sampling points will be recalculated starting from the mth sampling point.
- the number of sampling points for calculating the clipping of the digital audio signal in the step S120 may further be: calculating the digital audio signal according to the detection result of the clipping detection. The number of sample points where clipping occurs in each consecutive number of sample points.
- each consecutive 100 sample points of the digital audio signal can be grouped into one group, and the number of sample points in the group where clipping occurs is cumulatively calculated.
- the number of sampling points at which clipping is generated can be calculated based on the flagged condition of the numerical value of the digital audio signal.
- the clip count value i can be set, and the initial value of the clip count value i at the start of the first gain adjustment is set to be equal to 0, in order to achieve the above-mentioned clipping, continuous clipping or each setting
- the calculation of the number of sampling points where clipping occurs in a continuous number of consecutive sampling points hereinafter collectively referred to as the number of sampling points indicating clipping).
- the clipping count value can be incremented by 1 every time a sampling point where clipping occurs is detected according to step S110, so that the clipping count value can reflect the number of sampling points where clipping occurs. It is also possible to further clear the clipping count value under the condition that the continuous occurrence of clipping is not satisfied, so that the clipping count value reflects the number of sampling points in which clipping is continuously performed. It is also possible to further clear the clipping count value each time a set number of sampling points are detected, so that the clipping count value reflects the number of sampling points in each successive number of consecutive sampling points.
- Step S130 determining whether the number of sampling points calculated in step S120 is greater than a set value, and if so, reducing the amplification gain of the audio encoder, completing one gain adjustment, and if not, returning to step S110 to continue the clipping detection.
- the set value can take into account the clipping suppression response time, the sampling rate of the analog-to-digital conversion module, the clipping range, and the recognition range of the human ear to the sound.
- the average human ear is sensitive to sounds of around 3 to 5 kHz.
- the 4KHz sine wave will be clipped above 0.9 times the peak value and the sampling rate is 48KHz.
- the number of sampling points corresponding to the clipped region is N1:
- N1 (Arcsin(1)-arcsin(0.9)) ⁇ 2/360° ⁇ (1/4K ⁇ 48KHz) ⁇ 2
- the clipping detection since high-frequency noise may exist on the signal line, in order to prevent the clipping detection from being erroneously triggered, it is possible to collect, for example, five sine waves to be clipped as the minimum value of the set value, that is, to set the value.
- the lower limit can be chosen to be 10.
- the average human ear is audible to the sound of 20 Hz to 20 kHz. Taking a 20 Hz sine wave clipped above 0.9 times the peak value and a sampling rate of 48 kHz as an example, the number of sampling points corresponding to the clipped region N2 is:
- N2 (Arcsin(1)-arcsin(0.9)) ⁇ 2/360° ⁇ (1/20 ⁇ 48KHz) ⁇ 400
- the sampling rate When the sampling rate is 48KHz, it takes about 8ms to generate 400 sampling points. In order to minimize the clipping suppression response time (proportional to the set value), you can select the number of sampling points required for clipping distortion to be 2ms.
- the upper limit of the value is determined, so the upper limit can be selected to be 100.
- the number of settings above can be slightly larger than the selected setting value. For example, it can overflow 10% with respect to the set value. For example, if the set value is 100, the number of settings may be 110.
- reducing the amplification gain of the audio encoder may further reduce the amplification gain of the audio encoder by a set fixed step.
- the fixed step size can be determined according to the gain adjustment range of the audio encoder, the dynamic range of the input analog audio signal, and the like.
- the fixed step distance can be set, for example, from 0.5 dB to 2 dB.
- the next gain adjustment may be performed according to the above steps S110 to S130.
- the above clipping count value will be cleared to start calculating the sampling point indicating clipping according to the continuation detection result (ie, the detection result of the next gain adjustment) when the next gain adjustment is performed. Quantity. Taking the gain adjustment at time t1 as an example, when the next gain adjustment is performed, the number of sampling points indicating clipping will be calculated based on the detection result of the digital audio signal at the time after t1, until the sampling point indicating clipping is performed. The number is greater than the setting The next gain adjustment is completed up to the value.
- FIG. 2 is a flow chart showing a gain adjustment method for performing a gain adjustment according to another embodiment of the present invention.
- FIG. 2 the embodiment shown in FIG. 2 is mainly related to the embodiment shown in FIG. 1, and the following steps are mainly added:
- Step S210 It is detected whether the audio source device is connected to the analog audio signal input interface of the audio encoder, and if yes, step S220 is performed, and if no, step S210 is continued.
- the analog audio signal input interface is an interface of the audio encoder for connecting to an audio source device, such as a mobile handset such as a mobile phone, a CD player, an AV decoder, and the like.
- an audio source device such as a mobile handset such as a mobile phone, a CD player, an AV decoder, and the like.
- the audio encoder may have an analog audio signal input interface or more than two (including two) analog audio signal input interfaces depending on the adapted audio source device type.
- the analog audio signal input interface has pins for the audio encoder to detect if an audio source device is connected.
- step S220 the amplification gain of the audio encoder is first set to be equal to the default value, and then the above steps S110 to S130 are performed.
- the gain adjustment method of the present invention performs the adjustment adjustment of the amplification gain when performing the gain adjustment, so that when the input analog audio signal has the characteristics of large dynamic range and fast transient change, A problem that causes a large increase in the distortion of the digital audio signal.
- the default value is the maximum value of the amplification gain of the audio encoder.
- This default value can be set equal to the upper limit of the amplification gain allowed by the audio encoder.
- the gain adjustment method of the present invention may further clear the clip count value after detecting that the audio source device is connected to the analog audio signal input interface and before performing step S110 above.
- a calculation is performed to calculate the number of sampling points indicating clipping based on the detection result of the upcoming clipping detection.
- FIG. 3 is a flow chart showing a gain adjustment method according to a third embodiment of the present invention.
- the embodiment shown in FIG. 3 is mainly related to the embodiment shown in FIG. 1, and the following steps are mainly added:
- Step S310 detecting whether the audio source device is connected to the analog audio signal input interface of the audio encoder, and if yes, performing step S320 and step S110 described above, and if not, continuing to execute Step S310.
- step S320 it is detected whether the audio source device disconnects the connection with the analog audio signal input interface. If yes, step S330 is performed, and if no, step S320 is continued.
- This step S320 may be performed in parallel with steps S110 to S130 shown in FIG. 1, or may be performed before or after any step.
- step S330 the amplification gain of the audio encoder is set to be equal to the default value.
- the gain adjustment method of the present invention can also clear the clipping count value after detecting that the audio source device is disconnected from the analog audio signal input interface, so as to achieve The detection result of the clipping detection performed by connecting the audio source device again calculates the number of sampling points indicating clipping.
- FIG. 4 is a flow chart showing a specific example of a gain adjustment method according to the present invention, which corresponds to the above detection result based on the above-described clipping detection, and calculates a cut in each successive number of sets of the digital audio signal.
- the gain adjustment method of the present invention may include two threads.
- the thread on the left side in FIG. 4 executes steps S411 to S420 in FIG. 4, and the thread on the right side performs steps S421 to S422 in FIG.
- step S412 the amplification gain of the audio encoder is set to be equal to the default value, and then step S413 is performed.
- Step S414 detecting whether the jth sampling point of the digital audio signal output by the audio encoder is clipped, if yes, executing step S415, and if not, executing step S419.
- step S415 it is determined whether j is less than or equal to the set number. If yes, step S416 is performed, and if no, step S420 is performed.
- step S417 it is determined whether the clip count value is greater than the set value. If yes, step S418 is performed, and if no, step S419 is performed.
- step S420 the sampling point count is re-started from the next sampling point.
- Step S421 detecting whether the audio source device disconnects the connection with the analog audio signal input interface, and if yes, executing step S422; if not, proceeding to step S421.
- FIG. 5 is a schematic block diagram of a gain adjustment apparatus in accordance with an embodiment of the present invention.
- the gain adjustment apparatus of the present invention includes a clipping detection module 510, a clipping counter module 520, and a gain adjustment module 530.
- the clipping detection module 510 is configured to perform clipping detection on the digital audio signal output by the audio encoder.
- the clipping detection module 510 can further include a reading unit and a marking unit (not shown).
- the reading unit is configured to read a value of a sampling point of the digital audio signal; the marking unit is configured to: when the value is greater than or equal to a preset clipping signal reference value, the marking is clipped at the sampling point .
- the clipping counting module 520 is configured to calculate the number of times of clipping of the digital audio signal by the detection result of the clipping detection by the clipping detecting module 510.
- the clipping counting module 520 can be further configured to calculate a number of times of clipping of the digital audio signal continuously occurring according to the detection result of the clipping detection by the clipping detecting module 510, where the continuous occurrence of clipping is set to be The number of sampling points between adjacent sampling points where clipping occurs is less than or equal to a preset value.
- the clipping counter module 520 can also be further configured to calculate each of the digital audio signals The number of sampling points where clipping occurs in a continuous number of consecutive sampling points.
- the clip count module 520 can represent the calculated number of sample points by setting a clip count value.
- the gain adjustment module 530 is configured to reduce the amplification gain of the audio encoder if the number of sample points calculated by the clipping counter module 520 is greater than a set value.
- the gain adjustment module 530 will notify the clipping counting module 520 to start calculating the number of sampling points indicating clipping according to the detection result of the clipping detection that the clipping detection module 510 continues.
- the gain adjustment module 530 will notify the clipping counter module 520 to clear the clipping count value after completing one gain adjustment.
- the gain adjustment module 530 can be specifically configured to reduce the amplification gain of the audio encoder by a set fixed step.
- FIG. 6 is a schematic block diagram of a gain adjustment apparatus according to another embodiment of the present invention.
- the gain adjustment device further includes a connection detecting module 610.
- connection detecting module 610 is configured to detect whether the audio source device is connected to the analog audio signal input interface of the audio encoder, and if yes, notify the above gain adjusting module 530 to set the amplification gain of the audio encoder to be equal to the default value, and then notify the clipping detection.
- Module 510 performs clipping detection.
- connection detecting module 610 is further configured to notify the clipping counting module 520 according to the clipping detection after detecting that the audio source device is connected to the analog audio signal input interface, and before informing the clipping detecting module 510 to perform clipping detection.
- the detection result of the clipping detection to be performed by the module 510 starts to calculate the number of sampling points indicating clipping.
- connection detecting module 610 can also be configured to notify the clipping detecting module 510 after detecting that the audio source device is connected to the analog audio signal input interface. Before the clipping detection is performed, the clipping count module 520 is notified to clear the clipping count value.
- FIG. 7 is a functional block diagram of a gain adjustment apparatus in accordance with a third embodiment of the present invention.
- the adjustment device also includes a connection detection module 710 and a disconnection detection module 720.
- connection detecting module 710 is configured to detect whether the audio source device is connected to the analog audio signal input interface of the audio encoder, and if so, notify the disconnection detecting module 710 whether the audio source device disconnects from the analog audio signal input interface. .
- the disconnection detecting module 720 is configured to set an amplification gain of the audio encoder to be equal to a default value according to a detection result that the audio source device disconnects the connection with the analog audio signal input interface.
- the disconnection detecting module 720 is further configured to notify the clipping counting module 520 to perform clipping according to the clipping detecting module 510 according to the detection result that the audio source device disconnects the connection with the analog audio signal input interface.
- the detected test results begin to calculate the number of sample points that represent clipping.
- the disconnection detection module 720 can also be configured to notify according to the detection result that the audio source device disconnects the connection with the analog audio signal input interface. Clip count module 520 clears the clipping count value.
- FIG. 8 is a functional block diagram of a hardware configuration of a gain adjustment apparatus according to an embodiment of the present invention.
- the gain adjustment apparatus of the present invention can include at least one memory 810 and at least one processor 820 for storing instructions for controlling the processor 820 to operate to perform gain adjustment in accordance with the present invention. Device.
- the memory 810 can include high speed random access memory and can also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
- FIG. 9 is a functional block diagram of an audio encoder in accordance with an embodiment of the present invention.
- the audio encoder includes a gain-adjustable amplification module 920 and any of the above-described gain adjustment devices 940 in addition to the signal shaping module 910 and the analog-to-digital conversion module 930.
- the gain adjustment device 940 performs a reduction adjustment of the amplification gain of the amplification module 920 by performing clipping detection on the digital audio signal output from the analog-to-digital conversion module 930.
- the gain adjustable amplification module can include a programmable gain amplifier to support adaptive gain adjustment by gain adjustment device 940.
- the audio encoder can also include at least one analog audio signal input interface.
- FIG. 10 is a schematic block diagram of an audio device in accordance with an embodiment of the present invention.
- the audio device includes the audio encoder 1010 of FIG. 9, and further includes a power amplifier 1020 and a speaker 1030.
- the digital audio signal output by the audio encoder 1010 is output to a power amplifier 1020 (digital power amplifier) to drive the speaker 1030 to sound through the power amplifier 1020.
- a power amplifier 1020 digital power amplifier
- the invention can be an apparatus, method and/or computer program product.
- the computer program product can comprise a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement various aspects of the present invention.
- the computer readable storage medium can be a tangible device that can hold and store the instructions used by the instruction execution device.
- the computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, for example, with instructions stored thereon A raised structure in the hole card or groove, and any suitable combination of the above.
- a computer readable storage medium is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (eg, a light pulse through a fiber optic cable), or an electrical transmission through a wire signal.
- the computer readable program instructions described herein can be downloaded from a computer readable storage medium to various computing/processing devices or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
- the network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers.
- a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in each computing/processing device .
- Computer program instructions for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
- the computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or server. carried out.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computer (eg, using an Internet service provider to access the Internet) connection).
- the customized electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by utilizing state information of computer readable program instructions.
- Computer readable program instructions are executed to implement various aspects of the present invention.
- These computer readable program instructions can be provided to a general purpose computer, a special purpose computer or the like Programmable processor of the data processing apparatus to produce a machine that, when executed by a processor of a computer or other programmable data processing apparatus, produces one or more of an implementation flow diagram and/or block diagram The function/action device specified in the box.
- the computer readable program instructions can also be stored in a computer readable storage medium that causes the computer, programmable data processing device, and/or other device to operate in a particular manner, such that the computer readable medium storing the instructions includes An article of manufacture that includes instructions for implementing various aspects of the functions/acts recited in one or more of the flowcharts.
- the computer readable program instructions can also be loaded onto a computer, other programmable data processing device, or other device to perform a series of operational steps on a computer, other programmable data processing device or other device to produce a computer-implemented process.
- instructions executed on a computer, other programmable data processing apparatus, or other device implement the functions/acts recited in one or more of the flowcharts and/or block diagrams.
- each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Control Of Amplification And Gain Control (AREA)
Abstract
本发明公开了一种增益调节方法、装置、音频编码器及音响设备,该方法包括:对所述音频编码器输出的数字音频信号进行削波检测;根据所述削波检测的检测结果,计算所述数字音频信号的发生削波的采样点数量;如果所述采样点数量大于设定数值,则减小所述音频编码器的放大增益。
Description
本发明涉及音频编码技术领域,更具体地,本发明涉及一种用于音频编码器的增益调节方法、一种用于音频编码器的增益调节装置、一种音频编码器、及一种音响设备。
音频编码器是将模拟音频信号转换为数字音频信号的装置。音频编码器通常包括顺次连接的信号整形模块、放大模块和模数转换模块,该信号整形模块被设置为对输入的模拟音频信号进行限幅和滤波,该放大模块被设置为对信号整形模块输出的信号进行放大处理,该模数转换模块被设置为对放大器输出的信号进行模数转换处理,以得到数字音频信号。
由于现有音频编码器的放大模块只能进行固定增益调节,因此,现有音频编码器存在如下缺陷:1)手机等移动手持设备输出的模拟音频信号的动态范围是0~1Vrms,而CD机或AV解码器输出的模拟音频信号的动态范围是0~2Vrms,如果按照后者配置放大器的增益,则在用户以手机等移动手持设备作为模拟输入源时,音响的最大输出功率将比额定最大功率小6dB,不能完全发挥音响的性能。
因此,非常有必要提供一种对音频编码器的放大增益进行自适应调节的技术方案。
发明内容
本发明的一个目的是提供一种对音频编码器的增益进行自适应调节的技术方案。
根据本发明的第一方面,提供了一种用于音频编码器的增益调节方
法,其包括:
对所述音频编码器输出的数字音频信号进行削波检测;
根据所述削波检测的检测结果,计算所述数字音频信号的发生削波的采样点数量;
如果所述采样点数量大于设定数值,则减小所述音频编码器的放大增益。
可选的是,所述方法还包括:
检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,先设置所述音频编码器的放大增益等于默认值,再开始对所述音频编码器输出的数字音频信号进行削波检测。
可选的是,所述方法还包括:
检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是:
再开始对所述音频编码器输出的数字音频信号进行削波检测;以及,
检测所述音频源设备是否断开与所述模拟音频信号输入接口的连接,如是,则设置所述音频编码器的放大增益等于默认值。
可选的是,所述减小所述音频编码器的放大增益包括:
以设定的固定步距减小所述音频编码器的放大增益。
可选的是,所述对所述音频编码器输出的数字音频信号进行削波检测包括:
读取数字音频信号的采样点的数值;
如果所述数值大于或者等于预设的削波信号参考值,则标记所述采样点被削波。
可选的是,所述计算所述数字音频信号的发生削波的采样点数量包括:
计算所述数字音频信号的连续发生削波的采样点数量,其中,所述连续发生削波被设置为是发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值;或者,
所述计算所述数字音频信号的发生削波的采样点数量包括:
计算所述数字音频信号的每设定个数的连续采样点中发生削波的采样点数量。
根据本发明的第二方面,提供了一种用于音频编码器的增益调节装置,其包括:
削波检测模块,用于对所述音频编码器输出的数字音频信号进行削波检测;
削波计数模块,用于根据所述削波检测的检测结果,计算所述数字音频信号的发生削波的采样点数量;以及,
增益调节模块,用于在所述采样点数量大于设定数值的情况下,减小所述音频编码器的放大增益。
可选的是,所述增益调节装置还包括:
连接检测模块,用于检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,则先通知所述增益调节模块设置所述音频编码器的放大增益等于默认值,再通知所述削波检测模块进行所述削波检测。
可选的是,所述增益调节装置还包括连接检测模块和断开检测模块;
所述连接检测模块用于检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,则通知所述断开检测模块检测所述音频源设备是否断开与所述模拟音频信号输入接口的连接、及通知所述削波检测模块进行所述削波检测。
所述断开检测模块用于根据所述音频源设备断开与所述模拟音频信号输入接口的连接的检测结果,设置音频编码器的放大增益等于默认值。
可选的是,所述削波检测模块包括:
读取单元,用于读取数字音频信号的采样点的数值;以及,
标记单元,用于在所述数值大于或者等于预设的削波信号参考值的情况下,标记所述采样点被削波。
可选的是,所述削波计数模块用于计算所述数字音频信号的连续发生削波的采样点数量,其中,所述连续发生削波被设置为是发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值;或者,
所述削波计数模块用于计算所述数字音频信号的每设定个数的连续
采样点中发生削波的采样点数量。
根据本发明的第三方面,还提供了一种用于音频编码器的增益调节装置,其包括存储器和处理器,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据发明的第一方面所述的增益调节方法。
根据本发明的第四方面,还提供了一种音频编码器,其包括根据本发明的第二方面或者第三方面所述的增益调节装置。
根据本发明的第五方面,还提供了一种音响设备,其包括根据本发明的第四方面所述的音频编码器。
本发明的一个有益效果在于,本发明的用于音频编码器的增益调节方法、装置根据对转换得到的数字音频信号进行削波检测的检测结果自适应地减小音频编码器的放大增益,以在模数转换模块支持的最大转换范围内提供最高的放大增益,进而尽可能地提高音响设备的最大输出功率,实现音响性能的有效发挥。
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其它特征及其优点将会变得清楚。
被结合在说明书中并构成说明书的一部分的附图示出了本发明的实施例,并且连同其说明一起用于解释本发明的原理。
图1为根据本发明实施例的增益调节方法的流程示意图;
图2为根据本发明另一实施例的增益调节方法的流程示意图;
图3为根据本发明第三实施例的增益调节方法的流程示意图;
图4为根据本发明增益调节方法的一个具体例子的流程示意图;
图5为根据本发明实施例的增益调节装置的原理框图;
图6为根据本发明另一实施例的增益调节装置的原理框图;
图7为根据本发明第三实施例的增益调节装置的原理框图;
图8为根据本发明的增益调节装置的一种硬件结构的方框原理图;
图9为根据本发明实施例的音频编码器的原理框图;
图10为根据本发明实施例的音响设备的原理框图。
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
<方法>
图1是根据本发明实施例的增益调节方法进行一次增益调节的流程示意图。
根据图1所示,本发明增益调节方法进行一次增益调节的步骤包括:
步骤S110,对音频编码器输出的数字音频信号进行削波检测。
音频编码器包括信号整形模块、放大模块和模数转换模块,根据本发明增益调节方法,该放大模块为增益可调节的放大模块。
该增益可调节的放大模块可以包括可编程增益放大器,以支持根据本发明增益调节方法进行增益调节。
该数字音频信号为音频编码器的模数转换模块的输出。
该步骤S110中对音频编码器输出的数字音频信号进行削波检测可以进一步包括:
步骤S111,读取数字音频信号的采样点的数值。
该步骤S111可以为按照时间顺序读取数字音频信号的采样点数值。
该模数转换模块输出的数字音频信号可以存储在信号缓冲器中,在该步骤S111可以进一步为从模数转换模块的信号缓冲器中读取数字音频信号的采样点的数值。
该模数转换模块输出的数字音频信号可以按照先进先出的原则存储在信号缓冲器中。
该步骤S111可以进一步为按照先进先出的原则从模数转换模块的信号缓冲器中读取数字音频信号的采样点的数值。
步骤S112,判断读取的数值是否大于或者等于预设的削波信号参考值,如是,则标记在该采样点被削波,如否,则确定在该采样点未被削波。
由于音频编码器允许输入的模拟音频信号的动态范围通常大于模数转换模块的最大可转换范围,因此便会产生削波。以模数转换模块的最大可转换范围是0-2.1Vrms,但允许输入的模拟音频信号可达到5V为例,如果输入至模数转换模块的模拟音频信号达到2.1Vrms以上,则模数转换模块输出的PCM格式的数字音频信号通常为0dBFS。因此,该削波信号参考值可以被设置为等于模数转换模块在接收到大于自身的最大可转换范围的模拟音频信号时的输出值。
步骤S120,根据上述削波检测的检测结果,计算数字音频信号的发生削波的采样点数量。
在进行一次增益调节的过程中,该步骤S120中发生削波的采样点数量可以根据检测结果进行累计计数,直至一次增益调节结束。
为了提高根据削波检测结果进行增益调节的准确性,该步骤S120中计算数字音频信号的发生削波的采样点数量可以进一步为:根据上述削波检测的检测结果,计算所述数字音频信号的连续发生削波的采样点数量。
该连续发生削波可以被设置为是:发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值。
该预设值可以等于0。这说明,在检测到第n个采样点被削波后,只有第(n+1)个采样点也被削波,才进行采样点数量的累计计数,否则,将在下一次检测到被削波的采样点后重新开始计数。
为了提高削波检测计算的容错性,该预设值也可以大于或者等于1。以预设值为10为例,这说明,在检测到第n个采样点被削波后,如果检测到第m个采样点也被削波,且m与n之间间隔的采样数量小于或者等于10,则进行采样点数量的累计计数,否则,将以第m个采样点开始重新计算采样点数量。
为了提高根据削波检测结果进行增益调节的准确性,该步骤S120中计算数字音频信号的发生削波的采样点数量也可以进一步为:根据上述削波检测的检测结果,计算所述数字音频信号的每设定个数的连续采样点中发生削波的采样点数量。
以设定个数为100个为例,可将数字音频信号的每连续100个采样点划为一组,并累计计算该组中发生削波的采样点数量。
根据上述步骤S112,在该步骤S120中,可以根据对数字音频信号的数值的标记情况计算发生削波的采样点数量。
在该步骤S120中,可以设置削波计数值i,该削波计数值i在开始一次增益调节时的初始值被设置为等于0,以实现对以上发生削波、连续发生削波或者每设定个数的连续采样点中发生削波的采样点数量(以下统称为表示削波的采样点数量)的计算。
开始一次增益调节后,可以根据步骤S110每检测到一个发生削波的采样点就触发削波计数值加1,这样,削波计数值便能反映发生削波的采样点数量。也可以进一步在不满足连续发生削波的条件下,对削波计数值清零,以使削波计数值反映连续发生削波的采样点数量。也可以进一步在每次检测到设定个数的采样点时,对削波计数值清零,以使削波计数值反映每设定个数的连续采样点中发生削波的采样点数量。步骤S130,判断步骤S120计算得到的采样点数量是否大于设定数值,如是,则减小音频编码器的放大增益,完成一次增益调节,如否,则回到步骤S110继续进行削波检测。
该设定数值可以考虑削波抑制响应时间、模数转换模块的采样率、削波范围、及人耳对声音的辨识范围等设置。
以下非限制性地提供一种选择设定数值的例子。
设定数值的下限值:一般人耳对3~5KHz左右的声音较敏感。以4KHz正弦波在0.9倍峰值以上都将被削波、及采样率为48KHz为例,被削波区域对应的采样点数N1为:
N1=(Arcsin(1)-arcsin(0.9))×2/360°×(1/4K×48KHz)≈2
在此,由于信号线上可能存在高频噪声,为了避免削波检测被误触发,因此,可以以采集到例如是5个正弦波被削波作为设定数值的最小值,即设定数值的下限值可以选择为10。
设定数值的上限值:一般人耳对20Hz~20KHz的声音是可闻的。以20Hz正弦波在0.9倍峰值以上都被削波、及采样率为48KHz为例,被削波区域对应的采样点数N2为:
N2=(Arcsin(1)-arcsin(0.9))×2/360°×(1/20×48KHz)≈400
在采样率为48KHz的情况下,生成400个采样点大约耗时8ms,为了尽量缩减削波抑制响应时间(与设定数值成正比),可以选择削波失真产生2ms所需的采样点数作为设定数值的上限值,因此,该上限值可以选择为100。以上设定个数可以略大于选择的设定数值,例如,可以相对设定数值溢出10%。以设定数值为100为例,该设定个数可以为110。
在该步骤S130中,减小音频编码器的放大增益可以进一步为以设定的固定步距减小音频编码器的放大增益。
该固定步距可以根据音频编码器的增益调节范围、输入的模拟音频信号的动态范围等确定。
在增益调节范围是-12dB~+12dB的实施例中,该固定步距例如可以设置为是0.5dB~2dB。
在根据步骤S130完成一次增益调节后,可以根据以上步骤S110至步骤S130进行下一次增益调节。
在开始下一次增益调节时,以上削波计数值将被清零,以在进行下一次增益调节时根据继续进行的检测结果(即下一次增益调节的检测结果)开始计算表示削波的采样点数量。以t1时刻完成一次增益调节为例,在进行下一次增益调节时,将根据对数字音频信号在t1时刻后的数值的检测结果开始计算表示削波的采样点数量,直至表示削波的采样点数量大于设定
数值为止,完成下一次增益调节。
图2是根据本发明另一实施例的增益调节方法进行一次增益调节的流程示意图。
根据图2所示,图2所示实施例相对图1所示实施例,主要增加了如下步骤:
步骤S210,检测音频源设备是否连接至音频编码器的模拟音频信号输入接口,如是,则执行步骤S220,如否,则继续执行步骤S210。
模拟音频信号输入接口是音频编码器用于连接音频源设备的接口,该音频源设备例如包括手机等移动手持设备、CD机、AV解码器等。
音频编码器可以根据适配的音频源设备类型具有一个模拟音频信号输入接口或者两个以上(包括两个)模拟音频信号输入接口。
模拟音频信号输入接口具有供音频编码器检测是否有音频源设备连接的针脚。
步骤S220,先设置音频编码器的放大增益等于默认值,再执行以上步骤S110至步骤S130。
根据上述步骤S110至步骤S130可知,本发明增益调节方法在进行增益调节时是进行放大增益的减小调节,以在输入的模拟音频信号具有动态范围大、瞬态变化快的特点时,不会引起数字音频信号的失真度大幅度提高的问题。这说明,该默认值是音频编码器的放大增益的最大值。
该默认值可以被设置为等于音频编码器所允许的放大增益上限值。
在结合设置削波计数值的实施例中,本发明增益调节方法还可以在检测到音频源设备连接至模拟音频信号输入接口后、及执行以上步骤S110之前,将削波计数值清零,以实现根据即将进行的削波检测的检测结果计算表示削波的采样点数量。
图3是根据本发明第三实施例的增益调节方法的流程示意图。
根据图3所示,图3所示实施例相对图1所示实施例,主要增加了如下步骤:
步骤S310,检测音频源设备是否连接至音频编码器的模拟音频信号输入接口,如是,则执行步骤S320和上述步骤S110,如否,则继续执行
步骤S310。
步骤S320,检测该音频源设备是否断开与该模拟音频信号输入接口的连接,如是,则执行步骤S330,如否,则继续执行步骤S320。
该步骤S320可以与图1所示步骤S110至步骤S130并行执行,也可以在任一步骤之前或者之后进行。
步骤S330,设置音频编码器的放大增益等于默认值。
在结合设置削波计数值的实施例中,本发明增益调节方法还可以在检测到音频源设备断开与模拟音频信号输入接口的连接后,将削波计数值清零,以实现根据以后(再次连接音频源设备)进行的削波检测的检测结果计算表示削波的采样点数量。
<例子>
图4是根据本发明增益调节方法的一个具体例子的流程示意图,该例子对应以上的根据上述削波检测的检测结果,计算所述数字音频信号的每设定个数的连续采样点中发生削波的采样点数量的实施例。
根据图4所示,本发明增益调节方法可以包括两个线程。
图4中左侧的线程执行图4中的步骤S411至步骤S420,右侧的线程执行图4中的步骤S421至步骤S422。
步骤S411,检测音频源设备是否连接至音频编码器的模拟音频信号输入接口,如是,则执行步骤S412和步骤S421,如否,则继续执行步骤S411。
步骤S412,设置音频编码器的放大增益等于默认值,之后执行步骤S413。
步骤S413,设置削波计数值i=0,采样点计数值j=1,之后执行步骤S414。
步骤S414,检测音频编码器输出的数字音频信号的第j个采样点是否被削波,如是,则执行步骤S415,如否,则执行步骤S419。
步骤S415,判断j是否小于或者等于设定个数,如是,则执行步骤S416,如否,则执行步骤S420。
步骤S416,设置削波计数值i=i+1,之后执行步骤S417。
步骤S417,判断削波计数值是否大于设定数值,如是,则执行步骤S418,如否,则执行步骤S419。
步骤S418,减小所述音频编码器的放大增益,之后回到步骤S413。
步骤S419,设置j=j+1,之后执行步骤S414。
步骤S420,设置j=1,之后执行步骤S414。
通过步骤S420,从下一采样点开始重新进行采样点计数。
步骤S421,检测该音频源设备是否断开与该模拟音频信号输入接口的连接,如是,则执行步骤S422,如否,则继续执行步骤S421。
步骤S422,设置音频编码器的放大增益等于默认值、及设置削波计数值i=0。
<设备>
图5是根据本发明实施例的增益调节装置的原理框图。
根据图5所示,本发明增益调节装置包括削波检测模块510、削波计数模块520和增益调节模块530。
该削波检测模块510用于对音频编码器输出的数字音频信号进行削波检测。
该削波检测模块510可以进一步包括读取单元和标记单元(图中未示出)。该读取单元用于读取数字音频信号的采样点的数值;该标记单元用于在所述数值大于或者等于预设的削波信号参考值的情况下,标记在所述采样点被削波。
该削波计数模块520用于根据削波检测模块510进行削波检测的检测结果,计算数字音频信号发生削波的削波次数。
该削波计数模块520可以进一步用于根据削波检测模块510进行削波检测的检测结果,计算数字音频信号连续发生削波的削波次数,其中,此处的连续发生削波被设置为是发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值。
该削波计数模块520也可以进一步用于计算所述数字音频信号的每设
定个数的连续采样点中发生削波的采样点数量。
该削波计数模块520可以通过设置削波计数值表示计算得到的采样点数量。
该增益调节模块530用于在削波计数模块520计算得到的采样点数量大于设定数值的情况下,减小音频编码器的放大增益。
增益调节模块530在完成一次增益调节后,将通知削波计数模块520根据削波检测模块510继续进行的削波检测的检测结果开始计算表示削波的采样点数量。
进一步地,对于削波计数模块520设置削波计数值的实施例,该增益调节模块530在完成一次增益调节后,将通知削波计数模块520将削波计数值清零。
该增益调节模块530可以具体用于以设定的固定步距减小音频编码器的放大增益。
图6是根据本发明另一实施例的增益调节装置的原理框图。
根据图6所示,该实施例与图5所示实施例的主要区别在于,该增益调节装置还包括连接检测模块610。
该连接检测模块610用于检测音频源设备是否连接至音频编码器的模拟音频信号输入接口,如是,则先通知以上增益调节模块530设置音频编码器的放大增益等于默认值,再通知削波检测模块510进行削波检测。
进一步地,该连接检测模块610还可以用于在检测到音频源设备连接至模拟音频信号输入接口之后、及通知削波检测模块510进行削波检测之前,通知削波计数模块520根据削波检测模块510即将进行的削波检测的检测结果开始计算表示削波的采样点数量。
更进一步地,对于削波计数模块520设置削波计数值的实施例,该连接检测模块610还可以用于在检测到音频源设备连接至模拟音频信号输入接口之后、及通知削波检测模块510进行削波检测之前,通知削波计数模块520将削波计数值清零。
图7是根据本发明第三实施例的增益调节装置的原理框图。
根据图7所示,该实施例与图5所示实施例的主要区别在于,该增益
调节装置还包括连接检测模块710和断开检测模块720。
该连接检测模块710用于检测音频源设备是否连接至音频编码器的模拟音频信号输入接口,如是,则通知断开检测模块710检测该音频源设备是否断开与该模拟音频信号输入接口的连接。
该断开检测模块720用于根据该音频源设备断开与该模拟音频信号输入接口间连接的检测结果,设置音频编码器的放大增益等于默认值。
进一步地,该断开检测模块720还可以用于根据该音频源设备断开与该模拟音频信号输入接口间连接的检测结果,通知削波计数模块520根据削波检测模块510之后进行的削波检测的检测结果开始计算表示削波的采样点数量。
更进一步地,对于削波计数模块520设置削波计数值的实施例,该断开检测模块720还可以用于根据该音频源设备断开与该模拟音频信号输入接口间连接的检测结果,通知削波计数模块520将削波计数值清零。
<硬件配置>
图8是根据本发明实施例的增益调节装置的一种硬件结构的原理框图。
根据图8所示,本发明增益调节装置可以包括至少一个存储器810和至少一个处理器820,该存储器810用于存储指令,该指令用于控制处理器820进行操作以执行根据本发明的增益调节装置。
该存储器810可以包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。
<音频编码器>
图9为根据本发明实施例的音频编码器的原理框图。
根据图9所示,该音频编码器除信号整形模块910和模数转换模块930之外,还包括增益可调节的放大模块920及上述任一种增益调节装置940。
该增益调节装置940通过对模数转换模块930输出的数字音频信号进行削波检测对放大模块920进行放大增益的减小调节。
该增益可调节的放大模块可以包括可编程增益放大器,以支持通过增益调节装置940进行自适应的增益调节。
该音频编码器还可以包括至少一个模拟音频信号输入接口。
<音响设备>
图10为根据本发明实施例的音响设备的原理框图。
根据图10所示,该音响设备包括图9中的音频编码器1010,还包括功率放大器1020、扬声器1030。
该音频编码器1010输出的数字音频信号输出至功率放大器1020(数字功放),以通过功率放大器1020驱动扬声器1030发声。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分相互参见即可,每个实施例重点说明的都是与其他实施例的不同之处,但本领域技术人员应当清楚的是,上述各实施例可以根据需要单独使用或者相互结合使用。另外,对于装置实施例而言,由于其是与方法实施例相对应,所以描述得比较简单,相关之处参见方法实施例的对应部分的说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的。
本发明可以是装置、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本发明的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计
算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本发明操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。
这里参照根据本发明实施例的方法、装置和计算机程序产品的流程图和/或框图描述了本发明的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它
可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露
的各实施例。本发明的范围由所附权利要求来限定。
Claims (14)
- 一种用于音频编码器的增益调节方法,其特征在于,包括:对所述音频编码器输出的数字音频信号进行削波检测;根据所述削波检测的检测结果,计算所述数字音频信号的发生削波的采样点数量;如果所述采样点数量大于设定数值,则减小所述音频编码器的放大增益。
- 根据权利要求1所述的增益调节方法,其特征在于,所述方法还包括:检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,先设置所述音频编码器的放大增益等于默认值,再开始对所述音频编码器输出的数字音频信号进行削波检测。
- 根据权利要求1或2所述的增益调节方法,其特征在于,所述方法还包括:检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是:再开始对所述音频编码器输出的数字音频信号进行削波检测;以及,检测所述音频源设备是否断开与所述模拟音频信号输入接口的连接,如是,则设置所述音频编码器的放大增益等于默认值。
- 根据权利要求1至3中任一项所述的增益调节方法,其特征在于,所述减小所述音频编码器的放大增益包括:以设定的固定步距减小所述音频编码器的放大增益。
- 根据权利要求1至4中任一项所述的增益调节方法,其特征在于,所述对所述音频编码器输出的数字音频信号进行削波检测包括:读取数字音频信号的采样点的数值;如果所述数值大于或者等于预设的削波信号参考值,则标记所述采样点被削波。
- 根据权利要求1至5中任一项所述的增益调节方法,其特征在于,所述计算所述数字音频信号的发生削波的采样点数量包括:计算所述数字音频信号的连续发生削波的采样点数量,其中,所述连续发生削波被设置为是发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值;或者,所述计算所述数字音频信号的发生削波的采样点数量包括:计算所述数字音频信号的每设定个数的连续采样点中发生削波的采样点数量。
- 一种用于音频编码器的增益调节装置,其特征在于,包括:削波检测模块,用于对所述音频编码器输出的数字音频信号进行削波检测;削波计数模块,用于根据所述削波检测的检测结果,计算所述数字音频信号的发生削波的采样点数量;以及,增益调节模块,用于在所述采样点数量大于设定数值的情况下,减小所述音频编码器的放大增益。
- 根据权利要求7所述的增益调节装置,其特征在于,所述增益调节装置还包括:连接检测模块,用于检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,则先通知所述增益调节模块设置所述音频编码器的放大增益等于默认值,再通知所述削波检测模块进行所述削波检测。
- 根据权利要求7或8所述的增益调节装置,其特征在于,所述增益调节装置还包括连接检测模块和断开检测模块;所述连接检测模块用于检测音频源设备是否连接至所述音频编码器的模拟音频信号输入接口,如是,则通知所述断开检测模块检测所述音频源设备是否断开与所述模拟音频信号输入接口的连接、及通知所述削波检测模块进行所述削波检测。所述断开检测模块用于根据所述音频源设备断开与所述模拟音频信号输入接口的连接的检测结果,设置音频编码器的放大增益等于默认值。
- 根据权利要求7至9中任一项所述的增益调节装置,其特征在于,所述削波检测模块包括:读取单元,用于读取数字音频信号的采样点的数值;以及,标记单元,用于在所述数值大于或者等于预设的削波信号参考值的情况下,标记所述采样点被削波。
- 根据权利要求7至10中任一项所述的增益调节装置,其特征在于,所述削波计数模块用于计算所述数字音频信号的连续发生削波的采样点数量,其中,所述连续发生削波被设置为是发生削波的相邻采样点之间间隔的采样点数量小于或者等于预设值;或者,所述削波计数模块用于计算所述数字音频信号的每设定个数的连续采样点中发生削波的采样点数量。
- 一种用于音频编码器的增益调节装置,其特征在于,包括存储器和处理器,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据权利要求1至6中任一项所述的增益调节方法。
- 一种音频编码器,其特征在于,包括权利要求7至12中任一项所述的增益调节装置。
- 一种音响设备,其特征在于,包括权利要求13所述的音频编码器。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710203955.0A CN107104650A (zh) | 2017-03-30 | 2017-03-30 | 增益调节方法、装置、音频编码器及音响设备 |
CN201710203955.0 | 2017-03-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018176654A1 true WO2018176654A1 (zh) | 2018-10-04 |
Family
ID=59674874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/089323 WO2018176654A1 (zh) | 2017-03-30 | 2017-06-21 | 增益调节方法、装置、音频编码器及音响设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107104650A (zh) |
WO (1) | WO2018176654A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7109177B2 (ja) * | 2017-11-02 | 2022-07-29 | ローム株式会社 | オーディオ回路、それを用いた車載用オーディオ装置、オーディオコンポーネント装置、電子機器 |
CN109963235B (zh) * | 2019-03-15 | 2021-12-28 | 维沃移动通信有限公司 | 一种声音信号处理方法及移动终端 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1953333A (zh) * | 2006-11-14 | 2007-04-25 | 北京中星微电子有限公司 | 一种信号处理方法及装置 |
CN101459416A (zh) * | 2008-12-29 | 2009-06-17 | 深圳华为通信技术有限公司 | 一种终端音频增益控制的装置及方法 |
US7576672B2 (en) * | 2007-07-18 | 2009-08-18 | Qualcomm Incorporated | Adaptive Dynamic Range Control |
CN106504765A (zh) * | 2016-10-20 | 2017-03-15 | 广州视源电子科技股份有限公司 | 一种音频信号的自动增益控制方法和装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1770855B1 (en) * | 2005-09-28 | 2011-08-17 | Yamaha Corporation | Class D amplifier |
CN101789766A (zh) * | 2009-01-23 | 2010-07-28 | 瑞昱半导体股份有限公司 | 增益调节装置与方法 |
CN103326677B (zh) * | 2012-03-22 | 2016-05-04 | 炬芯(珠海)科技有限公司 | 音频功率放大器及音频功率放大器的调节方法 |
CN106505960A (zh) * | 2016-10-20 | 2017-03-15 | 广州视源电子科技股份有限公司 | 一种音频信号的自动增益控制方法和装置 |
-
2017
- 2017-03-30 CN CN201710203955.0A patent/CN107104650A/zh active Pending
- 2017-06-21 WO PCT/CN2017/089323 patent/WO2018176654A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1953333A (zh) * | 2006-11-14 | 2007-04-25 | 北京中星微电子有限公司 | 一种信号处理方法及装置 |
US7576672B2 (en) * | 2007-07-18 | 2009-08-18 | Qualcomm Incorporated | Adaptive Dynamic Range Control |
CN101459416A (zh) * | 2008-12-29 | 2009-06-17 | 深圳华为通信技术有限公司 | 一种终端音频增益控制的装置及方法 |
CN106504765A (zh) * | 2016-10-20 | 2017-03-15 | 广州视源电子科技股份有限公司 | 一种音频信号的自动增益控制方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN107104650A (zh) | 2017-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10566008B2 (en) | Method and apparatus for acoustic echo suppression | |
CN101924525B (zh) | 高性能音频放大电路 | |
WO2016180100A1 (zh) | 一种音频处理的性能提升方法及装置 | |
KR102390784B1 (ko) | 활성화 음성 검측 방법 및 장치 | |
WO2010035760A1 (ja) | ループゲイン推定装置およびハウリング防止装置 | |
US20140142947A1 (en) | Sound Rate Modification | |
JP2008083375A (ja) | 音声区間検出装置およびプログラム | |
CN104244162B (zh) | 一种扬声器的杂音检测方法及装置 | |
CN109102819A (zh) | 一种啸叫检测方法及装置 | |
WO2018176654A1 (zh) | 增益调节方法、装置、音频编码器及音响设备 | |
JP2015222847A (ja) | 音声処理装置、音声処理方法および音声処理プログラム | |
WO2020237954A1 (zh) | 声音信号处理方法、装置及设备 | |
JP2011150060A (ja) | 録音装置 | |
JP2018194599A (ja) | 雑音抑圧装置、雑音抑圧方法及びプログラム | |
WO2018157503A1 (zh) | 用于耳机的音量调节方法、装置及耳机 | |
US20210158797A1 (en) | Detection of live speech | |
CN114827865A (zh) | 音频设备的频响曲线检测方法、装置、设备及存储介质 | |
JP6526602B2 (ja) | 音声認識装置、その方法、及びプログラム | |
JP6544439B2 (ja) | 困惑状態判定装置、困惑状態判定方法、及びプログラム | |
CN114678038A (zh) | 音频噪声检测方法、计算机设备和计算机程序产品 | |
US20210132896A1 (en) | Learned silencing of headphones for improved awareness | |
EP3206204A1 (en) | System for processing audio | |
US12190902B1 (en) | Adaptive multi-stage output gain | |
US9763006B2 (en) | Noise reduction in a microphone using vowel detection | |
US20190116419A1 (en) | Methods and apparatus for transducer excursion prediction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17904120 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17904120 Country of ref document: EP Kind code of ref document: A1 |