CN104683914B - Electronic equipment and earphone detection circuit, method and apparatus - Google Patents
Electronic equipment and earphone detection circuit, method and apparatus Download PDFInfo
- Publication number
- CN104683914B CN104683914B CN201310626973.1A CN201310626973A CN104683914B CN 104683914 B CN104683914 B CN 104683914B CN 201310626973 A CN201310626973 A CN 201310626973A CN 104683914 B CN104683914 B CN 104683914B
- Authority
- CN
- China
- Prior art keywords
- test side
- earphone
- interface
- voltage value
- voltage
- 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
Links
Landscapes
- Headphones And Earphones (AREA)
- Stereophonic Arrangements (AREA)
- Telephone Function (AREA)
Abstract
A kind of electronic equipment and earphone detection circuit, method and apparatus, the earphone detection circuit include:First detection unit is adapted to detect for the signal of the first test side, to export first detection signal;First test side is adapted to the first interface of earphone, and the voltage of first test side is related to the voltage of the first power supply;Second detection unit is adapted to detect for the signal of the second test side, with output the second detection signal;Second test side is adapted to the second interface of earphone, and the voltage of second test side is related to the voltage of second source.Technical solution of the present invention determines whether earphone inserts or pull out according to the signal of two test sides so that the insertion of earphone/extraction detection is more accurate.
Description
Technical field
The present invention relates to electronic circuit technology field more particularly to electronic equipment and earphone detection circuit, method and apparatus.
Background technology
There are two types of the earphone interface standards of existing contact pin type, and OMTP standards as described in Figure 1 are L channel L- right channels R-
Microphone MIC- ground wires GND, CTIA standards as shown in Figure 2 are L channel L- right channel R- ground wire GND- microphones MIC.
After earphone is inserted into electronic equipment, L channel L interface is contacted with shrapnel, and shrapnel passes through resistance R2 and the first power vd D_
IO connections, one end connection resistance R2 of resistance R3, the other end connecting detection end HEADSET_L_INT's and capacitance C1 of resistance R3
One end, the other end ground connection of capacitance C1.Ground wire GND interfaces are connected with ground terminal, L channel L interface and right channel R interfaces difference
It is grounded by resistance R4 and R5.Microphone MIC interfaces are connected, and Mike by resistance R1 with second source HEADMICBIAS
Wind MIC interfaces are connected with test side HEADMIC_IN.Microphone MIC interfaces also with microphone Mic, diode D0 and earphone
Button Send_End, Vol+, Vol- are connected.
In head circuit example shown in fig. 1 or fig. 2, the circuit of top half is earphone interface circuit, is electronic equipment
Internal circuit, including:Resistance R1, R2 and R3, capacitance C1, test side HEADSET_L_INT and HEADMIC_IN, power vd D_
IO and HEADMICBIAS and ground terminal;The circuit of lower half portion is the internal circuit of earphone, including:Resistance R4 and R5, microphone
Mic, diode and earphone keystroke Send_End, Vol+, Vol-.
Whether can be inserted into test earphone by test side HEADSET_L_INT, it can be with by test side HEADMIC_IN
Detect whether that the button of earphone triggers and confirms the type of button.For example, test side can be compared by comparing device
The voltage and reference voltage of HEADSET_L_INT, comparison result export earphone after de-twitter circuit and are inserted into signal.
It determines whether earphone is inserted into however, as only voltage detecting is carried out to test side HEADSET_L_INT, works as earphone
Inserting paragraph only have the earphone interface that partial insertion is not fully inserted into electronic equipment in other words, will there are earphone be inserted into mistake
Detection can detect that earphone is inserted into, but can not be detected by test side HEADMIC_IN by test side HEADSET_L_INT
The button for whether having earphone triggers and confirms the type of button.
Invention content
What technical solution of the present invention solved is that the scheme of existing test earphone has error detection.
To solve the above problems, technical solution of the present invention provides a kind of earphone detection circuit, including:
First detection unit is adapted to detect for the signal of the first test side, to export first detection signal;First detection
End is adapted to the first interface of earphone, and the voltage of first test side is related to the voltage of the first power supply;
Second detection unit is adapted to detect for the signal of the second test side, with output the second detection signal;Second detection
End is adapted to the second interface of earphone, and the voltage of second test side is related to the voltage of second source;
The first detection unit and second detection unit respectively include transistor and current source;
In the first detection unit, the first of transistor is extremely suitable to input the first reference voltage, and second is extremely suitable to and institute
It states the first test side to be connected, third is extremely suitable to power end be connected by current source and suitable for output first detection signal;
First reference voltage is determined according to first test side and the connection structure of the first power supply, first interface;
In the second detection unit, the first of transistor is extremely suitable to input the second reference voltage, and second is extremely suitable to and institute
It states the second test side to be connected, third is extremely suitable to power end be connected by current source and suitable for output the second detection signal;
Second reference voltage is determined according to second test side and the connection structure of second source, second interface.
In order to solve the above technical problems, technical solution of the present invention also provides a kind of electronic equipment, including headset detection device
With the earphone detection circuit;The headset detection device includes:
First judging unit, the first detection signal suitable for being exported by the earphone detection circuit judge first inspection
Survey whether end connect with the first interface of earphone;
Confirmation unit, suitable for when the first interface of first test side and earphone connects, at least through described in detection
The signal of second test side confirms whether earphone is inserted into.
In order to solve the above technical problems, technical solution of the present invention also provides a kind of earphone detecting method, which is characterized in that packet
It includes:
The signal of the first test side is detected, to judge whether first test side connect with the first interface of earphone;Institute
The first interface that the first test side is adapted to earphone is stated, the voltage of first test side is related to the voltage of the first power supply;
In the first interface connection for detecting first test side and earphone, at least through the second test side of detection
Signal confirms whether earphone is inserted into;Second test side is adapted to the second interface of earphone, the electricity of second test side
Pressure is related to the voltage of second source.
Compared with prior art, technical scheme of the present invention has the following advantages:
The signal of two test sides is detected respectively, determines whether earphone is inserted into or pulls out according to the signal of two test sides
Go out so that the insertion of earphone/extraction detection is more accurate.
Detection unit relatively determines whether earphone interface is connected with test side by voltage, and structure is realized simple.Inspection
It surveys unit and includes transistor and current source, it is simple in structure compared to using the comparator configuration realized with operational amplifier, and can
To pass through current source control circuit power consumption.
Earphone interface circuit is connected using the second switch unit switching interface so that can be with compatible three-section earphone and two kinds
The detection of the four-section type headset of standard, therefore application is more extensive.
Description of the drawings
Fig. 1 is the schematic diagram of circuit connection structure after a kind of earphone is inserted into;
Fig. 2 is the schematic diagram of circuit connection structure after another earphone is inserted into;
Fig. 3 is the structure diagram of the earphone detection circuit of the embodiment of the present invention;
Figure 4 and 5 are the electrical block diagrams of the detection unit of the earphone detection circuit of the embodiment of the present invention;
Fig. 6 and 7 is the embodiment flow diagram of the earphone detecting method based on earphone detection circuit shown in Fig. 3;
Fig. 8 is the example structure schematic diagram for the electronic equipment for including earphone detection circuit shown in Fig. 3;
Fig. 9 is the structure diagram of the earphone detection circuit of the embodiment of the present invention;
Figure 10 is the structure diagram of the earphone interface circuit of the embodiment of the present invention;
Figure 11 and 12 is the headset detection based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10
The embodiment flow diagram of method;
Figure 13 and 14 is the electronic equipment for including earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10
Example structure schematic diagram.
Specific embodiment
Technical solution of the present invention provides a kind of earphone detection circuit, including:First detection unit is adapted to detect for the first detection
The signal at end, to export first detection signal;First test side is adapted to the first interface of earphone, first detection
The voltage at end is related to the voltage of the first power supply;
Second detection unit is adapted to detect for the signal of the second test side, with output the second detection signal;Second detection
End is adapted to the second interface of earphone, and the voltage of second test side is related to the voltage of second source.
The earphone detection circuit is suitable for being connected with earphone interface circuit, and the earphone interface circuit includes the first detection
End, the second test side, the first power supply and second source, first test side and the second test side are respectively adapted to connect earphone
Two distinct interfaces.The inserting paragraph of earphone can be divided into three interfaces, be connect including left channel interface, right channel interface and ground wire
Mouth, commonly referred to as three-section earphone;Four interfaces can also be divided into, a microphone interface more than three-section earphone, commonly referred to as
For four-section type headset, as stated in the Background Art, general there are two types of interface standards.The first interface generally refers to what is be inserted at first
Interface, the second interface can be the either interfaces being inserted into later.
The prior art only detects the signal of a test side to determine inserting or pull out for earphone, technical solution of the present invention
Earphone detection circuit detects the signal of two test sides, determines whether earphone is inserted by the signal detection to two test sides
Or extract, in the specific implementation, the signal for detecting test side can be detection it is corresponding with test side detect signal or
Directly detect the voltage of test side.Technical solution of the present invention by earphone portion be inserted into or be not fully inserted and make first interface not with
The situation that first test side is connected or second interface is not connected with the second test side is referred to as earphone and is not inserted into.
The voltage of first test side is related to the voltage of the first power supply, the voltage of second test side and the second electricity
The voltage in source is related.When earphone is not inserted into electronic equipment, according to the first test side in earphone interface circuit and the first power supply
Connection structure can determine the voltage of the first test side, according to the company of the second test side and second source in earphone interface circuit
Binding structure can determine the voltage of the second test side.When earphone is fully inserted into the earphone interface of electronic equipment, earphone inserting paragraph
First interface be connected with the first test side, second interface is connected with the second test side, according to the first test side and first
Power supply, first interface connection structure can determine the voltage of the first test side, according to the second test side and second source, second
The connection structure of interface can determine the voltage of the second test side.
Therefore, the voltage of the first test side and the voltage of the second test side are not respectively when earphone is inserted into and is not inserted into
With, detect two test sides signal come determine earphone whether be inserted into can by detect two test sides signal voltage
It realizes, in a particular embodiment, the first detection unit is adapted to compare the first reference voltage and first test side
Voltage, to export first detection signal, first reference voltage is according to first test side and the first power supply, first interface
Connection structure determine that first detection signal is representing whether the first test side is connected with first interface.Second inspection
Survey unit be adapted to compare the second reference voltage and the voltage of second test side, with output second detection signal, described second
Reference voltage determines according to second test side and the connection structure of second source, second interface, the second detection signal to
Represent whether the second test side is connected with second interface.In other embodiments, the first detection unit can also pass through
The voltage value of the first test side is read to judge whether the first test side connect with first interface, the second detection unit also may be used
To judge whether the second test side connect with second interface by reading the voltage value of the second test side.
Further, the startup of the second source can be triggered based on the first detection signal, specifically, when
After earphone is extracted, second source is to close;When first detection signal represents that the first test side is connected with first interface, touch
Hair opens second source.Second source is only opened when the first test side is connected with first interface in this way, can be in certain journey
Circuit power consumption is reduced on degree.
Based on above-mentioned earphone detection circuit, the earphone detecting method of technical solution of the present invention includes:Pass through the earphone
The first detection signal of detection circuit output judges whether first test side connect with the first interface of earphone;When described
When the first interface of one test side and earphone connects, confirm whether earphone is inserted at least through the signal for detecting second test side
Enter.
The earphone detection circuit of technical solution of the present invention and method are carried out specifically with reference to the accompanying drawings and examples
It is bright.It should be noted that in following embodiment, earphone detection circuit is suitable for the earphone interface circuit with head circuit shown in Fig. 1
It is connected, for insertion sequence, first interface of the first interface for the inserting paragraph of earphone, the second interface is ear
The third interface of the inserting paragraph of machine.It is appreciated that the earphone interface circuit of distinct electronic apparatuses may be different, correspondingly,
The voltage of test side may also can be different.In addition, earphone detection circuit can also include earphone interface circuit.
The earphone detection circuit of the embodiment of the present invention shown in Fig. 3 includes:First detection unit 1 and second detection unit 2.
Incorporated by reference to reference to figure 1 and Fig. 3, first detection unit 1 is adapted to compare the first reference voltage Vref 1 and the first test side
The voltage of HEADSET_L_INT, to export first detection signal AUDIO_HEAD_INSERT1, the first reference voltage Vref 1
It is determined according to the connection structure of the first test side HEADSET_L_INT and the first power vd D_IO, first interface.
Second detection unit 2 is adapted to compare the voltage of the second reference voltage Vref 2 and the second test side HEADMIC_IN, with
Output the second detection signal AUDIO_HEAD_INSERT, second reference voltage Vref 2 is according to the second test side HEADMIC_
IN and the connection structure of second source HEADMICBIAS, second interface determine.
First detection signal is to represent whether the first test side is connected with first interface, and the second detection signal is to table
Show whether the second test side is connected with second interface.
Specifically, the first detection unit 1 of the present embodiment and second detection unit 2 respectively include transistor and current source.
The transistor can be metal-oxide-semiconductor or triode, be illustrated by taking metal-oxide-semiconductor as an example below, and those skilled in the art can
To understand, based on the circuit connection structure for the detection unit for using metal-oxide-semiconductor below, the detection list using triode can also be obtained
The circuit connection structure of member.
Fig. 4 is a kind of circuit structure of the detection unit of the embodiment of the present invention, and detection unit (a) shown in Fig. 4 includes
NMOS tube MN1 and current sources la, the grid connection reference voltage input terminal VREF of NMOS tube MN1, source electrode and detection input IN
It is connected, drain electrode is suitable for being connected with detection output OUT.Current sources la is serially connected in operating voltage Vdd input terminals and NMOS tube
Drain electrode between, for the electric current of control circuit, with the power consumption of control circuit, the smaller current sources la of generally use current value,
Such as 1 μ A can be less than or equal to, therefore the power consumption of detection circuit can very little.As the voltage V of detection inputINIt is more than
(Vref–Vth(n))When, NMOS tube cut-off, the voltage of the signal of the drain electrode output of NMOS tube is operating voltage Vdd input terminals
Voltage;As the voltage V of detection inputINIt is less than(Vref–Vth(n))When, NMOS tube conducting, the letter of the drain electrode output of NMOS tube
Number voltage be detection input IN voltage VIN, Vref is the voltage of reference voltage input terminal VREF, and Vth (n) is NMOS tube
Threshold voltage.
Detection unit (b) shown in Fig. 4 is the alternative of (a), detection unit (b) shown in Fig. 4 including PMOS tube MP1 and
Current sources la, the grid connection reference voltage input terminal VREF of PMOS tube MP1, source electrode are connected with detection input IN, drain
Suitable for being connected with detection output OUT.Current sources la is serially connected between the drain electrode of ground terminal and PMOS tube MP1, for controlling electricity
The electric current on road, with the power consumption of control circuit.As the voltage V of detection input ININIt is more than(Vref–Vth(p))When, PMOS tube is led
Voltage V logical, that the voltage of the signal of the drain electrode output of PMOS tube is detection input ININ;As the voltage V of detection inputINIt is small
In(Vref–Vth(p))When, PMOS tube cut-off, the voltage of the signal of the drain electrode output of PMOS tube is ground terminal voltage, and Vref is ginseng
The voltage of voltage input end VREF is examined, Vth (p) is the threshold voltage of PMOS tube.
Further, detection unit can also include reshaper, and the signal for being exported to the third pole of transistor carries out whole
Shape, with the high level that output is stable(Logic 1)Or low level(Logical zero), reshaper can be phase inverter, be serially connected in transistor
Between third pole and detection output OUT, by taking Fig. 4 as an example, the input terminal of phase inverter INV is connected with the drain electrode of metal-oxide-semiconductor, reverse phase
The output terminal of device INV is connected with detection output OUT.
First detection unit 1 can be the circuit shown in Fig. 4 (a) or Fig. 4 (b), wherein, the inspections of detection input IN and first
It surveys end HEADSET_L_INT to be connected, reference voltage input terminal VREF inputs the first reference voltage Vref 1, the first reference voltage
What the setting of Vref1 can be determined according to the circuit structure and component parameters of head circuit.The detection output of first detection unit 1
The detection signal for holding OUT outputs is first detection signal AUDIO_HEAD_INSERT1, and exporting high level or low level can divide
Do not represent that the first test side HEADSET_L_INT is connect with first interface or the first test side HEADSET_L_INT is not with first
Interface connects.
Second detection unit 2 can be the circuit shown in Fig. 4 (a) or Fig. 4 (b), wherein, the inspections of detection input IN and second
It surveys end HEADMIC_IN to be connected, reference voltage input terminal VREF inputs the second reference voltage Vref 2, the first reference voltage
What the setting of Vref2 can be determined according to the circuit structure and component parameters of head circuit.The detection output of second detection unit 2
The detection signal for holding OUT outputs is the second detection signal AUDIO_HEAD_INSERT, and exporting high level or low level can distinguish
Represent that the second test side HEADMIC_IN is connect with second interface or the second test side HEADMIC_IN is not connect with second interface.
By taking head circuit shown in FIG. 1 as an example, when earphone extract or be not inserted into, L channel L interface not with the first test side
HEADSET_L_INT is connected, and the first test side HEADSET_L_INT output voltages are the height of the voltage of the first power vd D_IO
Level;After earphone is inserted into, L channel L interface is connected with the first test side HEADSET_L_INT, the first test side
The voltage of HEADSET_L_INT obtains the voltage of the first power vd D_IO by resistance R2 and resistance R4, usual resistance
The resistance value of R2 is larger, generally hundreds of K Ω, and the resistance value of resistance R4 is smaller, generally tens Ω, test side HEADSET_L_INT
Export the low level close to 0V.Therefore, the setting of the first reference voltage Vref 1 and voltage value, the resistance of the first power vd D_IO
R2 is related to the resistance value of R4 and the threshold voltage of metal-oxide-semiconductor.
When earphone is extracted or is not inserted into, microphone MIC interfaces are not connected with the second test side HEADMIC_IN, the second inspection
Survey the high level for the voltage that end HEADMIC_IN output voltages are second source HEADMICBIAS;After earphone is inserted into, microphone
MIC interfaces are connected with the second test side HEADMIC_IN, when being triggered without button, the voltage of the second test side HEADMIC_IN
The voltage of second source HEADMICBIAS is obtained by resistance R1 and microphone Mic, when there is button triggering, second
The voltage of test side HEADMIC_IN passes through resistance R1 and parallel resistance(Microphone Mic is in parallel with button)To second source
The voltage of HEADMICBIAS obtains.Therefore, the setting of the second reference voltage Vref 2 is with second source HEADMICBIAS's
Voltage value, resistance R1 and the resistance value of microphone Mic and the threshold voltage of metal-oxide-semiconductor are related.
Second test side HEADMIC_IN can be additionally used in the push-button type that detection is triggered, as detection input IN and second
Test side HEADMIC_IN is connected when being triggered with test earphone button, the reference voltage of input reference voltage input terminal VREF
Setting and voltage value, resistance R1, microphone Mic and the resistance value of button of second source HEADMICBIAS and the threshold value of metal-oxide-semiconductor
Voltage is related.The resistance value of different buttons is typically to differ, when different buttons is triggered, the second test side HEADMIC_
Whether the partial pressure value of IN is also different, if be only triggered by some button of the second test side HEADMIC_IN test earphones
When, the setting of the reference voltage of input reference voltage input terminal VREF and voltage value, the resistance of second source HEADMICBIAS
R1, microphone Mic and the resistance value of detected button and the threshold voltage of metal-oxide-semiconductor are related.
The circuit structure of first detection unit 1 and second detection unit 2 is not limited to shown in Fig. 4, can also be other
Circuit structure, such as shown in Fig. 5, detection unit can also use comparator, the positive input terminal VIN1 of comparator COMP and negative defeated
Enter to hold VIN2 can input the voltage and reference voltage of test side respectively, the signal of the output terminal output of comparator COMP is to table
Show comparison result.Further, detection unit can also include de-twitter circuit 10, for being carried out to the output signal of comparator COMP
Debounce processing, with the detection signal that output is stable.
Specifically, the comparator COMP of first detection unit 1 is adapted to compare the first reference voltage Vref 1 and the first test side
Voltage, can be that the positive input terminal VIN1 of comparator COMP is connected with the first test side HEADSET_L_INT, negative input end
VIN2 inputs the first reference voltage Vref 1.The de-twitter circuit 10 of first detection unit 1 is suitable for the comparison to first detection unit 1
The output signal of device COMP carries out debounce processing, the output terminal OUT output first detection signals AUDIO_HEAD_ of de-twitter circuit 10
INSERT1。
The comparator COMP of second detection unit 2 is adapted to compare the second reference voltage Vref 2 and the second test side
The voltage of HEADMIC_IN can be that the positive input terminal VIN1 of comparator COMP is connected with the second test side HEADMIC_IN,
Negative input end VIN2 inputs the second reference voltage Vref 2.The de-twitter circuit 10 of first detection unit 2 is suitable for second detection unit
The output signal of 2 comparator COMP carries out debounce processing, output terminal OUT outputs the second detection signal of de-twitter circuit 10
AUDIO_HEAD_INSERT。
The reference voltage of above-mentioned input detection unit can be provided by voltage providing unit, and the voltage providing unit can be with
Using existing reference source circuit, such as simplest structure can be bleeder circuit, such as by electric resistance partial pressure or pass through crystal
Pipe divides to obtain the first reference voltage Vref 1 determined by circuit design and the second reference voltage Vref 2.
Based on earphone detection circuit shown in Fig. 3, the flow packet of the earphone detecting method of the embodiment of the present invention shown in fig. 6
It includes:
Step S11, judges whether the first test side connect with the first interface of earphone;If so then execute step S12, if not
Then repeat step S11.Judge that the first test side HEADSET_L_INT is by first detection signal AUDIO_HEAD_INSERT1
It is no to be connect with the first interface of earphone.
Step S12, judges whether the second test side connect with the second interface of earphone, if so then execute step S13, if not
Then perform step S11.By second detection signal AUDIO_HEAD_INSERT judge the second test side HEADMIC_IN whether with
The second interface connection of earphone.
Step S13 confirms that earphone is inserted into.After confirming that earphone is inserted into, it can continue to detect the second test side HEADMIC_
The voltage of IN, with the push-button type for determining whether button triggering and being triggered.
Based on earphone detection circuit shown in Fig. 3, the flow packet of the earphone detecting method of the embodiment of the present invention shown in Fig. 7
It includes:
Step S21, judges whether the first test side connect with the first interface of earphone, if so then execute step S22, if not
Then repeat step S21.Judge that the first test side HEADSET_L_INT is by first detection signal AUDIO_HEAD_INSERT1
It is no to be connect with the first interface of earphone.
Step S22 starts second source.
Step S23, judges whether the second test side connect with the second interface of earphone, if so then execute step S24, if not
Then perform step S25.By second detection signal AUDIO_HEAD_INSERT judge the second test side HEADMIC_IN whether with
The second interface connection of earphone.
Step S24 confirms that earphone is inserted into.
Step S25, judges whether the first test side connect with the first interface of earphone, if so then execute step S23, if not
Then perform step S26.
Step S26 closes second source, continues to execute step S21.
Based on earphone detection circuit shown in Fig. 3, the electronic equipment of the embodiment of the present invention shown in Fig. 8 includes earphone interface
Circuit A1, earphone detection circuit A2 and headset detection device A3.Earphone detection circuit A2 is suitable for connecting with earphone interface circuit A1,
Concrete structure can refer to the above-mentioned explanation to earphone detection circuit shown in Fig. 3.As shown in figure 8, the headset detection dress
It puts A3 and can be used to implement earphone detecting method shown in Fig. 7, including:First judging unit A31, confirmation unit(Do not show in figure
Go out)With startup control unit A34.
First judging unit A31 is suitable for the first detection signal AUDIO_HEAD_ exported by earphone detection circuit A2
INSERT1 judges whether the first test side HEADSET_L_INT connect with the first interface of earphone.
It is yes, i.e., described first test side and ear that the confirmation unit, which is suitable for when the judging result of the first judging unit A31,
During the first interface connection of machine, confirm whether earphone is inserted at least through the signal for detecting second test side.The present embodiment
Confirmation unit include second judgment unit A32 and confirm subelement A33.
It is yes, i.e. the first test side that second judgment unit A32, which is suitable for when the judging result of the first judging unit A31,
The first interface of HEADSET_L_INT and earphone connect when, by earphone detection circuit A2 export second detection signal
AUDIO_HEAD_INSERT judges whether the second test side HEADMIC_IN connect with the second interface of earphone.
It is yes, i.e. the second test side HEADMIC_ to confirm that subelement A33 is suitable for when the judging result of second judgment unit A32
When the second interface of IN and earphone connects, confirm that earphone is inserted into.
Start control unit A34 and be suitable for when the judging result of the first judging unit A31 being yes, i.e., when the first test side
When the first interface of HEADSET_L_INT and earphone connects, exported in second judgment unit A32 by earphone detection circuit A2
Second detection signal AUDIO_HEAD_INSERT judges whether the second test side HEADMIC_IN connect with the second interface of earphone
Before, start the second source HEADMICBIAS of the earphone interface circuit A1.In other embodiments, the headset detection dress
It puts and can be used to implement earphone detecting method shown in fig. 6, then can not also include starting control unit A34.
It also is able to confirm that the earphone being inserted into is three-section earphone or four sections when earphone is inserted into and detects in order to realize
Formula earphone, the earphone detection circuit of the embodiment of the present invention shown in Fig. 9 compared to Fig. 3, further include the first switch unit ADC_
SEL and AD conversion unit 3, the first switch unit ADC_SEL are suitable for the first test side HEADSET_L_INT of switching, the second inspection
The connection of end HEADMIC_IN and AD conversion unit 3 are surveyed, AD conversion unit 3 is suitable for carrying out modulus turn to the voltage of input
It changes, to determine the voltage value of the voltage value of the first test side HEADSET_L_INT or the second test side HEADMIC_IN, modulus turns
The digital signal Vout of the output of unit 3 is changed to represent voltage value.The startup of AD conversion unit 3 can be by first detection signal
The detection signal AUDIO_HEAD_INSERT triggerings of AUDIO_HEAD_INSERT1 or second, such AD conversion unit is only the
It is opened when unlatching or earphone are inserted into when one test side is connected with first interface, circuit work(can also be reduced to a certain extent
Consumption.
Furthermore, it is contemplated that there are two types of four-section type headset interface standards, OMTP standards as described in Figure 1 and as shown in Figure 2
CTIA standards, in order to be compatible with two kinds of standards, the earphone interface circuit of the present embodiment is as shown in Figure 10, compared to Fig. 1, further includes
Two switch unit SW, suitable for switch the second interface of earphone, third interface and the second test side HEADMIC_IN, ground terminal it is corresponding
Connection.Wherein, according to insertion sequence, second interface is the third interface of earphone inserting paragraph, can be microphone MIC interfaces or
Person is ground wire GND interfaces, accordingly, third interface be earphone inserting paragraph the 4th interface, can be ground wire GND interfaces or
It is microphone MIC interfaces.Second switch unit SW includes two analog switch, respectively controlling second interface and second
Test side HEADMIC_IN is connected, third interface is connected with ground terminal, and after switching, two simulations of the second switch unit SW are cut
Change switch respectively second interface to be controlled to be connected with ground terminal, third interface is connected with the second test side HEADMIC_IN.
Based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10, the present invention shown in Figure 11 is real
The flow of the earphone detecting method of example is applied, compared to Fig. 7, is further included:
Before step S21, first carry out step S20, the second switch unit of control make the second test side, ground terminal be respectively adapted to
Second interface, third interface are connected.Earphone interface is first defaulted as OMTP standards by the present embodiment before test earphone insertion,
Control two analog switch of the second switch unit SW so that the second test side HEADMIC_IN is suitable for and second interface
It is connected, ground terminal is suitable for being connected with third interface.
After step S24 confirms that earphone is inserted into, start AD conversion unit 3, perform step S27, the first switching of control is single
Member the first test side of switching and the connection of AD conversion unit and the connection of the second test side and AD conversion unit, read respectively
The digital signal that AD conversion unit is taken to export, to obtain the voltage value of the voltage value of the first test side and the second test side.Tool
Body can include, and the first switch unit ADC_SEL of control connects the first test side HEADSET_L_INT and AD conversion unit 3,
The digital signal Vout that AD conversion unit 3 exports is read, to obtain the voltage value of the first test side HEADSET_L_INT;So
Afterwards, switch the connection of AD conversion unit 3, that is, the first switch unit ADC_SEL is controlled to connect the second test side HEADMIC_IN
With AD conversion unit 3, the digital signal Vout that AD conversion unit 3 exports is read, to obtain the second test side HEADMIC_
The voltage value of IN.It should be noted that the first inspection can be obtained by way of repeatedly reading digital signal Vout and being averaging
Survey the voltage value of end HEADSET_L_INT and the voltage value of the second test side HEADMIC_IN.
Then step S28 is performed, judges whether the voltage value of the first test side is equal with the voltage value of the second test side, if
Otherwise step S29 is performed, if so then execute step S30.In the present embodiment, if the earphone being inserted into is OMTP standards, earphone
Internal circuit be as Fig. 1 lower half portion circuit, the voltage value of the first test side HEADSET_L_INT is resistance R2 and resistance
R4 is to the voltage of the first power vd D_IO, normally close in 0V;The voltage value of second test side HEADMIC_IN is resistance
R1 and microphone Mic is to the voltage of second source HEADMICBIAS, generally between 1V~2V.
Step S29, it is four-section type headset to determine the earphone being inserted into.
Step S30, judges whether the voltage value of the first test side and the voltage value of the second test side are respectively less than voltage threshold,
If so then execute step S31, if otherwise performing step S32.The voltage threshold is according to the internal circuit and earphone interface of earphone
The structure and component parameters of circuit determine, in the present embodiment, set the voltage and second source of the first power vd D_IO
The voltage of HEADMICBIAS is equal or approximately equal, if the earphone being inserted into is three-section earphone, resistance R2, R4, R1 are serially connected in
Between first power vd D_IO and second source HEADMICBIAS, then the voltage-mode analog values of the first test side HEADSET_L_INT
Voltage-mode analog values with the second test side HEADMIC_IN are equal or approximately equal and are close to 0V, after analog-to-digital conversion
Digital value is equal;If the earphone being inserted into is CTIA standards, the internal circuit of earphone is the lower half portion circuit such as Fig. 2,
Resistance R2, R4 and diode D0 are serially connected between the first power vd D_IO and ground terminal, and resistance R1 and diode D0 are serially connected in second
Between power supply HEADMICBIAS and ground terminal, the resistance value of the resistance value specific resistance R2 of resistance R4 is much smaller, the first test side HEADSET_
The voltage-mode analog values of L_INT and the voltage-mode analog values of the second test side HEADMIC_IN are approximately equal and are led with diode
The pressure that is powered is related, and the digital value after analog-to-digital conversion is equal.Based on this, a voltage threshold can be set to distinguish three sections
Formula earphone and four-section type headset, such as voltage threshold can be set as 0.4V.
Step S31, it is three-section earphone to determine the earphone being inserted into.
Step S32, the second switch unit of control switch into line interface.Can be specifically, the second switch unit SW's of control
Two analog switch switch over so that ground terminal with second interface suitable for being connected, the second test side HEADMIC_IN is fitted
It is connected in third interface.
Continue to execute step S33, the first switch unit of control switch the connection of the first test side and AD conversion unit with
And second test side and AD conversion unit connection, the digital signal of AD conversion unit output is read respectively, to obtain the
The voltage value of one test side and the voltage value of the second test side.Step S27 can specifically be referred to.
Step S34 judges whether the voltage value of the first test side is equal with the voltage value of the second test side, if otherwise performing
Step S29, if so then execute step S35.In the present embodiment, if the earphone being inserted into is CTIA standards, the internal circuit of earphone
For the lower half portion circuit of such as Fig. 2, after the interface switching of the second switch unit, the first test side HEADSET_L_INT's
Voltage value is the voltage of resistance R2 and resistance R4 to the first power vd D_IO, normally close in 0V;Second test side
The voltage value of HEADMIC_IN is the voltage of resistance R1 and microphone Mic to second source HEADMICBIAS, generally in 1V
Between~2V.
Step S35 prompts electronic equipment not support the earphone being inserted into.
It should be noted that in the ear based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10
In the other embodiment of machine testing method, it can also be including process step shown in fig. 6 and above-mentioned step S20, step
S27 to S35, that is, second source can remain opening.
Based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10, the present invention shown in Figure 12 is real
The flow of the earphone detecting method of example is applied, compared to Figure 11, is omitted by the way that whether the second detection signal judges the second test side
The step of being connect with second interface, when being connect in the first test side with first interface, the electricity directly by detecting the first test side
The voltage value of pressure value and the second test side judges the type of earphone that whether earphone is inserted into and is inserted into, and which simplify detection streams
Journey.
As shown in figure 12, step S20 is performed, the second switch unit of control makes the second test side, ground terminal be respectively adapted to and the
Two interfaces, third interface are connected.
Step S21, judges whether the first test side connect with the first interface of earphone, if so then execute step S22, if not
Then repeat step S21.
Step S22 starts second source.
Step S27, the first switch unit of control switch the connection and the second inspection of the first test side and AD conversion unit
The connection of end and AD conversion unit is surveyed, the digital signal of AD conversion unit output is read respectively, to obtain the first test side
Voltage value and the second test side voltage value.
Step S28 judges whether the voltage value of the first test side is equal with the voltage value of the second test side, if otherwise performing
Step S29a, if so then execute step S30.
Step S29a confirms that earphone is inserted into, and is four-section type headset.
Step S30, judges whether the voltage value of the first test side and the voltage value of the second test side are respectively less than voltage threshold,
If so then execute step S31a, if otherwise performing step S32.
Step S31a confirms that earphone is inserted into, and is three-section earphone.
Step S32, the second switch unit of control switch into line interface.
Step S33, the first switch unit of control switch the connection and the second inspection of the first test side and AD conversion unit
The connection of end and AD conversion unit is surveyed, the digital signal of AD conversion unit output is read respectively, to obtain the first test side
Voltage value and the second test side voltage value.
Step S34 judges whether the voltage value of the first test side is equal with the voltage value of second test side, if otherwise
Step S29a is performed, if so then execute step S35.
Step S35 prompts electronic equipment not support the earphone being inserted into.
The explanation for the step of explanation of part steps shown in Figure 12 can be referred in above-described embodiment to identical label.It needs
If it is always what is opened to be noted that second source, it is convenient to omit the step S22 of the earphone detecting method shown in Figure 12.
It is appreciated that the embodiment flow of corresponding diagram 11, the signal at least through the second test side of detection confirm ear
Whether machine, which is inserted into, to include:Detect the signal of the second test side, with judge second test side whether second with earphone
Interface connects;When the second interface of second test side and earphone connects, confirm that earphone is inserted into.The embodiment of corresponding diagram 12
Flow, the signal at least through the second test side of detection confirm whether earphone is inserted into and can include:Detecting described
When the first interface of one test side and earphone connects, the voltage value of first test side and second test side are read respectively
Voltage value;If the voltage value of first test side and the voltage value of second test side are unequal, confirm that earphone is inserted
Enter and for four-section type headset;If the voltage value of first test side is equal with the voltage value of second test side and less than electricity
Threshold value is pressed, then confirms that earphone is inserted into and for three-section earphone.
Based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10, the present invention shown in Figure 13 is real
The electronic equipment for applying example includes earphone interface circuit A1 ', earphone detection circuit A2 ' and headset detection device A3 '.Headset detection electricity
Road A2 ' suitable for being connect with earphone interface circuit A1 ', concrete structure can refer to it is above-mentioned to earphone detection circuit shown in Fig. 9 and
The explanation of earphone interface circuit shown in Fig. 10.As shown in figure 13, the headset detection device A3 ' is used to implement shown in Figure 11
Earphone detecting method, compared with headset detection device A3 shown in Fig. 8, further include:Reading unit A35, type confirmation unit
A36 and switch control unit A37.
Reading unit A35 is suitable for after confirming that subelement A34 confirms that earphone is inserted into, and the of control earphone detection circuit A2 '
One switch unit ADC_SEL connects the first test side HEADSET_L_INT and AD conversion unit 3, reads AD conversion unit 3
The digital signal Vout of output, to obtain the voltage value of the first test side HEADSET_L_INT;Control the first switch unit
ADC_SEL connects the second test side HEADMIC_IN and AD conversion unit 3, reads the number letter that AD conversion unit 3 exports
Number Vout, to obtain the voltage value of the second test side HEADMIC_IN.
Type confirmation unit A36 is connected with reading unit A35, suitable for when the electricity of the first test side HEADSET_L_INT
Pressure value and the voltage value of the second test side HEADMIC_IN are unequal, it is determined that the earphone of insertion is four-section type headset;When first
The voltage value of test side HEADSET_L_INT is equal with the voltage value of the second test side HEADMIC_IN and is less than voltage threshold,
The earphone for then determining to be inserted into is three-section earphone.
Switch control unit A37 is suitable for voltage value and the second test side as the first test side HEADSET_L_INT
The voltage value of HEADMIC_IN is equal and more than voltage threshold, then the second switch unit SW of earphone interface circuit A1 ' is controlled to cut
Change second interface, third interface and the second test side HEADMIC_IN, ground terminal are correspondingly connected with;Type confirmation unit A36 is also suitable
After being connected in switching interface, voltage value and the second inspection of the first test side HEADSET_L_INT are obtained by reading unit A35
The voltage value of end HEADMIC_IN is surveyed, if the voltage value of the first test side HEADSET_L_INT and the second test side HEADMIC_
The voltage value of IN is unequal, it is determined that the earphone of insertion is four-section type headset.
First judging unit A31, second judgment unit A32, confirm subelement A33 and start the explanation of control unit A34
It can be with the explanation of the unit of the identical label in reference pair electronic equipment shown in Fig. 8.
Based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in Fig. 10, the present invention shown in Figure 14 is real
The electronic equipment for applying example includes earphone interface circuit A1 ', earphone detection circuit A2 ' and headset detection device B3.Headset detection electricity
Road A2 ' suitable for being connect with earphone interface circuit A1 ', concrete structure can refer to it is above-mentioned to earphone detection circuit shown in Fig. 9 and
The explanation of earphone interface circuit shown in Fig. 10.As shown in figure 14, the headset detection device B3 is used to implement shown in Figure 12
Earphone detecting method, including:First judging unit B31, start control unit B34, confirmation unit(It is not shown in figure)With cut
Change control unit B37.
First judging unit B31 is suitable for the first detection signal AUDIO_HEAD_ by earphone detection circuit A2 ' outputs
INSERT1 judges whether the first test side HEADSET_L_INT connect with the first interface of earphone.
It is yes, i.e., described first test side and ear that the confirmation unit, which is suitable for when the judging result of the first judging unit A31,
During the first interface connection of machine, confirm whether earphone is inserted at least through the signal for detecting second test side.The present embodiment
Confirmation unit include reading unit B35 and type confirmation unit B36.
Reading unit B35 is yes suitable for the judging result in the first judging unit B31, i.e., as the first test side HEADSET_
When the first interface of L_INT and earphone connects, the first switch unit ADC_SEL connections first of control earphone detection circuit A2 '
Test side HEADSET_L_INT and AD conversion unit 3 read the digital signal Vout that AD conversion unit 3 exports, to obtain
The voltage value of the first test side HEADSET_L_INT;The first switch unit ADC_SEL is controlled to connect the second test side
HEADMIC_IN and AD conversion unit 3 read the digital signal Vout that AD conversion unit 3 exports, to obtain the second detection
Hold the voltage value of HEADMIC_IN.
Start control unit B34 and be suitable for when the judging result of the first judging unit B31 being yes, i.e., when the first test side
When the first interface of HEADSET_L_INT and earphone connects, before reading unit B35 reads voltage value, start the earphone and connect
The second source HEADMICBIAS of mouth circuit A1 '.In other embodiments, the headset detection device can not also include opening
Dynamic control unit B34.
Type confirmation unit B36 is connected with reading unit B35, suitable for when the electricity of the first test side HEADSET_L_INT
Pressure value and the voltage value of the second test side HEADMIC_IN are unequal, then confirm that earphone is inserted into and for four-section type headset;When first
The voltage value of test side HEADSET_L_INT is equal with the voltage value of the second test side HEADMIC_IN and is less than voltage threshold,
Then confirm that earphone is inserted into and for three-section earphone.
Switch control unit B37 is suitable for voltage value and the second test side as the first test side HEADSET_L_INT
The voltage value of HEADMIC_IN is equal and more than voltage threshold, then the second switch unit SW of earphone interface circuit A1 ' is controlled to cut
Change second interface, third interface and the second test side HEADMIC_IN, ground terminal are correspondingly connected with;Type confirmation unit B36 is also suitable
After being connected in switching interface, voltage value and the second inspection of the first test side HEADSET_L_INT are obtained by reading unit B35
The voltage value of end HEADMIC_IN is surveyed, if the voltage value of the first test side HEADSET_L_INT and the second test side HEADMIC_
The voltage value of IN is unequal, then confirms that earphone is inserted into and for four-section type headset.
In other embodiments of the invention, the feelings of two kinds of interface standards can be compatible with discounting for earphone interface circuit
Condition, such as earphone interface circuit is using the earphone interface circuit in head circuit shown in FIG. 1, i.e., it is single without the second switching
Member, then accordingly, the earphone detecting method based on earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in FIG. 1 can
To be to omit the step S32 to S34 in the flow shown in Figure 12, step is then performed when the judging result of step S30 is no
S35.Electronic equipment including earphone detection circuit shown in Fig. 9 and earphone interface circuit shown in FIG. 1 can be by Figure 14 institutes
Show that the switch control unit B37 in the headset detection device B3 of electronic equipment is omitted.
The earphone detecting method of above-described embodiment can also include:In the state of earphone insertion, when based on described first
The signal of test side determines that first test side is disconnected with first interface and signal based on second test side is true
When fixed second test side is disconnected with second interface, confirm that earphone is extracted;After confirming that earphone is extracted, described the is closed
Two power supplys.Accordingly, the confirmation unit is further adapted in a state that earphone is inserted into, when the signal based on first test side
Determine that first test side disconnects with first interface and determines second inspection based on the signal of second test side
When survey end is disconnected with second interface, confirm that earphone is extracted.The headset detection device can also include closing control unit,
The closing control unit is suitable for after confirming that earphone is extracted, and closes the second source.When it is implemented, first can be passed through
Detection signal judges whether first test side connect with first interface, judges second detection by the second detection signal
Whether end connect with second interface;First test side can also be judged by the voltage of the first test side is with first interface
No connection judges whether second test side connect with second interface by the voltage of the second test side.
Earphone detection circuit and earphone detecting method based on above-described embodiment, technical solution of the present invention also provide a kind of ear
Machine testing method, applied in electronic equipment, the specific implementation of following steps can refer to above-mentioned corresponding embodiment and attached drawing
Explanation.
The earphone detecting method includes:Detect the signal of the first test side, with judge first test side whether with
The first interface connection of earphone;In the first interface connection for detecting first test side and earphone, at least through detection
The signal of second test side confirms whether earphone is inserted into.First test side is adapted to the first interface of earphone, and described
The voltage of one test side is related to the voltage of the first power supply;Second test side is adapted to the second interface of earphone, described
The voltage of second test side is related to the voltage of second source.
In embodiments of the present invention, the signal at least through the second test side of detection confirms whether earphone is inserted into packet
It includes:The signal of the second test side is detected, to judge whether second test side connect with the second interface of earphone;When described
When the second interface of two test sides and earphone connects, confirm that earphone is inserted into.
The signal of the first test side of the detection includes comparing the first reference voltage and the voltage value of first test side,
First reference voltage is determined according to first test side and the connection structure of the first power supply, first interface.The detection
The signal of second test side includes comparing the second reference voltage and the voltage value of second test side, second reference voltage
It is determined according to second test side and the connection structure of second source, second interface.
In a particular embodiment, the earphone detecting method can also include:When first test side and earphone
When first interface connects, before the voltage for detecting the second test side, start the second source.
In a particular embodiment, the earphone detecting method can also include:After confirming that earphone is inserted into, read respectively
The voltage value of first test side and the voltage value of second test side;If the voltage value of first test side with it is described
The voltage value of second test side is unequal, it is determined that the earphone of insertion is four-section type headset;If the voltage of first test side
Value is equal with the voltage value of second test side and less than voltage threshold, it is determined that the earphone of insertion is three-section earphone.
Further, the earphone detecting method can also include:If the voltage value of first test side and described the
The voltage value of two test sides is equal and more than voltage threshold, then switches second interface, third interface and the described second inspection of earphone
Survey end, ground terminal is correspondingly connected with;After switching interface connection, if the voltage value of first test side and second test side
Voltage value it is unequal, it is determined that the earphone of insertion be four-section type headset.
In embodiments of the present invention, the signal of the first test side of the detection includes comparing the first reference voltage and described the
The voltage value of one test side, first reference voltage is according to first test side and the connection of the first power supply, first interface
Structure determination;It is described at least through detection the second test side signal confirm earphone whether be inserted into including:Detecting described
When the first interface of one test side and earphone connects, the voltage value of first test side and second test side are read respectively
Voltage value;If the voltage value of first test side and the voltage value of second test side are unequal, confirm that earphone is inserted
Enter and for four-section type headset;If the voltage value of first test side is equal with the voltage value of second test side and less than electricity
Threshold value is pressed, then confirms that earphone is inserted into and for three-section earphone.
In a particular embodiment, the earphone detecting method can also include:When the of first test side and earphone
When one interface connects, before voltage value is read, start the second source.
In a particular embodiment, the earphone detecting method can also include:If the voltage value of first test side with
The voltage value of second test side is equal and more than voltage threshold, then switch the second interface of earphone, third interface with it is described
Second test side, ground terminal are correspondingly connected with;After switching interface connection, if the voltage value of first test side and the described second inspection
The voltage value for surveying end is unequal, then confirms that earphone is inserted into and for four-section type headset.
In embodiments of the present invention, the earphone detecting method can also include:In the state of earphone insertion, based on institute
The signal for stating the first test side determines whether first test side disconnects with first interface, based on second test side
Signal determine whether second test side disconnects with second interface;First when first test side and earphone connects
When mouth disconnects and the second interface of second test side and earphone disconnects, confirm that earphone is extracted.
Further, the earphone detecting method can also include:After confirming that earphone is extracted, second electricity is closed
Source.
It will be understood by those skilled in the art that all or part of the earphone detecting method of above-described embodiment is can to pass through
Program is completed to instruct relevant hardware, and the program can be stored in computer readable storage medium, the storage
Medium can be ROM, RAM, magnetic disc or CD etc..
Although present disclosure is as above, present invention is not limited to this.Any those skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the range of restriction.
Claims (26)
1. a kind of electronic equipment, which is characterized in that including:Earphone detection circuit and headset detection device;
The earphone detection circuit includes:
First detection unit is adapted to detect for the signal of the first test side, to export first detection signal;It fits first test side
In the first interface of connection earphone, the voltage of first test side is related to the voltage of the first power supply;
Second detection unit is adapted to detect for the signal of the second test side, with output the second detection signal;It fits second test side
In the second interface of connection earphone, the voltage of second test side is related to the voltage of second source;
The first detection unit and second detection unit respectively include transistor and current source;
In the first detection unit, the first of transistor is extremely suitable to input the first reference voltage, and second is extremely suitable to and described the
One test side is connected, and third is extremely suitable to power end be connected by current source and suitable for output first detection signal;It is described
First reference voltage is determined according to first test side and the connection structure of the first power supply, first interface;
In the second detection unit, the first of transistor is extremely suitable to input the second reference voltage, and second is extremely suitable to and described the
Two test sides are connected, and third is extremely suitable to power end be connected by current source and suitable for output the second detection signal;It is described
Second reference voltage is determined according to second test side and the connection structure of second source, second interface;
The headset detection device includes:
First judging unit, the first detection signal suitable for being exported by the earphone detection circuit judge first test side
Whether it is connect with the first interface of earphone;
Confirmation unit, suitable for when the first interface of first test side and earphone connects, at least through detection described second
The signal of test side confirms whether earphone is inserted into;
The earphone detection circuit further includes:First switch unit and AD conversion unit;
First switch unit is suitable for switching first test side, the second test side and the company of the AD conversion unit
It connects;The AD conversion unit is suitable for carrying out analog-to-digital conversion to the voltage of input, to determine the voltage value of first test side
Or second test side voltage value;
The confirmation unit includes:
Reading unit, suitable for when the first interface of first test side and earphone connects, controlling first switch unit
First test side and the AD conversion unit are connected, the digital signal of AD conversion unit output is read, to obtain
State the voltage value of the first test side;First switch unit is controlled to connect second test side and the analog-to-digital conversion list
Member reads the digital signal of AD conversion unit output, to obtain the voltage value of second test side;
Type confirmation unit, it is unequal suitable for working as the voltage value of first test side and the voltage value of second test side,
Then confirm that earphone is inserted into and for four-section type headset;When the voltage value of first test side and the voltage value of second test side
It is equal and less than voltage threshold, then confirm that earphone is inserted into and for three-section earphone.
2. electronic equipment as described in claim 1, which is characterized in that the startup of the second source is based on the described first detection
Signal and trigger.
3. electronic equipment as described in claim 1, which is characterized in that the transistor is PMOS tube, the described first extremely grid
Pole, the described second extremely source electrode, third extremely drain, and the power end is operating voltage input terminal;Alternatively, the crystal
It manages as NMOS tube, the described first extremely grid, the described second extremely source electrode, third extremely drains, and the power end is ground
End.
4. electronic equipment as described in claim 1, which is characterized in that the first detection unit and second detection unit are also divided
Do not include:Phase inverter is connected suitable for the third pole with transistor.
5. electronic equipment as described in claim 1, which is characterized in that the first interface be left channel interface, described second
Interface is microphone interface or interface of the ground wire.
6. electronic equipment as described in claim 1, which is characterized in that further include:First switch unit and AD conversion unit,
First switch unit is suitable for switching first test side, the second test side and the connection of the AD conversion unit, institute
It states AD conversion unit to be suitable for carrying out analog-to-digital conversion to the voltage of input, to determine the voltage value or second of first test side
The voltage value of test side.
7. electronic equipment as claimed in claim 6, which is characterized in that the AD conversion unit, which is based on the described first detection, to be believed
Number or second detection signal and trigger.
8. electronic equipment as described in claim 1, which is characterized in that the earphone detection circuit is suitable for and earphone interface circuit
Connection;The earphone interface circuit includes first test side, the second test side, the first power supply, second source and ground terminal, also
Including the second switch unit, second switch unit is suitable for the second interface of switching earphone, third interface and the described second inspection
Survey end, ground terminal is correspondingly connected with.
9. electronic equipment as described in claim 1, which is characterized in that the confirmation unit includes:
Second judgment unit, suitable for when the first interface of first test side and earphone connects, passing through the headset detection
Second detection signal of circuit output judges whether second test side connect with the second interface of earphone;
Subelement is confirmed, suitable for when the second interface of second test side and earphone connects, confirming that earphone is inserted into.
10. electronic equipment as claimed in claim 9, which is characterized in that it is single that the headset detection device further includes startup control
Member, the startup control unit are suitable for when the first interface of first test side and earphone connects, and are passing through described second
Before detection signal judges whether second test side connect with the second interface of earphone, start the second source.
11. electronic equipment as claimed in claim 9, which is characterized in that
The earphone detection circuit further includes:First switch unit and AD conversion unit;
First switch unit is suitable for switching first test side, the second test side and the company of the AD conversion unit
It connects;The AD conversion unit is suitable for carrying out analog-to-digital conversion to the voltage of input, to determine the voltage value of first test side
Or second test side voltage value;
The headset detection device further includes:Reading unit and type confirmation unit;
The reading unit is suitable for after confirming that earphone is inserted into, control first switch unit connect first test side with
The AD conversion unit reads the digital signal of AD conversion unit output, to obtain the voltage value of first test side;
First switch unit is controlled to connect second test side and the AD conversion unit, reads AD conversion unit output
Digital signal, to obtain the voltage value of second test side;
The type confirmation unit is suitable for the voltage value not phase when voltage value and second test side of first test side
Deng, it is determined that the earphone of insertion is four-section type headset;When the voltage value of first test side and the electricity of second test side
Pressure value is equal and less than voltage threshold, it is determined that the earphone of insertion is three-section earphone.
12. electronic equipment as claimed in claim 11, which is characterized in that the earphone detection circuit is suitable for and earphone interface electricity
Road connects;The earphone interface circuit includes first test side, the second test side, the first power supply, second source and ground terminal,
The second switch unit is further included, second switch unit is suitable for the second interface of switching earphone, third interface and described second
Test side, ground terminal are correspondingly connected with;
The headset detection device further includes switch control unit, and the switch control unit is suitable for when first test side
Voltage value is equal with the voltage value of second test side and more than voltage threshold, then controls the second switch unit switching the
Two interfaces, third interface and second test side, ground terminal are correspondingly connected with;
The type confirmation unit is further adapted for after switching interface connects, if the voltage value of first test side and described second
The voltage value of test side is unequal, it is determined that the earphone of insertion is four-section type headset.
13. electronic equipment as described in claim 1, which is characterized in that it is single that the headset detection device further includes startup control
Member, the startup control unit is suitable for when the first interface of first test side and earphone connects, in the reading unit
Before reading voltage value, start the second source.
14. electronic equipment as described in claim 1, which is characterized in that the earphone detection circuit is suitable for and earphone interface electricity
Road connects;The earphone interface circuit includes first test side, the second test side, the first power supply, second source and ground terminal,
The second switch unit is further included, second switch unit is suitable for the second interface of switching earphone, third interface and described second
Test side, ground terminal are correspondingly connected with;
The headset detection device further includes switch control unit, and the switch control unit is suitable for when first test side
Voltage value is equal with the voltage value of second test side and more than voltage threshold, then controls the second switch unit switching the
Two interfaces, third interface and second test side, ground terminal are correspondingly connected with;
The type confirmation unit is further adapted for after switching interface connects, if the voltage value of first test side and described second
The voltage value of test side is unequal, then confirms that earphone is inserted into and for four-section type headset.
15. such as claim 1 to 14 any one of them electronic equipment, which is characterized in that
The confirmation unit is further adapted in a state that earphone is inserted into, when the signal based on first test side determines described the
One test side disconnects with first interface and determines second test side and second based on the signal of second test side
When interface disconnects, confirm that earphone is extracted.
16. electronic equipment as claimed in claim 15, which is characterized in that the headset detection device further includes closing control list
Member, the closing control unit are suitable for after confirming that earphone is extracted, and close the second source.
17. a kind of earphone detecting method, which is characterized in that including:
The signal of the first test side is detected, to judge whether first test side connect with the first interface of earphone;Described
One test side is adapted to the first interface of earphone, and the voltage of first test side is related to the voltage of the first power supply;
In the first interface connection for detecting first test side and earphone, at least through the signal of the second test side of detection
Confirm whether earphone is inserted into;Second test side is adapted to the second interface of earphone, the voltage of second test side with
The voltage of second source is related;
The signal of the first test side of the detection includes comparing the first reference voltage and the voltage value of first test side, described
First reference voltage is determined according to first test side and the connection structure of the first power supply, first interface;
It is described at least through detection the second test side signal confirm earphone whether be inserted into including:
In the first interface connection for detecting first test side and earphone, the voltage of first test side is read respectively
Value and the voltage value of second test side;
If the voltage value of first test side and the voltage value of second test side are unequal, confirm that earphone is inserted into and is
Four-section type headset;
If the voltage value of first test side is equal with the voltage value of second test side and less than voltage threshold, confirm
Earphone is inserted into and is three-section earphone.
18. earphone detecting method as claimed in claim 17, which is characterized in that described at least through second test side of detection
Signal confirm earphone whether be inserted into including:
The signal of the second test side is detected, to judge whether second test side connect with the second interface of earphone;
When the second interface of second test side and earphone connects, confirm that earphone is inserted into.
19. earphone detecting method as claimed in claim 18, which is characterized in that
The signal of the first test side of the detection includes comparing the first reference voltage and the voltage value of first test side, described
First reference voltage is determined according to first test side and the connection structure of the first power supply, first interface;
The signal of the second test side of the detection includes comparing the second reference voltage and the voltage value of second test side, described
Second reference voltage is determined according to second test side and the connection structure of second source, second interface.
20. earphone detecting method as claimed in claim 18, which is characterized in that further include:When first test side and ear
During the first interface connection of machine, before the voltage for detecting the second test side, start the second source.
21. earphone detecting method as claimed in claim 18, which is characterized in that further include:
After confirming that earphone is inserted into, the voltage value of first test side and the voltage value of second test side are read respectively;
If the voltage value of first test side and the voltage value of second test side are unequal, it is determined that the earphone of insertion is
Four-section type headset;
If the voltage value of first test side is equal with the voltage value of second test side and less than voltage threshold, it is determined that
The earphone of insertion is three-section earphone.
22. earphone detecting method as claimed in claim 21, which is characterized in that further include:
If the voltage value of first test side is equal with the voltage value of second test side and more than voltage threshold, switch
The second interface of earphone, third interface and second test side, ground terminal are correspondingly connected with;
After switching interface connection, if the voltage value of first test side and the voltage value of second test side are unequal,
The earphone for then determining to be inserted into is four-section type headset.
23. earphone detecting method as claimed in claim 17, which is characterized in that further include:When first test side and ear
During the first interface connection of machine, before voltage value is read, start the second source.
24. earphone detecting method as claimed in claim 17, which is characterized in that further include:
If the voltage value of first test side is equal with the voltage value of second test side and more than voltage threshold, switch
The second interface of earphone, third interface and second test side, ground terminal are correspondingly connected with;
After switching interface connection, if the voltage value of first test side and the voltage value of second test side are unequal,
Then confirm that earphone is inserted into and for four-section type headset.
25. such as claim 17 to 24 any one of them earphone detecting method, which is characterized in that further include:
In the state of earphone insertion, determine whether first test side connects with first based on the signal of first test side
It mouthful disconnects, determines whether second test side disconnects with second interface based on the signal of second test side;
When the first interface of first test side and earphone disconnects and the second interface of second test side and earphone
When disconnecting, confirm that earphone is extracted.
26. earphone detecting method as claimed in claim 25, which is characterized in that further include:After confirming that earphone is extracted, close
The second source.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310626973.1A CN104683914B (en) | 2013-11-28 | 2013-11-28 | Electronic equipment and earphone detection circuit, method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310626973.1A CN104683914B (en) | 2013-11-28 | 2013-11-28 | Electronic equipment and earphone detection circuit, method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104683914A CN104683914A (en) | 2015-06-03 |
CN104683914B true CN104683914B (en) | 2018-06-22 |
Family
ID=53318384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310626973.1A Active CN104683914B (en) | 2013-11-28 | 2013-11-28 | Electronic equipment and earphone detection circuit, method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104683914B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105101001B (en) * | 2015-09-18 | 2018-03-16 | 青岛海信移动通信技术股份有限公司 | Earphone recognition apparatus and terminal device |
CN107172515A (en) * | 2017-05-19 | 2017-09-15 | 青岛海信移动通信技术股份有限公司 | Test earphone plug is inserted in mobile terminal detection circuit and mobile terminal |
CN109417667B (en) * | 2017-06-20 | 2021-06-22 | 华为技术有限公司 | Audio control method, circuit, graphical user interface, electronic equipment and storage medium |
CN107071650A (en) * | 2017-06-26 | 2017-08-18 | 深圳天珑无线科技有限公司 | Earphone detection circuit, method and terminal |
CN116261081B (en) * | 2023-05-16 | 2023-08-01 | 合肥联宝信息技术有限公司 | Earphone circuit and control method thereof |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201349247Y (en) * | 2008-12-22 | 2009-11-18 | 宇龙计算机通信科技(深圳)有限公司 | Earphone interface circuit and movable termination |
CN101610439A (en) * | 2008-06-19 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | Electronic installation |
CN101783986A (en) * | 2010-03-17 | 2010-07-21 | 青岛海信移动通信技术股份有限公司 | Earphone interface circuit and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101820730B1 (en) * | 2011-12-13 | 2018-03-09 | 삼성전자 주식회사 | Detecting System For connecting of Earphone And Electric Device supporting the same |
-
2013
- 2013-11-28 CN CN201310626973.1A patent/CN104683914B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101610439A (en) * | 2008-06-19 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | Electronic installation |
CN201349247Y (en) * | 2008-12-22 | 2009-11-18 | 宇龙计算机通信科技(深圳)有限公司 | Earphone interface circuit and movable termination |
CN101783986A (en) * | 2010-03-17 | 2010-07-21 | 青岛海信移动通信技术股份有限公司 | Earphone interface circuit and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN104683914A (en) | 2015-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104683914B (en) | Electronic equipment and earphone detection circuit, method and apparatus | |
US8193834B2 (en) | Multiple detection circuit for accessory jacks | |
CN101951446B (en) | It is connected to the detection of the ancillary equipment of electronic equipment via audio/video plug, identifies and operate | |
US9591421B2 (en) | Audio jack detection circuit | |
KR101519316B1 (en) | Audio interface self-adaptation device | |
US10237658B2 (en) | Plug type detection | |
CN101783986B (en) | Earphone interface circuit and electronic equipment | |
CN103200512B (en) | Burr detects circuit and the method for detecting burr | |
CN103945317B (en) | Detection method and detection circuit for test earphone joint categories | |
EP2885924A1 (en) | Headset type detection and configuration techniques | |
US8509857B2 (en) | Headsets | |
CN102780949B (en) | Method and device for automatically identifying MAC (Media Access Control) pin and ground pin of audio interface | |
CN104683915B (en) | Electronic equipment and earphone detection circuit, method and apparatus | |
CN109313494A (en) | Earphone, terminal and control method | |
CN107040835A (en) | Headphone device | |
KR20150008941A (en) | Method, device, and electronic signature tool for audio interface self-adaptation | |
CN103634723B (en) | Audio input circuit and the electronic equipment with audio input | |
CN104703110A (en) | Horn state diagnosis circuit | |
CN106338937A (en) | Device and method for generating output signal based on detected load resistance value | |
CN104735570B (en) | The circuit and head circuit of interface voltage are provided to earphone interface circuit | |
CN202750222U (en) | Audio frequency input circuit and electronic equipment with audio frequency input | |
CN104969568B (en) | For the circuit of test earphone actuation of keys, terminal and earphone | |
CN108181578A (en) | A kind of detection circuit of switchgear, detection method and I/O control | |
CN204350278U (en) | Communication device | |
CN106412760B (en) | Earphone compatible device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |