CN111935572B - Audio signal adjusting circuit, method, electronic equipment and storage medium - Google Patents

Audio signal adjusting circuit, method, electronic equipment and storage medium Download PDF

Info

Publication number
CN111935572B
CN111935572B CN202010632567.6A CN202010632567A CN111935572B CN 111935572 B CN111935572 B CN 111935572B CN 202010632567 A CN202010632567 A CN 202010632567A CN 111935572 B CN111935572 B CN 111935572B
Authority
CN
China
Prior art keywords
microphone
voltage
circuit
amplifier
audio signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010632567.6A
Other languages
Chinese (zh)
Other versions
CN111935572A (en
Inventor
黄赐昌
山海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010632567.6A priority Critical patent/CN111935572B/en
Publication of CN111935572A publication Critical patent/CN111935572A/en
Application granted granted Critical
Publication of CN111935572B publication Critical patent/CN111935572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/08Mouthpieces; Microphones; Attachments therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The embodiment of the application provides an audio signal adjusting circuit, an audio signal adjusting method, electronic equipment and a storage medium, which are used for automatically adjusting an output signal of a microphone. The method comprises the following steps: a microphone interface; the first circuit is connected with the microphone interface and is used for detecting whether the microphone connected with the microphone interface is an active microphone or not; the second circuit is connected with the first circuit and the microphone interface and is used for detecting whether the output amplitude of the microphone interface is within the receiving range of the amplifier or not; the processor is connected with the first circuit and the second circuit, and adjusts the gain of the amplifier to a default value when the microphone is determined to be a passive microphone according to the detection result of the first circuit; when the microphone is determined to be an active microphone according to the detection result of the first circuit and the output amplitude value of the microphone interface is determined to be within the receiving range of the amplifier according to the detection result of the second circuit, the gain of the amplifier is adjusted to a first range; and the amplifier is connected with the microphone interface and the processor and amplifies the audio signal output by the microphone.

Description

Audio signal adjusting circuit, method, electronic equipment and storage medium
Technical Field
The present invention relates to the field of audio processing technologies, and in particular, to an audio signal conditioning circuit, an audio signal conditioning method, an electronic device, and a storage medium.
Background
The microphones are divided into active microphones and passive microphones, the output amplitude of the passive microphones is small, the output amplitude of the active microphones is large, and the amplitude difference of the outputs of different active microphones is also large. Therefore, the existing audio input interface technology can only support a passive microphone or only support an active microphone, and cannot support mixing of the active microphone and the passive microphone, if mixing, the audio signal processed by an analog-to-Digital Converter (ADC) gain is small or distorted, and the ADC module may also be disabled.
In practical application scenarios, such as judicial interrogation systems and recording and broadcasting systems, either passive microphones or active microphones may be used. Therefore, there is a need for a circuit system that automatically adjusts the output signal of a microphone.
Disclosure of Invention
The embodiment of the application provides an audio signal adjusting circuit, an audio signal adjusting method, electronic equipment and a storage medium, which are used for automatically adjusting an output signal of a microphone.
In a first aspect, an audio signal conditioning circuit is provided, comprising:
a microphone interface;
the first circuit is connected with the microphone interface and used for detecting whether a microphone accessed by the microphone interface is an active microphone or not;
the second circuit is connected with the first circuit and the microphone interface and is used for detecting whether the output amplitude of the microphone interface is within the acceptance range of an amplifier or not;
the processor is connected with the first circuit and the second circuit and used for adjusting the gain of the amplifier to a default value when the microphone is determined to be a passive microphone according to the detection result of the first circuit; when the microphone is determined to be an active microphone according to the detection result of the first circuit and the output amplitude value of the microphone interface is determined to be within the acceptance range of the amplifier according to the detection result of the second circuit, the gain of the amplifier is adjusted to a first range;
and the amplifier is connected with the microphone interface and the processor and used for amplifying the audio signal output by the microphone according to the gain adjusted by the processor.
Optionally, the first circuit includes a first comparator, a non-inverting input terminal of the first comparator is connected to the microphone interface, and an inverting input terminal of the first comparator is connected to a power supply voltage;
the voltage of the positive phase input end of the first comparator comprises a first bias voltage and the voltage of an audio signal output by the microphone, the voltage of the negative phase input end of the first comparator is a first preset voltage, and when the first comparator determines that the voltage of the positive phase input end is greater than the first preset voltage, the microphone connected to the microphone interface is determined to be an active microphone.
Optionally, the second circuit includes a second comparator, a non-inverting input terminal of the second comparator is connected to the microphone interface, and an inverting input terminal of the second comparator is connected to a power supply voltage.
The voltage of the positive phase input end of the second comparator comprises a first bias voltage and the voltage of the audio signal output by the microphone, the voltage of the negative phase input end of the second comparator is a second preset voltage, and when the second comparator determines that the voltage of the positive phase input end is smaller than the second preset voltage, the output amplitude of the microphone interface is determined to be within the acceptance range of the amplifier.
Optionally, the processor is further configured to adjust the gain of the amplifier to a second range when it is determined that the output amplitude is not within the acceptance range according to the detection result of the second circuit.
Optionally, the circuit further includes a voltage divider circuit, connected to the microphone interface and the processor, for sharing a voltage of the audio signal output by the microphone when the output amplitude of the microphone exceeds the acceptance range of the amplifier; when the voltage dividing circuit shares the voltage of the audio signal output by the microphone, the voltage dividing circuit is in an open state.
Optionally, the circuit further includes a third circuit, where the third circuit is connected to the microphone interface and the processor, and is configured to detect whether a microphone in the microphone interface is pulled out;
when the microphone of the microphone interface is detected to be pulled out, the gain of the amplifier is adjusted to be a default value through the processor, and the voltage division circuit is controlled to be closed;
and when the microphone of the microphone interface is detected not to be pulled out, controlling the current gain of the amplifier and the current state of the voltage division circuit to be unchanged through the processor.
Optionally, the circuit further includes a bias resistor, and the bias resistor is connected to the microphone interface and configured to provide a second bias voltage to a microphone connected to the microphone interface.
Optionally, the circuit further comprises a coupling capacitor and a filter; the coupling capacitor is arranged between the microphone and the amplifier; the filter is disposed between the microphone interface and the comparator.
In a second aspect, there is provided an audio signal conditioning method, the method comprising:
detecting whether the accessed microphone is an active microphone;
when detecting that the accessed microphone is an active microphone, detecting whether the output amplitude of the microphone is within the acceptance range of an amplifier;
and when the output amplitude is determined to be in the acceptance range, adjusting the gain of an amplifier to a first range so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain.
Optionally, detecting whether the accessed microphone is an active microphone includes:
detecting whether the input voltage is greater than a first preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is greater than a first preset voltage, determining that the microphone is an active microphone.
Optionally, when detecting that the accessed microphone is an active microphone, detecting whether an output amplitude of the microphone is within an acceptance range of the amplifier includes:
detecting whether the input voltage is greater than a second preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is smaller than or equal to a second preset voltage, determining that the output amplitude of the microphone is within the acceptance range of the amplifier;
and when the input voltage is greater than a second preset voltage, determining that the output amplitude of the microphone is not in the acceptance range of the amplifier.
Optionally, after determining that the output amplitude of the microphone is not in the acceptance range of the amplifier, the method further includes:
adjusting the gain of the amplifier to a second range.
Optionally, after determining that the output amplitude of the microphone is not in the acceptance range of the amplifier, the method further includes:
and switching on a voltage division circuit to enable the voltage division circuit to share the voltage of the audio signal output by the microphone.
In a third aspect, an audio signal conditioning apparatus is provided, the apparatus comprising:
the detection module is used for detecting whether the accessed microphone is an active microphone;
the detection module is further used for detecting whether the output amplitude of the microphone is within the acceptance range of the amplifier when the connected microphone is detected to be an active microphone;
and the processing module is used for adjusting the gain of the amplifier to a first range when the output amplitude is determined to be in the acceptance range, so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain.
Optionally, the detection module is specifically configured to:
detecting whether the input voltage is greater than a first preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is greater than a first preset voltage, determining that the microphone is an active microphone.
Optionally, the detection module is specifically configured to:
detecting whether the input voltage is greater than a second preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is smaller than or equal to a second preset voltage, determining that the output amplitude of the microphone is within the acceptance range of the amplifier;
and when the input voltage is greater than a second preset voltage, determining that the output amplitude of the microphone is not in the acceptance range of the amplifier.
Optionally, the processing module is further configured to:
adjusting the gain of the amplifier to a second range.
Optionally, the processing module is further configured to:
and switching on a voltage division circuit to enable the voltage division circuit to share the voltage of the audio signal output by the microphone.
In a fourth aspect, an electronic device is provided, the electronic device comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps included in the method of any of the second aspect according to the obtained program instructions.
In a fifth aspect, there is provided a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the steps included in the method of any one of the second aspects.
A sixth aspect provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the audio signal conditioning method described in the various possible implementations described above.
In an embodiment of the present application, detecting, by a first circuit, whether an active microphone or a passive microphone is connected to a microphone interface, and detecting, by a second circuit, whether an output amplitude of the microphone interface is within an acceptance range of an amplifier, a processor adjusts a gain of the amplifier to a default value when it is determined that the first circuit detects that the passive microphone is connected to the microphone interface, and adjusts the gain of the amplifier to a first range when it is determined that the active microphone is connected to the microphone interface and the output amplitude of the microphone interface is within the acceptance range of the amplifier, and the amplifier amplifies an audio signal output by the microphone according to the adjusted gain.
That is, when the first circuit detects that the passive microphone is inserted into the microphone port, the gain of the amplifier is adjusted to a default value, and when the first circuit detects that the active microphone is inserted into the microphone port, the gain of the amplifier is adjusted according to the detection result by detecting whether the amplitude of the output signal of the active microphone is within the receiving range of the amplifier, so that the volume of the audio signal amplified by the amplifier is large enough and is not distorted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application.
Fig. 1 is a circuit for adjusting an audio signal according to the related art;
FIG. 2 is another audio signal conditioning circuit of the related art;
fig. 3 is an audio signal conditioning circuit according to an embodiment of the present application;
FIG. 4 is another audio signal conditioning circuit provided in an embodiment of the present application;
FIG. 5 is a diagram of another audio signal conditioning circuit according to an embodiment of the present application;
FIG. 6 is another audio signal conditioning circuit provided in an embodiment of the present application;
FIG. 7 is a diagram of another audio signal conditioning circuit according to an embodiment of the present application;
fig. 8 is a flowchart of an audio signal conditioning method according to an embodiment of the present application;
fig. 9 is a block diagram of an audio signal conditioning apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the technical solutions in the embodiments of the present application will be described below clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The "plurality" in the present application may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
For ease of understanding, the technical background of the embodiments of the present invention will be described below.
As previously mentioned, existing microphone interface technologies do not support a mix of active and passive microphones. At present, one microphone interface can only be connected with an active microphone or only with a passive microphone. For a microphone interface that can only connect to a passive microphone, the host is required to provide a bias voltage, as shown in fig. 1. For a microphone interface that can only receive active microphones, no bias voltage needs to be provided, as shown in fig. 2. However, in an actual application scenario, due to different requirements of each user, part of the users may need to use an active microphone, and part of the users need to use a passive microphone, at this time, if the microphone interface can only support one type of microphone access, the microphone interface will not meet the requirements of the users, and user experience is affected. At this time, if an interface that can only support one type of microphone access is forced to be mixed, for example, an active microphone is accessed at an interface that can only support a passive microphone, or a passive microphone is accessed at an interface that can only support an active microphone, the sound output by the microphone will be small or distorted.
In order to enable a microphone interface to support both active microphone access and passive microphone access, an embodiment of the present application provides an audio signal conditioning circuit, where a first circuit detects whether a microphone accessed by the microphone interface is an active microphone or a passive microphone, and when it is detected that the microphone interface is accessed by the passive microphone, a current gain value of an amplifier is kept as a default value (that is, in the audio signal conditioning circuit of the present application, the default value of the amplifier gain is a gain value for amplifying an audio signal output by the microphone when the microphone interface is accessed by the passive microphone). When the active microphone is detected to be connected with the microphone interface and the output amplitude value of the microphone interface is detected to be in the receiving range of the amplifier, the gain of the amplifier is adjusted to the first range, so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain. Therefore, when a microphone accessed by the microphone interface is detected, the gain of the amplifier is adjusted according to the detection result, so that the same microphone interface can support both the access of an active microphone and the access of a passive microphone, and the condition of small volume or distortion cannot occur.
After introducing the design concept of the embodiment of the present application, some simple descriptions are provided below for application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The audio signal conditioning circuit and the audio signal conditioning method provided by the embodiments of the present application are described below with reference to the drawings of the specification.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an audio signal conditioning circuit, where the audio signal conditioning circuit includes a microphone interface, a first circuit, a second circuit, a processor, and an amplifier. The microphone interface is respectively connected with the first circuit, the second circuit and the amplifier, the first circuit and the second circuit are connected with the microphone interface after being connected in parallel, the first circuit and the second circuit are respectively connected with the processor, and the processor is also connected with the amplifier. It should be noted that the connection manner between the above modules is only used for illustrating the embodiment of the present application and is not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The microphone interface is used for connecting a microphone.
The first circuit is used for detecting whether the microphone interface is accessed to an active microphone or a passive microphone.
The second circuit is used for detecting whether the output amplitude of the microphone interface is within an acceptance range of the amplifier.
And a processor, configured to keep the gain of the amplifier at a default value when the microphone connected to the microphone interface is determined to be the passive microphone according to the detection result of the first circuit (i.e. in the embodiment of the present application, before detecting whether the microphone interface is connected to the active microphone or the passive microphone, the gain set for the amplifier is a gain value suitable for amplifying the audio signal output by the passive microphone). And adjusting the gain value of the amplifier from a default value to a first range when the microphone interface is determined to be connected with the active microphone according to the detection result of the first circuit. Wherein the maximum value of the gain of the first range is less than the default value.
The amplifier amplifies the audio signal output by the microphone interface according to the gain adjusted by the processor.
In one possible embodiment, the first circuit includes a first comparator, a non-inverting input of the first comparator is connected to the microphone interface, and an inverting input of the first comparator is connected to the power supply voltage. Referring to fig. 4, the voltage at the non-inverting input terminal of the first comparator includes a first bias voltage Vbias1 and the voltage Vin of the audio signal output by the microphone, and the voltage at the inverting input terminal of the first comparator is a first preset voltage Vref 1. Where Vbias1 is provided by resistors R5 and R6, Vref1 is provided by resistors R7 and R8, and Vref1-Vbias1 is greater than the maximum output voltage of the passive microphone and much less than the maximum output voltage of the active microphone. When the voltage of the non-inverting input end in the first comparator is greater than the voltage of the inverting input end, the first comparator outputs a high level, and it is determined that the microphone connected to the microphone interface is an active microphone. The voltage of the non-inverting input terminal of the first comparator is greater than the voltage of the inverting input terminal, and the following two situations may exist: the voltage of the audio signal output by the microphone is greater than the first preset voltage, i.e., Vin > Vref1, or the sum of the first bias voltage and the voltage of the audio signal output by the microphone is greater than the first preset voltage, i.e., (Vbias1+ Vin) > Vref 1.
In one possible embodiment, the second circuit includes a second comparator, a non-inverting input of the second comparator is connected to the microphone interface, and an inverting input of the second comparator is connected to the power supply voltage. Referring to fig. 4, the voltage at the non-inverting input terminal of the second comparator includes the first bias voltage Vbias1 and the voltage Vin of the audio signal output by the microphone, and the voltage at the inverting input terminal of the second comparator is the second preset voltage Vref 2. Wherein Vref2 is provided by resistors R9 and R10, and Vref2> Vref 1. When the voltage of the non-inverting input end in the second comparator is less than the voltage of the inverting input end, the second comparator outputs low level, and the output amplitude of the microphone interface is determined to be in the acceptance range of the amplifier. When the voltage at the non-inverting input terminal of the second comparator is lower than the voltage at the inverting input terminal, it means that the sum of the first bias voltage and the voltage of the audio signal output by the microphone is lower than the second preset voltage, i.e. (Vbias1+ Vin) < Vref 2.
In one possible embodiment, when the voltage at the non-inverting input terminal of the second comparator is greater than the voltage at the inverting input terminal, the second comparator outputs a high level, and it is determined that the output amplitude of the microphone interface is not within the acceptance range of the amplifier. At this time, the processor adjusts the gain of the amplifier from the default value to the second range according to the detection result of the second comparator. The voltage of the non-inverting input terminal of the second comparator is greater than the voltage of the inverting input terminal, and the following two situations may exist: the voltage of the audio signal output by the microphone is greater than the second preset voltage, i.e., Vin > Vref2, or the sum of the first bias voltage and the voltage of the audio signal output by the microphone is greater than the second preset voltage, i.e., (Vbias1+ Vin) > Vref 2. The maximum value of the second range is smaller than the minimum value of the first range, that is, the amplification factor of the audio signal output by the microphone when the amplitude of the microphone output is not within the receiving range of the amplifier is smaller than the amplification factor of the audio signal output by the microphone when the amplitude of the microphone output is within the receiving range of the amplifier.
In a possible implementation, a voltage divider circuit may be further included in the circuit for conditioning the audio signal, as shown in fig. 5, the voltage divider circuit is connected to the microphone interface and the processor, and is composed of a resistor R3 and a transistor M1, and M1 is closed by default. When the processor determines that the output amplitude of the microphone interface is not within the acceptance range of the amplifier, M1 is turned on, and the resistors R2 and R3 form a voltage division function, that is, the voltage division circuit can share part of the voltage of the audio signal output by the microphone.
In a possible implementation manner, the audio signal conditioning circuit may further include a third circuit, as shown in fig. 6, the third circuit is connected to the microphone interface, and is configured to detect whether the microphone connected to the microphone interface is unplugged, and determine that the microphone is unplugged when the third comparator outputs a high level, at this time, the gain value of the restoring amplifier is a default value, and the control M1 is in a closed state (i.e., a default state). When the third comparator outputs low level, the microphone is judged not to be pulled out, and at the moment, the gain of the amplifier and the state of the voltage division circuit are kept unchanged. The third circuit comprises a third comparator, wherein a non-inverting input terminal of the third comparator is connected with the microphone interface, an inverting input terminal of the third comparator is connected with the power supply voltage, and the voltage Vref3 of the inverting input terminal is provided by resistors R12 and R13. When the microphone in the microphone interface is pulled out, the pin1 and the pin2 of the microphone interface are connected through the internal contacts, and the voltage of the non-inverting input terminal of the third comparator is approximately equal to the second bias voltage Vbias 2. Wherein, Vbias2 is used to provide bias voltage for the microphone connected to the microphone interface, and when the microphone connected to the microphone interface is a passive microphone, the voltage of the passive microphone is all from Vbias2, when the microphone connected to the microphone interface is an active microphone, since Vbias2 is much smaller than the voltage provided by the active microphone voltage source, Vbias2 will not affect the output amplitude of the active microphone, Vbias2 is provided by resistor R2, Vbias2> Vref3, and at this time, the third comparator outputs high level. When the microphone in the microphone interface is not unplugged, the pins 1 and 2 of the microphone interface are disconnected, the voltage at the positive phase input end of the third comparator is pulled to the ground by the resistor R11 (namely, the voltage at the positive phase input end of the third comparator is 0), and at this time, the third comparator outputs a low level. Therefore, it is determined that the microphone of the microphone interface is pulled out when the third comparator outputs a high level, and it is determined that the microphone of the microphone interface is not pulled out when the third comparator outputs a low level.
In another possible embodiment, the third circuit may further detect whether a microphone is inserted into the microphone interface before the second circuit and the third circuit perform the correlation detection, and the processor controls the first circuit to detect whether the inserted microphone is an active microphone or a passive microphone and controls the second circuit to detect whether the output amplitude of the microphone interface is within the receiving range of the amplifier when determining that the microphone is inserted into the microphone interface according to the detection result of the third circuit.
In one possible implementation, the audio signal conditioning circuit may further include a coupling capacitor C1 and a filter, as shown in fig. 7. The filter is arranged between the microphone interface and the comparator (the comparator comprises a first comparator and a second comparator), and the filter consists of a capacitor C2, a resistor R4 and a capacitor C3, so that false triggering and misjudgment of a glitch signal are avoided, and an up-and-down fluctuating audio signal can be smoothed, so that comparison and output of the comparator are facilitated.
Based on the same inventive concept, please refer to fig. 8, an embodiment of the present application provides an audio signal adjusting method, where the flow of the method is described as follows:
step 801: it is detected whether the accessed microphone is an active microphone.
In one possible implementation, it is detected whether an input voltage is greater than a first preset voltage, wherein the input voltage includes a voltage of an audio signal output by a microphone and a first bias voltage. When the input voltage is detected to be greater than the first preset voltage, the accessed microphone is determined to be an active microphone, and when the input voltage is detected to be less than the first preset voltage, the accessed microphone is determined to be a passive microphone. When the first comparator is used for detection, the voltage of the positive phase input end of the first comparator is the input voltage, the voltage of the negative phase input end of the first comparator is the first preset voltage, and the first comparator can judge whether the accessed microphone is an active microphone by comparing the voltage of the positive phase input end with the voltage of the negative phase input end.
In a possible embodiment, before detecting whether the connected microphone is an active microphone, it is also necessary to detect whether a microphone is connected.
Step 802: when the connected microphone is detected to be an active microphone, whether the output amplitude of the microphone is within the acceptance range of the amplifier or not is detected.
In a possible implementation manner, when the connected microphone is determined to be an active microphone, whether the input voltage is greater than a second preset voltage is detected, when the input voltage is detected to be less than or equal to the second preset voltage, the output amplitude of the microphone is determined to be within the acceptance range of the amplifier, and when the input voltage is detected to be greater than the second preset voltage, the output amplitude of the microphone is determined not to be within the acceptance range of the amplifier. When the second comparator is used for detection, the voltage of the positive phase input end of the second comparator is the input voltage, the voltage of the negative phase input end of the second comparator is the second preset voltage, and the second comparator can judge whether the output amplitude of the microphone is within the acceptance range of the amplifier by comparing the voltage of the positive phase input end with the voltage of the negative phase input end.
In one possible embodiment, the gain of the amplifier is adjusted to a second range after determining that the output amplitude of the microphone is not within the acceptance range of the amplifier. In another possible implementation, after determining that the output amplitude of the microphone is not within the acceptable range of the amplifier, the voltage divider circuit may be turned on to allow the voltage divider circuit to share the voltage of the audio signal output by the microphone, so that the voltage input to the amplifier of the microphone may be reduced to maintain the output amplitude of the microphone within the acceptable range of the amplifier.
Step 803: and when the output amplitude is determined to be in the acceptance range, adjusting the gain of the amplifier to a first range so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain.
Based on the same inventive concept, the embodiment of the present application provides an audio signal adjusting apparatus, which can implement the corresponding function of the aforementioned audio signal adjusting method. The audio signal conditioning means may be a hardware structure, a software module, or a hardware structure plus a software module. The audio signal conditioning device can be realized by a chip system, and the chip system can be formed by a chip and can also comprise the chip and other discrete devices. Referring to fig. 9, the audio signal conditioning apparatus includes a detecting module 901 and a processing module 902. Wherein:
a detecting module 901, configured to detect whether an accessed microphone is an active microphone;
the detecting module 901 is further configured to detect whether an output amplitude of the microphone is within an acceptance range of the amplifier when the connected microphone is detected to be an active microphone;
and a processing module 902, configured to, when it is determined that the output amplitude is within the acceptance range, adjust a gain of an amplifier to a first range, so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain.
In a possible implementation, the detecting module 901 is specifically configured to:
detecting whether the input voltage is greater than a first preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is greater than a first preset voltage, determining that the microphone is an active microphone.
In a possible implementation, the detecting module 901 is specifically configured to:
detecting whether the input voltage is greater than a second preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is smaller than or equal to a second preset voltage, determining that the output amplitude of the microphone is within the acceptance range of the amplifier;
and when the input voltage is greater than a second preset voltage, determining that the output amplitude of the microphone is not in the acceptance range of the amplifier.
In a possible implementation, the processing module 902 is further configured to:
adjusting the gain of the amplifier to a second range.
In a possible implementation, the processing module 902 is further configured to:
and switching on a voltage division circuit to enable the voltage division circuit to share the voltage of the audio signal output by the microphone.
All relevant contents of the steps involved in the embodiments of the audio signal adjusting method can be cited to the functional description of the functional module corresponding to the audio signal adjusting apparatus in the embodiments of the present application, and are not described herein again.
The division of the modules in the embodiments of the present application is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one module by two or more modules. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Based on the same inventive concept, the embodiment of the application provides electronic equipment. Referring to fig. 10, the electronic device includes at least one processor 1001 and a memory 1002 connected to the at least one processor, in this embodiment, a specific connection medium between the processor 1001 and the memory 1002 is not limited in this application, in fig. 10, the processor 1001 and the memory 1002 are connected through a bus 1000 as an example, the bus 1000 is represented by a thick line in fig. 10, and a connection manner between other components is only schematically illustrated and is not limited. The bus 1000 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 10 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may execute the steps included in the aforementioned audio signal adjusting method by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of the electronic device, and may connect various parts of the whole electronic device by using various interfaces and lines, and perform various functions and process data of the electronic device by operating or executing instructions stored in the memory 1002 and calling data stored in the memory 1002, thereby performing overall monitoring on the electronic device. Alternatively, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 1001 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, that implements or performs the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the audio signal conditioning method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1002 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 1002 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1002 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
By programming the processor 1001, the code corresponding to the audio signal adjusting method described in the foregoing embodiment may be fixed in the chip, so that the chip can execute the steps of the audio signal adjusting method when running, and how to program the processor 1001 is a technique known by those skilled in the art, and is not described herein again.
Based on the same inventive concept, embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the steps of the audio signal conditioning method as described above.
In some possible embodiments, the various aspects of the audio signal conditioning method provided herein may also be implemented in the form of a program product comprising program code for causing a detection device to perform the steps of the audio signal conditioning method according to various exemplary embodiments of the present application described above in this specification, when the program product is run on an electronic device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. An audio signal conditioning circuit, comprising:
a microphone interface;
the first circuit is connected with the microphone interface and used for detecting whether a microphone accessed by the microphone interface is an active microphone or not;
a second circuit, connected to the first circuit and the microphone interface, for detecting whether an output amplitude of the microphone interface is within an acceptance range of an amplifier;
the processor is connected with the first circuit and the second circuit and used for adjusting the gain of the amplifier to a default value when the microphone is determined to be a passive microphone according to the detection result of the first circuit; when the microphone is determined to be an active microphone according to the detection result of the first circuit and the output amplitude value of the microphone interface is determined to be within the acceptance range of the amplifier according to the detection result of the second circuit, the gain of the amplifier is adjusted to a first range; wherein a maximum value of the gain of the first range is less than the default value;
and the amplifier is connected with the microphone interface and the processor and used for amplifying the audio signal output by the microphone according to the gain adjusted by the processor.
2. The regulation circuit of claim 1 wherein the first circuit comprises a first comparator having a non-inverting input connected to the microphone interface and an inverting input connected to a supply voltage;
the voltage of the positive phase input end of the first comparator comprises a first bias voltage and the voltage of an audio signal output by the microphone, the voltage of the negative phase input end of the first comparator is a first preset voltage, and when the first comparator determines that the voltage of the positive phase input end is greater than the first preset voltage, the microphone connected to the microphone interface is determined to be an active microphone.
3. The regulation circuit of claim 1 wherein the second circuit comprises a second comparator having a non-inverting input connected to the microphone interface and an inverting input connected to a supply voltage;
the voltage of the positive phase input end of the second comparator comprises a first bias voltage and the voltage of the audio signal output by the microphone, the voltage of the negative phase input end of the second comparator is a second preset voltage, and when the second comparator determines that the voltage of the positive phase input end is smaller than the second preset voltage, the output amplitude of the microphone interface is determined to be within the acceptance range of the amplifier.
4. The adjustment circuit of claim 1 or 3, wherein the processor is further configured to adjust the gain of the amplifier to a second range if the output amplitude is determined not to be within the acceptance range based on the detection result of the second circuit; wherein a maximum value of the second range is less than a minimum value of the first range.
5. The conditioning circuit of claim 1 further comprising a voltage divider circuit coupled to the microphone interface and the processor for sharing the voltage of the audio signal output by the microphone when the output amplitude of the microphone exceeds the acceptance range of the amplifier; when the voltage dividing circuit shares the voltage of the audio signal output by the microphone, the voltage dividing circuit is in an open state.
6. The conditioning circuit of claim 5 further comprising a third circuit coupled to the microphone interface and the processor for detecting whether a microphone in the microphone interface is unplugged;
when the microphone of the microphone interface is detected to be pulled out, the gain of the amplifier is adjusted to be a default value through the processor, and the voltage division circuit is controlled to be closed;
and when the microphone of the microphone interface is detected not to be pulled out, controlling the current gain of the amplifier and the current state of the voltage division circuit to be unchanged through the processor.
7. The adjustment circuit of claim 1, further comprising a bias resistor coupled to the microphone interface for providing a second bias voltage to a microphone coupled to the microphone interface.
8. The conditioning circuit of claim 1, wherein the conditioning circuit further comprises a coupling capacitor and a filter; the coupling capacitor is arranged between the microphone interface and the amplifier; the filter is disposed between the microphone interface and the comparator.
9. A method of audio signal conditioning, comprising:
detecting whether the accessed microphone is an active microphone;
when the connected microphone is detected to be a passive microphone, adjusting the gain of the amplifier to be a default value; when detecting that the accessed microphone is an active microphone, detecting whether the output amplitude of the microphone is within an acceptance range of the amplifier, and when determining that the output amplitude is within the acceptance range, adjusting the gain of the amplifier to a first range so that the amplifier amplifies the audio signal output by the microphone according to the adjusted gain; wherein the maximum value of the gain of the first range is less than the default value.
10. The method of claim 9, wherein detecting whether an accessed microphone is an active microphone comprises:
detecting whether the input voltage is greater than a first preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is greater than a first preset voltage, determining that the microphone is an active microphone.
11. The method of claim 9, wherein detecting whether the output amplitude of the microphone is within an acceptance range of an amplifier when detecting that the accessed microphone is an active microphone comprises:
detecting whether the input voltage is greater than a second preset voltage or not; the input voltage comprises a voltage of an audio signal output by the microphone and a first bias voltage;
when the input voltage is smaller than or equal to a second preset voltage, determining that the output amplitude of the microphone is within the acceptance range of the amplifier;
and when the input voltage is greater than a second preset voltage, determining that the output amplitude of the microphone is not in the acceptance range of the amplifier.
12. The method of claim 11, after determining that the output amplitude of the microphone is not within the acceptance range of the amplifier, further comprising:
adjusting the gain of the amplifier to a second range; wherein a maximum value of the second range is less than a minimum value of the first range.
13. The method of claim 11, after determining that the output amplitude of the microphone is not within the acceptance range of the amplifier, further comprising:
and switching on a voltage division circuit to enable the voltage division circuit to share the voltage of the audio signal output by the microphone.
14. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps comprised by the method according to any one of claims 9-13 in accordance with the obtained program instructions.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 9-13.
CN202010632567.6A 2020-07-02 2020-07-02 Audio signal adjusting circuit, method, electronic equipment and storage medium Active CN111935572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632567.6A CN111935572B (en) 2020-07-02 2020-07-02 Audio signal adjusting circuit, method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632567.6A CN111935572B (en) 2020-07-02 2020-07-02 Audio signal adjusting circuit, method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111935572A CN111935572A (en) 2020-11-13
CN111935572B true CN111935572B (en) 2022-07-05

Family

ID=73317079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632567.6A Active CN111935572B (en) 2020-07-02 2020-07-02 Audio signal adjusting circuit, method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111935572B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995850A (en) * 2021-01-28 2021-06-18 杭州涂鸦信息技术有限公司 Self-adaptive audio circuit and self-adaptive audio device
CN113596699B (en) * 2021-07-30 2023-03-17 浙江大华技术股份有限公司 Audio input detection circuit and method
CN115567864B (en) * 2022-12-02 2024-03-01 浙江华创视讯科技有限公司 Microphone gain adjusting method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2367366A1 (en) * 2010-03-17 2011-09-21 Nxp B.V. Control of a microphone
CN109887522A (en) * 2019-01-24 2019-06-14 深圳市微纳感知计算技术有限公司 A kind of microphone array gain adjusting method therefore, device and terminal device
CN110191385A (en) * 2019-05-30 2019-08-30 歌尔股份有限公司 A kind of true wireless headset and its data communications method
CN110708633A (en) * 2019-10-29 2020-01-17 科大讯飞股份有限公司 Voltage matching circuit and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9820029B2 (en) * 2015-04-17 2017-11-14 Blackberry Limited Device-adaptable audio headset
CN207692060U (en) * 2018-01-15 2018-08-03 广州市锐芯电子科技有限公司 A kind of microphone switch detection circuit and microphone signal amplifying circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2367366A1 (en) * 2010-03-17 2011-09-21 Nxp B.V. Control of a microphone
CN109887522A (en) * 2019-01-24 2019-06-14 深圳市微纳感知计算技术有限公司 A kind of microphone array gain adjusting method therefore, device and terminal device
CN110191385A (en) * 2019-05-30 2019-08-30 歌尔股份有限公司 A kind of true wireless headset and its data communications method
CN110708633A (en) * 2019-10-29 2020-01-17 科大讯飞股份有限公司 Voltage matching circuit and system

Also Published As

Publication number Publication date
CN111935572A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111935572B (en) Audio signal adjusting circuit, method, electronic equipment and storage medium
US9547337B2 (en) Portable device and peripheral extension dock
US9594388B2 (en) Digital shunt regulator for NFC devices
CN105578346B (en) Group-aware current-limited amplifier and system
CN109391512B (en) Service publishing method and device and electronic equipment
EP3537560B1 (en) Method for determining charger, and related device and system
CN112703781B (en) Wireless signal sending method, wireless signal sending device and terminal equipment
CN106598887A (en) DDR memory configuration method and device as well as electronic equipment
US9154095B2 (en) Boost-on-demand amplifier
CN110491419B (en) Playing control method, system and terminal equipment
CN108650702B (en) Broadcast information processing method and user terminal
US9251006B2 (en) Apparatus, system and method for autonomous recovery from failures during system characterization on an environment with restricted resources
CN112995850A (en) Self-adaptive audio circuit and self-adaptive audio device
CN106658471B (en) User identification module configuration method and device
CN106936826B (en) Registration method and device of broadcast receiver and terminal equipment
CN106899774B (en) Dynamic adaptation method and dynamic adaptation device for terminal modem software
CN108391281B (en) Bridging method of wireless network, terminal equipment and storage medium
CN110557555B (en) Function starting method, device, equipment and system of intelligent camera
CN110290447B (en) Direct current bias unit, microphone working circuit and microphone control chip
CN106899943A (en) Control broadcast transmission person sends method, device and the terminal device of broadcast message
US10171054B1 (en) Audio adjustment based on dynamic and static rules
CN106250096B (en) Method and device for automatically playing music by audio equipment
CN113589882A (en) Clock frequency adjusting device and related product
US9124227B2 (en) Distortion limiter and automatic power control for drivers
CN113596699B (en) Audio input detection circuit and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant