CN104683915A - Electronic equipment and earphone detection circuit, method and device - Google Patents

Electronic equipment and earphone detection circuit, method and device Download PDF

Info

Publication number
CN104683915A
CN104683915A CN201310627106.XA CN201310627106A CN104683915A CN 104683915 A CN104683915 A CN 104683915A CN 201310627106 A CN201310627106 A CN 201310627106A CN 104683915 A CN104683915 A CN 104683915A
Authority
CN
China
Prior art keywords
test side
earphone
voltage
interface
magnitude
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.)
Granted
Application number
CN201310627106.XA
Other languages
Chinese (zh)
Other versions
CN104683915B (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201310627106.XA priority Critical patent/CN104683915B/en
Publication of CN104683915A publication Critical patent/CN104683915A/en
Application granted granted Critical
Publication of CN104683915B publication Critical patent/CN104683915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates electronic equipment, an earphone detection circuit, an earphone detection method and an earphone detection device. The earphone detection circuit comprises a first detection unit and a second detection unit, wherein the first detection unit is suitable for detecting a signal of a first detection end so as to output a first detection signal; the first detection end is suitable for being connected with a first interface of an earphone; a voltage of the first detection end is related to that of a first power supply; the second detection unit is suitable for detecting a signal of a second detection end so as to output a second detection signal; the second detection end is suitable for being connected with a second interface of the earphone; a voltage of the second detection end is related to that of a second power supply. According to the technical scheme adopted by the invention, whether the earphone is plugged in or pulled out is determined according to the signals of the two detection ends so as to enable plug-in or pull-out detection of the earphone to be more accurate.

Description

Electronic equipment and earphone detection circuit, method and apparatus
Technical field
The present invention relates to electronic circuit technology field, particularly relate to electronic equipment and earphone detection circuit, method and apparatus.
Background technology
The earphone interface standard of existing contact pin type has two kinds, and OMTP standard is as described in Figure 1 L channel L-R channel R-microphone MIC-ground wire GND, and CTIA standard is as shown in Figure 2 L channel L-R channel R-ground wire GND-microphone MIC.
After earphone inserts electronic equipment, L channel L interface contacts with shell fragment, and shell fragment is connected with the first power vd D_IO by resistance R2, one end contact resistance R2 of resistance R3, the other end of resistance R3 connects one end of test side HEADSET_L_INT and electric capacity C1, the other end ground connection of electric capacity C1.Ground wire GND interface is held with ground and is connected, and L channel L interface and R channel R interface are respectively by resistance R4 and R5 ground connection.Microphone MIC interface is connected with second source HEADMICBIAS by resistance R1, and microphone MIC interface is connected with test side HEADMIC_IN.Microphone MIC interface is also connected with microphone Mic, diode D0 and earphone keystroke Send_End, Vol+, Vol-.
In head circuit example shown in Fig. 1 or Fig. 2, the circuit of the first half is earphone interface circuit, for the internal circuit of electronic equipment, comprising: resistance R1, R2 and R3, electric capacity C1, test side HEADSET_L_INT and HEADMIC_IN, power vd D_IO and HEADMICBIAS and ground end; The circuit of the latter half is the internal circuit of earphone, comprising: resistance R4 and R5, microphone Mic, diode and earphone keystroke Send_End, Vol+, Vol-.
Whether whether can be inserted by Test earphone by test side HEADSET_L_INT, can be detected by test side HEADMIC_IN is had the button of earphone to trigger and confirms the type of button.Such as, can be compared voltage and the reference voltage of test side HEADSET_L_INT by comparator, comparative result exports earphone and inserts signal after de-twitter circuit.
But owing to only carrying out voltage detecting to determine whether earphone inserts to test side HEADSET_L_INT, when the inserting paragraph of earphone only has partial insertion not insert the earphone interface of electronic equipment in other words completely, the error detection that earphone inserts will be there is, can detect that earphone inserts by test side HEADSET_L_INT, but the button triggering whether having earphone and the type confirming button cannot be detected by test side HEADMIC_IN.
Summary of the invention
What technical solution of the present invention solved is the problem that the scheme of existing Test earphone exists error detection.
For solving the problem, technical solution of the present invention provides a kind of earphone detection circuit, comprising: the first detecting unit, is suitable for the signal of detection first test side, to export the first detection signal; Described first test side is suitable for the first interface of frames connecting with headphone, and the voltage of described first test side is relevant to the voltage of the first power supply; Second detecting unit, is suitable for the signal of detection second test side, to export the second detection signal; Described second test side is suitable for the second interface of frames connecting with headphone, and the voltage of described second test side is relevant to the voltage of second source.
For solving the problems of the technologies described above, technical solution of the present invention also provides a kind of earphone detecting method, comprising: the first detection signal exported by described earphone detection circuit judges whether described first test side is connected with the first interface of earphone; When described first test side is connected with the first interface of earphone, the signal at least by detecting described second test side confirms whether earphone inserts.
Optionally, described at least whether insertion by the signal confirmation earphone detecting described second test side is comprised: when described first test side is connected with the first interface of earphone, the second detection signal exported by described earphone detection circuit judges whether described second test side is connected with the second interface of earphone; When described second test side is connected with the second interface of earphone, confirm that earphone inserts.
Optionally, described earphone detecting method also comprises: when described first test side is connected with the first interface of earphone, before judging whether described second test side is connected with the second interface of earphone by described second detection signal, starts described second source.
Optionally, described earphone detection circuit also comprises the first switch unit and AD conversion unit, and described first switch unit is suitable for the connection switching described first test side, the second test side and described AD conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described earphone detecting method also comprises: after confirmation earphone inserts, control described first switch unit and be communicated with described first test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described first test side; Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described second test side; If the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then determine that the earphone inserted is four-section type headset; If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then determine that the earphone inserted is three-section earphone.
Optionally, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described earphone detecting method also comprises: if the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be greater than voltage threshold, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect; After switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then determine that the earphone inserted is four-section type headset.
Optionally, described earphone detection circuit also comprises the first switch unit and AD conversion unit, and described first switch unit is suitable for the connection switching described first test side, the second test side and described AD conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described at least whether insertion by the signal confirmation earphone detecting described second test side is comprised: control described first switch unit and be communicated with described first test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described first test side; Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described second test side; If the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset; If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then confirm that earphone inserts and is three-section earphone.
Optionally, described earphone detecting method also comprises: when described first test side is connected with the first interface of earphone, before described reading unit reads magnitude of voltage, starts described second source.
Optionally, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described earphone detecting method also comprises: if the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be greater than voltage threshold, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect; After switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset.
Optionally, described earphone detecting method also comprises: under the state that earphone inserts, signal based on described first test side determines whether described first test side disconnects with first interface, and the signal based on described second test side determines whether described second test side disconnects with the second interface; When the first interface of described first test side and earphone disconnects and the second interface of described second test side and earphone disconnects, confirm that earphone is extracted.
Optionally, described earphone detecting method also comprises: after confirmation earphone is extracted, close described second source.
For solving the problems of the technologies described above, technical solution of the present invention also provides a kind of headset detection device, comprising:
First judging unit, the first detection signal being suitable for being exported by described earphone detection circuit judges whether described first test side is connected with the first interface of earphone;
Confirmation unit, is suitable for when described first test side is connected with the first interface of earphone, and the signal at least by detecting described second test side confirms whether earphone inserts.
For solving the problems of the technologies described above, technical solution of the present invention also provides a kind of electronic equipment, described earphone detection circuit and described headset detection device.
Compared with prior art, technical scheme of the present invention has the following advantages:
Detect the signal of two test sides respectively, determine whether earphone inserts or extract according to the signal of two test sides, make the insertion of earphone/extract detection more accurate.
By voltage compare, detecting unit determines whether earphone interface is connected with test side, structure realizes simple.Detecting unit comprises transistor and current source, compares the comparator configuration adopting and realize with operational amplifier, and structure is simple, and can pass through current source control circuit power consumption.
Earphone interface circuit adopts the second switch unit switching interface to connect, and makes it possible to the detection of the four-section type headset of compatible three-section earphone and two kinds of standards, therefore applies more extensive.
Accompanying drawing explanation
Fig. 1 is the circuit connection structure schematic diagram after a kind of earphone inserts;
Fig. 2 is the circuit connection structure schematic diagram after another kind of earphone inserts;
Fig. 3 is the structural representation of the earphone detection circuit of the embodiment of the present invention;
Figure 4 and 5 are electrical block diagrams of the detecting unit of the earphone detection circuit of the embodiment of the present invention;
Fig. 6 and 7 is embodiment schematic flow sheets of the earphone detecting method based on the earphone detection circuit shown in Fig. 3;
Fig. 8 is the example structure schematic diagram of the electronic equipment comprising earphone detection circuit shown in Fig. 3;
Fig. 9 is the structural representation of the earphone detection circuit of the embodiment of the present invention;
Figure 10 is the structural representation of the earphone interface circuit of the embodiment of the present invention;
Figure 11 and 12 is embodiment schematic flow sheets of the earphone detecting method based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10;
Figure 13 and 14 is the example structure schematic diagram of the electronic equipment of the earphone interface circuit comprised shown in Fig. 9 shown in earphone detection circuit and Figure 10.
Embodiment
Technical solution of the present invention provides a kind of earphone detection circuit, comprising: the first detecting unit, is suitable for the signal of detection first test side, to export the first detection signal; Described first test side is suitable for the first interface of frames connecting with headphone, and the voltage of described first test side is relevant to the voltage of the first power supply;
Second detecting unit, is suitable for the signal of detection second test side, to export the second detection signal; Described second test side is suitable for the second interface of frames connecting with headphone, and the voltage of described second test side is relevant to the voltage of second source.
Described earphone detection circuit is suitable for being connected with earphone interface circuit, described earphone interface circuit comprises the first test side, the second test side, the first power supply and second source, and described first test side and the second test side are suitable for two distinct interfaces of frames connecting with headphone respectively.The inserting paragraph of earphone can be divided into three interfaces, comprises left channel interface, right channel interface and interface of the ground wire, is commonly referred to three-section earphone; Also can be divided into four interfaces, a microphone interface more than three-section earphone, is commonly referred to four-section type headset, as stated in the Background Art, generally has two kinds of interface standards.Described first interface generally refers to the interface inserted at first, arbitrary interface that described second interface inserts after can being.
Prior art only detects the signal of a test side to determine the insertion of earphone or to extract, the earphone detection circuit of technical solution of the present invention detects the signal of two test sides, by determining whether earphone inserts or extract to the input of two test sides, in the specific implementation, the signal detecting test side can be detect the detection signal corresponding with test side, also can be the voltage of direct-detection test side.Earphone portion is inserted or does not all insert and makes first interface is not connected with the first test side or the second interface is not connected with the second test side situation all be referred to as earphone not insert by technical solution of the present invention.
The voltage of described first test side is relevant to the voltage of the first power supply, and the voltage of described second test side is relevant to the voltage of second source.When earphone does not insert electronic equipment, the voltage of the first test side can be determined according to the syndeton of the first test side and the first power supply in earphone interface circuit, the voltage of the second test side can be determined according to the syndeton of the second test side and second source in earphone interface circuit.When earphone inserts the earphone interface of electronic equipment completely, the first interface of earphone inserting paragraph is connected with the first test side, second interface is connected with the second test side, syndeton according to the first test side and the first power supply, first interface can determine the voltage of the first test side, and the syndeton according to the second test side and second source, the second 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 all different when earphone inserts and do not insert respectively, the signal of detection two test sides is determined whether earphone inserts and can be realized by the voltage detecting the signal of two test sides, in a particular embodiment, described first detecting unit is suitable for the voltage comparing the first reference voltage and described first test side, to export the first detection signal, described first reference voltage is according to described first test side and the first power supply, the syndeton of first interface is determined, first detection signal is in order to represent whether the first test side is connected with first interface.Described second detecting unit is suitable for the voltage comparing the second reference voltage and described second test side, to export the second detection signal, described second reference voltage is determined according to the syndeton of described second test side and second source, the second interface, and the second detection signal is in order to represent whether the second test side is connected with the second interface.In other embodiments, described first detecting unit also can judge by the magnitude of voltage reading the first test side whether the first test side is connected with first interface, and described second detecting unit also can judge by the magnitude of voltage reading the second test side whether the second test side is connected with the second interface.
Further, the startup of described second source can trigger based on described first detection signal, and particularly, after earphone is extracted, second source is closed; When the first detection signal represents that the first test side is connected with first interface, trigger and open second source.Such second source is only opened when the first test side is connected with first interface, can reduce circuit power consumption to a certain extent.
Based on above-mentioned earphone detection circuit, the earphone detecting method of technical solution of the present invention comprises: the first detection signal exported by described earphone detection circuit judges whether described first test side is connected with the first interface of earphone; When described first test side is connected with the first interface of earphone, the signal at least by detecting described second test side confirms whether earphone inserts.
Below in conjunction with drawings and Examples, the earphone detection circuit of technical solution of the present invention and method are described in detail.It should be noted that, in following examples, earphone detection circuit is suitable for being connected with the earphone interface circuit of head circuit shown in Fig. 1, by insertion sequence, described first interface is first interface of the inserting paragraph of earphone, and described second interface is the 3rd interface of the inserting paragraph of earphone.Be appreciated that the earphone interface circuit of distinct electronic apparatuses may be different, correspondingly, the voltage of test side also may be different.In addition, earphone detection circuit also can comprise earphone interface circuit.
The earphone detection circuit of the embodiment of the present invention shown in Fig. 3 comprises: the first detecting unit 1 and the second detecting unit 2.
Incorporated by reference to reference to figure 1 and Fig. 3, first detecting unit 1 is suitable for the voltage comparing the first reference voltage Vref 1 and the first test side HEADSET_L_INT, to export the first detection signal AUDIO_HEAD_INSERT1, the first reference voltage Vref 1 is determined according to the syndeton of the first test side HEADSET_L_INT and the first power vd D_IO, first interface.
Second detecting unit 2 is suitable for the voltage comparing the second reference voltage Vref 2 and the second test side HEADMIC_IN, to export the second detection signal AUDIO_HEAD_INSERT, described second reference voltage Vref 2 is determined according to the syndeton of the second test side HEADMIC_IN and second source HEADMICBIAS, the second interface.
First detection signal is in order to represent whether the first test side is connected with first interface, and the second detection signal is in order to represent whether the second test side is connected with the second interface.
Particularly, first detecting unit 1 of the present embodiment and the second detecting unit 2 comprise transistor and current source respectively.Described transistor can be metal-oxide-semiconductor, also can be triode, be described for metal-oxide-semiconductor below, it will be appreciated by those skilled in the art that, based on the circuit connection structure of the detecting unit of following employing metal-oxide-semiconductor, the circuit connection structure of the detecting unit adopting triode also can be obtained.
Fig. 4 is a kind of circuit structure of the detecting unit of the embodiment of the present invention, detecting unit (a) shown in Fig. 4 comprises NMOS tube MN1 and current sources la, the grid of NMOS tube MN1 connects reference voltage input terminal VREF, source electrode is connected with detection input IN, and drain electrode is suitable for being connected with detection output OUT.Current sources la is serially connected between operating voltage Vdd input and the drain electrode of NMOS tube, for the electric current of control circuit, with the power consumption of control circuit, usually adopt the current sources la that current value is less, such as can be less than or equal to 1 μ A, therefore the power consumption of testing circuit just can be very little.When detecting the voltage V of input iNwhen being greater than (Vref – Vth (n)), NMOS tube is ended, and the voltage of the signal of the drain electrode output of NMOS tube is the voltage of operating voltage Vdd input; When detecting the voltage V of input iNwhen being less than (Vref – Vth (n)), NMOS tube conducting, the voltage of the signal of the drain electrode output of NMOS tube is the voltage V detecting input IN iN, Vref is the voltage of reference voltage input terminal VREF, the threshold voltage that Vth (n) is NMOS tube.
Detecting unit (b) shown in Fig. 4 is the alternative of (a), detecting unit (b) shown in Fig. 4 comprises PMOS MP1 and current sources la, the grid of PMOS MP1 connects reference voltage input terminal VREF, source electrode is connected with detection input IN, and drain electrode is suitable for being connected with detection output OUT.Current sources la is held between the drain electrode of PMOS MP1 with being serially connected in, for the electric current of control circuit, with the power consumption of control circuit.When detecting the voltage V of input IN iNwhen being greater than (Vref – Vth (p)), PMOS conducting, the voltage of the signal of the drain electrode output of PMOS is the voltage V detecting input IN iN; When detecting the voltage V of input iNwhen being less than (Vref – Vth (p)), PMOS is ended, and the voltage of the signal of the drain electrode output of PMOS is ground terminal voltage, and Vref is the voltage of reference voltage input terminal VREF, the threshold voltage that Vth (p) is PMOS.
Further, detecting unit can also comprise reshaper, signal for exporting the 3rd pole of transistor carries out shaping, with the high level of stable output (logical one) or low level (logical zero), reshaper can be inverter, is serially connected in the 3rd pole of transistor and detects between output OUT, for Fig. 4, the input of inverter INV is connected with the drain electrode of metal-oxide-semiconductor, and the output of inverter INV is connected with detection output OUT.
First detecting unit 1 can be the circuit shown in Fig. 4 (a) or Fig. 4 (b), wherein, detect input IN to be connected with the first test side HEADSET_L_INT, reference voltage input terminal VREF inputs arranging of first reference voltage Vref 1, first reference voltage Vref 1 and can determine according to the circuit structure of head circuit and component parameters.The detection signal that the detection output OUT of the first detecting unit 1 exports is the first detection signal AUDIO_HEAD_INSERT1, and output high level or low level can represent that the first test side HEADSET_L_INT is connected with first interface or the first test side HEADSET_L_INT is not connected with first interface respectively.
Second detecting unit 2 can be the circuit shown in Fig. 4 (a) or Fig. 4 (b), wherein, detect input IN to be connected with the second test side HEADMIC_IN, reference voltage input terminal VREF inputs arranging of second reference voltage Vref 2, first reference voltage Vref 2 and can determine according to the circuit structure of head circuit and component parameters.The detection signal that the detection output OUT of the second detecting unit 2 exports is the second detection signal AUDIO_HEAD_INSERT, and output high level or low level can represent that the second test side HEADMIC_IN is connected with the second interface or the second test side HEADMIC_IN is not connected with the second interface respectively.
For the head circuit shown in Fig. 1, when earphone is extracted or do not inserted, L channel L interface is not connected with the first test side HEADSET_L_INT, and the first test side HEADSET_L_INT output voltage is the high level of the voltage of the first power vd D_IO; After earphone inserts, L channel L interface is connected with the first test side HEADSET_L_INT, the voltage of the first test side HEADSET_L_INT is obtained the voltage of the first power vd D_IO by resistance R2 and resistance R4, the resistance of usual resistance R2 is larger, be generally hundreds of K Ω, the resistance of resistance R4 is less, is generally tens Ω, and test side HEADSET_L_INT exports the low level close to 0V.Therefore, the setting of the first reference voltage Vref 1 is relevant to the threshold voltage of the magnitude of voltage of the first power vd D_IO, the resistance of resistance R2 and R4 and metal-oxide-semiconductor.
When earphone is extracted or do not inserted, microphone MIC interface is not connected with the second test side HEADMIC_IN, and the second test side HEADMIC_IN output voltage is the high level of the voltage of second source HEADMICBIAS; After earphone inserts, microphone MIC interface is connected with the second test side HEADMIC_IN, when not having button to trigger, the voltage of the second test side HEADMIC_IN is obtained the voltage of second source HEADMICBIAS by resistance R1 and microphone Mic, when there being button to trigger, the voltage of the second test side HEADMIC_IN is obtained the voltage of second source HEADMICBIAS by resistance R1 and parallel resistance (microphone Mic is in parallel with button).Therefore, the magnitude of voltage of setting and the second source HEADMICBIAS of the second reference voltage Vref 2, resistance R1 and the resistance of microphone Mic and the threshold voltage of metal-oxide-semiconductor relevant.
Second test side HEADMIC_IN also can be used for detecting the push-button type be triggered, when detect input IN to be connected with the second test side HEADMIC_IN trigger with Test earphone button time, the setting of the reference voltage of input reference voltage input VREF is relevant to the magnitude of voltage of second source HEADMICBIAS, resistance R1, microphone Mic and the resistance of button and the threshold voltage of metal-oxide-semiconductor.The resistance of different buttons is normally not identical, when different buttons is triggered, the partial pressure value of the second test side HEADMIC_IN is also different, if when whether the some buttons by means of only the second test side HEADMIC_IN Test earphone are triggered, the setting of the reference voltage of input reference voltage input VREF is relevant to the magnitude of voltage of second source HEADMICBIAS, resistance R1, microphone Mic and the resistance of detected button and the threshold voltage of metal-oxide-semiconductor.
The circuit structure of the first detecting unit 1 and the second detecting unit 2 is not limited to shown in Fig. 4, it can also be other circuit structure, such as shown in Fig. 5, detecting unit also can adopt comparator, the positive input terminal VIN1 of comparator COMP and negative input end VIN2 can input voltage and the reference voltage of test side respectively, and the signal of the output output of comparator COMP is in order to represent comparative result.Further, detecting unit can also comprise de-twitter circuit 10, for carrying out debounce processing, with the detection signal of stable output to the output signal of comparator COMP.
Particularly, the comparator COMP of the first detecting unit 1 is suitable for the voltage comparing the first reference voltage Vref 1 and the first test side, 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 the first detecting unit 1 is suitable for carrying out debounce processing to the output signal of the comparator COMP of the first detecting unit 1, and the output OUT of de-twitter circuit 10 exports the first detection signal AUDIO_HEAD_INSERT1.
The comparator COMP of the second detecting unit 2 is suitable for the voltage comparing the second reference voltage Vref 2 and the second test side 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 the first detecting unit 2 is suitable for carrying out debounce processing to the output signal of the comparator COMP of the second detecting unit 2, and the output OUT of de-twitter circuit 10 exports the second detection signal AUDIO_HEAD_INSERT.
The reference voltage of above-mentioned input detection unit can be provided by voltage providing unit, described voltage providing unit can adopt existing reference source circuit, such as the simplest structure can be bleeder circuit, as obtained determined first reference voltage Vref 1 and the second reference voltage Vref 2 of circuit design by electric resistance partial pressure or by transistor dividing potential drop.
Based on the earphone detection circuit shown in Fig. 3, the flow process of the earphone detecting method of the embodiment of the present invention shown in Fig. 6 comprises:
Step S11, judges whether the first test side is connected with the first interface of earphone; If then perform step S12, then repeat step S11 if not.Judge whether the first test side HEADSET_L_INT is connected with the first interface of earphone by the first detection signal AUDIO_HEAD_INSERT1.
Step S12, judges whether the second test side is connected with the second interface of earphone, if then perform step S13, then performs step S11 if not.Judge whether the second test side HEADMIC_IN is connected with the second interface of earphone by the second detection signal AUDIO_HEAD_INSERT.
Step S13, confirms that earphone inserts.After confirmation earphone inserts, the voltage of detection second test side HEADMIC_IN can be continued, to determine whether the push-button type that button triggers and is triggered.
Based on the earphone detection circuit shown in Fig. 3, the flow process of the earphone detecting method of the embodiment of the present invention shown in Fig. 7 comprises:
Step S21, judges whether the first test side is connected with the first interface of earphone, if then perform step S22, then repeats step S21 if not.Judge whether the first test side HEADSET_L_INT is connected with the first interface of earphone by the first detection signal AUDIO_HEAD_INSERT1.
Step S22, starts second source.
Step S23, judges whether the second test side is connected with the second interface of earphone, if then perform step S24, then performs step S25 if not.Judge whether the second test side HEADMIC_IN is connected with the second interface of earphone by the second detection signal AUDIO_HEAD_INSERT.
Step S24, confirms that earphone inserts.
Step S25, judges whether the first test side is connected with the first interface of earphone, if then perform step S23, then performs step S26 if not.
Step S26, closes second source, continues to perform step S21.
Based on the earphone detection circuit shown in Fig. 3, the electronic equipment of the embodiment of the present invention shown in Fig. 8 comprises earphone interface circuit A1, earphone detection circuit A2 and headset detection device A3.Earphone detection circuit A2 is suitable for being connected with earphone interface circuit A1, and concrete structure can with reference to the above-mentioned explanation to the earphone detection circuit shown in Fig. 3.As shown in Figure 8, described headset detection device A3 may be used for the earphone detecting method realized shown in Fig. 7, comprising: the first judging unit A31, confirmation unit (not shown) and startup control unit A34.
The first detection signal AUDIO_HEAD_INSERT1 that first judging unit A31 is suitable for being exported by earphone detection circuit A2 judges whether described first test side HEADSET_L_INT is connected with the first interface of earphone.
The judged result that described confirmation unit is suitable for as the first judging unit A31 is yes, and when namely described first test side is connected with the first interface of earphone, the signal at least by detecting described second test side confirms whether earphone inserts.The confirmation unit of the present embodiment comprises the second judging unit A32 and confirms subelement A33.
The judged result that second judging unit A32 is suitable for as the first judging unit A31 is yes, namely, when the first test side HEADSET_L_INT is connected with the first interface of earphone, the second detection signal AUDIO_HEAD_INSERT exported by earphone detection circuit A2 judges whether the second test side HEADMIC_IN is connected with the second interface of earphone.
Confirm that the judged result that subelement A33 is suitable for as the second judging unit A32 is yes, when namely the second test side HEADMIC_IN is connected with the second interface of earphone, confirm that earphone inserts.
The judged result that startup control unit A34 is suitable for as the first judging unit A31 is yes, namely when the first test side HEADSET_L_INT is connected with the first interface of earphone, before the second detection signal AUDIO_HEAD_INSERT exported by earphone detection circuit A2 at the second judging unit A32 judges whether the second test side HEADMIC_IN is connected with the second interface of earphone, start the second source HEADMICBIAS of described earphone interface circuit A1.In other embodiments, described headset detection device may be used for the earphone detecting method realized shown in Fig. 6, then also can not comprise and start control unit A34.
In order to the earphone that can realize can also confirming when earphone inserts and detects to insert is three-section earphone or four-section type headset, the earphone detection circuit of the embodiment of the present invention shown in Fig. 9, compared to Fig. 3, also comprise the first switch unit ADC_SEL and AD conversion unit 3, first switch unit ADC_SEL is suitable for switching first test side HEADSET_L_INT, the connection of the second test side HEADMIC_IN and AD conversion unit 3, AD conversion unit 3 is suitable for carrying out analog-to-digital conversion to the voltage of input, with the magnitude of voltage of the magnitude of voltage or the second test side HEADMIC_IN of determining the first test side HEADSET_L_INT, the digital signal Vout that AD conversion unit 3 exports is in order to represent magnitude of voltage.The startup of AD conversion unit 3 can be triggered by the first detection signal AUDIO_HEAD_INSERT1 or the second detection signal AUDIO_HEAD_INSERT, open when such AD conversion unit is only opened when the first test side is connected with first interface or earphone inserts, also can reduce circuit power consumption to a certain extent.
In addition, consider that four-section type headset interface standard has two kinds, OMTP standard as described in Figure 1 and CTIA standard as shown in Figure 2, in order to compatible two kinds of standards, the earphone interface circuit of the present embodiment as shown in Figure 10, compared to Fig. 1, also comprise the second switch unit SW, be suitable for switching the second interface of earphone, the 3rd interface and the second test side HEADMIC_IN, hold correspondingly to connect.Wherein, according to insertion sequence, the second interface is the 3rd interface of earphone inserting paragraph, it can be microphone MIC interface or ground wire GND interface, accordingly, the 3rd interface is the 4th interface of earphone inserting paragraph, can be ground wire GND interface or microphone MIC interface.Second switch unit SW comprises two analog switch, be connected with the second test side HEADMIC_IN in order to control the second interface respectively, the 3rd interface holds be connected with ground, after switching, two analog switch of the second switch unit SW respectively in order to control the second interface to hold with ground be connected, the 3rd interface is connected with the second test side HEADMIC_IN.
Based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10, the flow process of the earphone detecting method of the embodiment of the present invention shown in Figure 11, compared to Fig. 7, also comprises:
Before step S21, first perform step S20, control the second switch unit make the second test side, hold and be suitable for respectively being connected with the second interface, the 3rd interface.The present embodiment is before Test earphone inserts, first earphone interface is defaulted as OMTP standard, namely control two analog switch of the second switch unit SW, make the second test side HEADMIC_IN be suitable for being connected with the second interface, hold and be suitable for being connected with the 3rd interface.
After step S24 confirms that earphone inserts, start AD conversion unit 3, perform step S27, control the first switch unit and switch being communicated with of being communicated with of the first test side and AD conversion unit and the second test side and AD conversion unit, read the digital signal that AD conversion unit exports respectively, with the magnitude of voltage of the magnitude of voltage and the second test side that obtain the first test side.Specifically can comprise, control the first switch unit ADC_SEL and be communicated with the first test side HEADSET_L_INT and AD conversion unit 3, read the digital signal Vout that AD conversion unit 3 exports, to obtain the magnitude of voltage of the first test side HEADSET_L_INT; Then, switch the connection of AD conversion unit 3, namely control the first switch unit ADC_SEL and be communicated with 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 magnitude of voltage of the second test side HEADMIC_IN.It should be noted that, by repeatedly reading digital signal Vout and the mode be averaging, the magnitude of voltage of the first test side HEADSET_L_INT and the magnitude of voltage of the second test side HEADMIC_IN can be obtained.
Then perform step S28, judge that whether the magnitude of voltage of the first test side is equal with the magnitude of voltage of the second test side, then perform step S29 if not, if then perform step S30.In the present embodiment, if the earphone inserted is OMTP standard, the internal circuit of earphone is the latter half circuit as Fig. 1, and the magnitude of voltage of the first test side HEADSET_L_INT is the voltage of resistance R2 and resistance R4 to the first power vd D_IO, generally close to 0V; The magnitude of voltage of the second test side HEADMIC_IN be resistance R1 and microphone Mic to the voltage of second source HEADMICBIAS, generally between 1V ~ 2V.
Step S29, determines that the earphone inserted is four-section type headset.
Step S30, judges whether the magnitude of voltage of the first test side and the magnitude of voltage of the second test side are all less than voltage threshold, if then perform step S31, then performs step S32 if not.Described voltage threshold is determined according to the internal circuit of earphone and the structure of earphone interface circuit and component parameters, in the present embodiment, equal or the approximately equal of the voltage of the voltage of the first power vd D_IO and second source HEADMICBIAS is set, if the earphone inserted is three-section earphone, resistance R2, R4, R1 is serially connected between the first power vd D_IO and second source HEADMICBIAS, then the voltage-mode analog values of the first test side HEADSET_L_INT and the voltage-mode analog values of the second test side HEADMIC_IN are equal or approximately equalised and are close to 0V, digital value after analog-to-digital conversion is equal, if the earphone inserted is CTIA standard, the internal circuit of earphone is the latter half circuit as Fig. 2, resistance R2, R4 and diode D0 are serially connected between the first power vd D_IO and ground end, resistance R1 and diode D0 is serially connected between second source HEADMICBIAS and ground end, the resistance of the resistance value ratio resistance R2 of resistance R4 is much smaller, voltage-mode analog values and the voltage-mode analog values of the second test side HEADMIC_IN of the first test side HEADSET_L_INT are approximately equalised and relevant to the conducting voltage of diode, and the digital value after analog-to-digital conversion is equal.Based on this, can arrange a voltage threshold to distinguish three-section earphone and four-section type headset, such as voltage threshold can be set to 0.4V.
Step S31, determines that the earphone inserted is three-section earphone.
Step S32, controls the second switch unit and carries out interface switching.Can be specifically that two analog switch controlling the second switch unit SW switch, hold with making be suitable for being connected with the second interface, the second test side HEADMIC_IN is suitable for being connected with the 3rd interface.
Continue to perform step S33, control the first switch unit and switch being communicated with of being communicated with of the first test side and AD conversion unit and the second test side and AD conversion unit, read the digital signal that AD conversion unit exports respectively, with the magnitude of voltage of the magnitude of voltage and the second test side that obtain the first test side.Specifically can refer step S27.
Step S34, judges that whether the magnitude of voltage of the first test side is equal with the magnitude of voltage of the second test side, then performs step S29 if not, if then perform step S35.In the present embodiment, if the earphone inserted is CTIA standard, the internal circuit of earphone is the latter half circuit as Fig. 2, after the interface of the second switch unit switches, the magnitude of voltage of the first test side HEADSET_L_INT is the voltage of resistance R2 and resistance R4 to the first power vd D_IO, generally close to 0V; The magnitude of voltage of the second test side HEADMIC_IN be resistance R1 and microphone Mic to the voltage of second source HEADMICBIAS, generally between 1V ~ 2V.
Step S35, the earphone inserted do not supported by prompting electronic equipment.
It should be noted that, in other embodiments of the earphone detecting method based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10, can also be comprise the process step shown in Fig. 6 and above-mentioned step S20, step S27 to S35, namely second source can remain opening.Based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10, the flow process of the earphone detecting method of the embodiment of the present invention shown in Figure 12, compared to Figure 11, eliminate and judge by the second detection signal the step whether the second test side is connected with the second interface, when the first test side is connected with first interface, directly judged the type of the earphone whether earphone inserts and insert by the magnitude of voltage of the magnitude of voltage and the second test side that detect the first test side, which simplify testing process.
As shown in figure 12, perform step S20, control the second switch unit make the second test side, hold and be suitable for respectively being connected with the second interface, the 3rd interface.
Step S21, judges whether the first test side is connected with the first interface of earphone, if then perform step S22, then repeats step S21 if not.
Step S22, starts second source.
Step S27, control the first switch unit and switch being communicated with of being communicated with of the first test side and AD conversion unit and the second test side and AD conversion unit, read the digital signal that AD conversion unit exports respectively, with the magnitude of voltage of the magnitude of voltage and the second test side that obtain the first test side.
Step S28, judges that whether the magnitude of voltage of the first test side is equal with the magnitude of voltage of the second test side, then performs step S29a if not, if then perform step S30.
Step S29a, confirms that earphone inserts, and is four-section type headset.
Step S30, judges whether the magnitude of voltage of the first test side and the magnitude of voltage of the second test side are all less than voltage threshold, if then perform step S31a, then performs step S32 if not.
Step S31a, confirms that earphone inserts, and is three-section earphone.
Step S32, controls the second switch unit and carries out interface switching.
Step S33, control the first switch unit and switch being communicated with of being communicated with of the first test side and AD conversion unit and the second test side and AD conversion unit, read the digital signal that AD conversion unit exports respectively, with the magnitude of voltage of the magnitude of voltage and the second test side that obtain the first test side.
Step S34, judges that whether the magnitude of voltage of the first test side is equal with the magnitude of voltage of described second test side, then performs step S29a if not, if then perform step S35.
Step S35, the earphone inserted do not supported by prompting electronic equipment.
The explanation of the part steps shown in Figure 12 can with reference in above-described embodiment to the explanation of the step of identical label.It should be noted that, if second source is open always, the step S22 of the earphone detecting method shown in Figure 12 can be omitted.
Be appreciated that the embodiment flow process of corresponding Figure 11, describedly at least confirm whether earphone inserts and can comprise by the signal of detection second test side: the signal detecting the second test side, to judge whether described second test side is connected with the second interface of earphone; When described second test side is connected with the second interface of earphone, confirm that earphone inserts.The embodiment flow process of corresponding Figure 12, describedly at least confirm whether earphone inserts and can comprise by the signal of detection second test side: when detecting that described first test side is connected with the first interface of earphone, read the magnitude of voltage of described first test side and the magnitude of voltage of described second test side respectively; If the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset; If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then confirm that earphone inserts and is three-section earphone.
Based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10, the electronic equipment of the embodiment of the present invention shown in Figure 13 comprises earphone interface circuit A1 ', earphone detection circuit A2 ' and headset detection device A3 '.Earphone detection circuit A2 ' is suitable for being connected with earphone interface circuit A1 ', and concrete structure can with reference to the above-mentioned explanation to the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10.As shown in figure 13, described headset detection device A3 ', for realizing the earphone detecting method shown in Figure 11, compared with the headset detection device A3 shown in Fig. 8, also comprises: reading unit A35, type confirmation unit A36 and switch control unit A37.
Reading unit A35 is suitable for after confirmation subelement A34 confirms that earphone inserts, the the first switch unit ADC_SEL controlling earphone detection circuit A2 ' is communicated with the first test side HEADSET_L_INT and AD conversion unit 3, read the digital signal Vout that AD conversion unit 3 exports, to obtain the magnitude of voltage of described first test side HEADSET_L_INT; Control the first switch unit ADC_SEL and be communicated with 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 magnitude of voltage of the second test side HEADMIC_IN.
Type confirmation unit A36 is connected with reading unit A35, and the magnitude of voltage be suitable for as magnitude of voltage and the second test side HEADMIC_IN of the first test side HEADSET_L_INT is unequal, then determine that the earphone of insertion is four-section type headset; When the magnitude of voltage of the first test side HEADSET_L_INT is equal with the magnitude of voltage of the second test side HEADMIC_IN and be less than voltage threshold, then determine that the earphone inserted is three-section earphone.
It is equal with the magnitude of voltage of the second test side HEADMIC_IN and be greater than voltage threshold that switch control unit A37 is suitable for magnitude of voltage as the first test side HEADSET_L_INT, then the second switch unit SW of control earphone interface circuit A1 ' switch the second interface, the 3rd interface and the second test side HEADMIC_IN, hold correspondingly to connect; Type confirmation unit A36 is also suitable for after switching interface connects, the magnitude of voltage of the first test side HEADSET_L_INT and the magnitude of voltage of the second test side HEADMIC_IN is obtained by reading unit A35, if the magnitude of voltage of the magnitude of voltage of the first test side HEADSET_L_INT and the second test side HEADMIC_IN is unequal, then determine that the earphone inserted is four-section type headset.
First judging unit A31, the second judging unit A32, confirmation subelement A33 can with reference to the explanations of the unit to the identical label in the electronic equipment shown in Fig. 8 with the explanation of startup control unit A34.
Based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10, the electronic equipment of the embodiment of the present invention shown in Figure 14 comprises earphone interface circuit A1 ', earphone detection circuit A2 ' and headset detection device B3.Earphone detection circuit A2 ' is suitable for being connected with earphone interface circuit A1 ', and concrete structure can with reference to the above-mentioned explanation to the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Figure 10.As shown in figure 14, described headset detection device B3, for realizing the earphone detecting method shown in Figure 12, comprising: the first judging unit B31, startup control unit B34, confirmation unit (not shown) and switch control unit B37.
The first detection signal AUDIO_HEAD_INSERT1 that first judging unit B31 is suitable for being exported by earphone detection circuit A2 ' judges whether described first test side HEADSET_L_INT is connected with the first interface of earphone.
The judged result that described confirmation unit is suitable for as the first judging unit A31 is yes, and when namely described first test side is connected with the first interface of earphone, the signal at least by detecting described second test side confirms whether earphone inserts.The confirmation unit of the present embodiment comprises reading unit B35 and type confirmation unit B36.
It is yes that reading unit B35 is suitable in the judged result of the first judging unit B31, namely when the first test side HEADSET_L_INT is connected with the first interface of earphone, the the first switch unit ADC_SEL controlling earphone detection circuit A2 ' is communicated with the first test side HEADSET_L_INT and AD conversion unit 3, read the digital signal Vout that AD conversion unit 3 exports, to obtain the magnitude of voltage of described first test side HEADSET_L_INT; Control the first switch unit ADC_SEL and be communicated with 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 magnitude of voltage of the second test side HEADMIC_IN.
The judged result that startup control unit B34 is suitable for as the first judging unit B31 is yes, namely when the first test side HEADSET_L_INT is connected with the first interface of earphone, before reading unit B35 reads magnitude of voltage, start the second source HEADMICBIAS of described earphone interface circuit A1 '.In other embodiments, described headset detection device also can not comprise startup control unit B34.
Type confirmation unit B36 is connected with reading unit B35, and the magnitude of voltage be suitable for as magnitude of voltage and the second test side HEADMIC_IN of the first test side HEADSET_L_INT is unequal, then confirm earphone insertion and be four-section type headset; When the magnitude of voltage of the first test side HEADSET_L_INT is equal with the magnitude of voltage of the second test side HEADMIC_IN and be less than voltage threshold, then confirm that earphone inserts and is three-section earphone.
It is equal with the magnitude of voltage of the second test side HEADMIC_IN and be greater than voltage threshold that switch control unit B37 is suitable for magnitude of voltage as the first test side HEADSET_L_INT, then the second switch unit SW of control earphone interface circuit A1 ' switch the second interface, the 3rd interface and the second test side HEADMIC_IN, hold correspondingly to connect; Type confirmation unit B36 is also suitable for after switching interface connects, the magnitude of voltage of the first test side HEADSET_L_INT and the magnitude of voltage of the second test side HEADMIC_IN is obtained by reading unit B35, if the magnitude of voltage of the magnitude of voltage of the first test side HEADSET_L_INT and the second test side HEADMIC_IN is unequal, then confirm earphone and be four-section type headset.
In other embodiments of the invention, if do not consider that earphone interface circuit can the situation of compatible two kinds of interface standards, what such as earphone interface circuit adopted is earphone interface circuit in the head circuit shown in Fig. 1, namely the second switch unit is not had, then accordingly, earphone detecting method based on the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Fig. 1 can be omitted by the step S32 to S34 in the flow process shown in Figure 12, then performs step S35 when the judged result of step S30 is no.The electronic equipment comprising the earphone interface circuit shown in the earphone detection circuit shown in Fig. 9 and Fig. 1 can be omitted by the switch control unit B37 in the headset detection device B3 of electronic equipment shown in Figure 14.
The earphone detecting method of above-described embodiment can also comprise: under the state that earphone inserts, when the signal based on described first test side determines that described first test side and first interface disconnect and determine that described second test side and the second interface disconnect based on the signal of described second test side, confirm that earphone is extracted; After confirmation earphone is extracted, close described second source.Accordingly, under described confirmation unit is also suitable for the state inserted at earphone, when the signal based on described first test side determines that described first test side and first interface disconnect and determine that described second test side and the second interface disconnect based on the signal of described second test side, confirm that earphone is extracted.Described headset detection device can also comprise closing control unit, and described closing control unit is suitable for, after confirmation earphone is extracted, closing described second source.During concrete enforcement, can judge whether described first test side is connected with first interface by the first detection signal, judge whether described second test side is connected with the second interface by the second detection signal; Also can judge whether described first test side is connected with first interface by the voltage of the first test side, judge whether described second test side is connected with the second interface by the voltage of the second test side.
It will be appreciated by those skilled in the art that, the all or part of of earphone detecting method of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer-readable recording medium, and described storage medium can be ROM, RAM, magnetic disc or CD etc.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.

Claims (30)

1. an earphone detection circuit, is characterized in that, comprising:
First detecting unit, is suitable for the signal of detection first test side, to export the first detection signal; Described first test side is suitable for the first interface of frames connecting with headphone, and the voltage of described first test side is relevant to the voltage of the first power supply;
Second detecting unit, is suitable for the signal of detection second test side, to export the second detection signal; Described second test side is suitable for the second interface of frames connecting with headphone, and the voltage of described second test side is relevant to the voltage of second source.
2. earphone detection circuit as claimed in claim 1, it is characterized in that, the startup of described second source triggers based on described first detection signal.
3. earphone detection circuit as claimed in claim 1, is characterized in that,
Described first detecting unit is suitable for the voltage comparing the first reference voltage and described first test side, and to export the first detection signal, described first reference voltage is determined according to the syndeton of described first test side and the first power supply, first interface;
Described second detecting unit is suitable for the voltage comparing the second reference voltage and described second test side, and to export the second detection signal, described second reference voltage is determined according to the syndeton of described second test side and second source, the second interface.
4. earphone detection circuit as claimed in claim 3, it is characterized in that, described first detecting unit and the second detecting unit comprise comparator respectively;
The comparator of described first detecting unit is suitable for the voltage of more described first reference voltage and described first test side;
The comparator of described second detecting unit is suitable for the voltage of more described second reference voltage and described first test side.
5. earphone detection circuit as claimed in claim 4, it is characterized in that, described first detecting unit and the second detecting unit also comprise de-twitter circuit respectively;
The de-twitter circuit of described first detecting unit is suitable for carrying out debounce processing to the output signal of the comparator of described first detecting unit, to export the first detection signal;
The de-twitter circuit of described second detecting unit is suitable for carrying out debounce processing to the output signal of the comparator of described second detecting unit, to export the second detection signal.
6. earphone detection circuit as claimed in claim 1, it is characterized in that, described first interface is left channel interface, and described second interface is microphone interface or interface of the ground wire.
7. earphone detection circuit as claimed in claim 1, is characterized in that, also comprise the first switch unit and AD conversion unit, and described first switch unit is suitable for switching the connection of described first test side, the second test side and described AD conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input.
8. earphone detection circuit as claimed in claim 7, it is characterized in that, described AD conversion unit triggers based on described first detection signal or the second detection signal.
9. the earphone detection circuit as described in any one of claim 1 to 8, is characterized in that, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect.
10. an earphone detecting method, is characterized in that, comprising:
The first detection signal exported by earphone detection circuit described in any one of claim 1 to 6 judges whether described first test side is connected with the first interface of earphone;
When described first test side is connected with the first interface of earphone, the signal at least by detecting described second test side confirms whether earphone inserts.
11. earphone detecting methods as claimed in claim 10, is characterized in that, described at least whether insertion by the signal confirmation earphone detecting described second test side is comprised:
When described first test side is connected with the first interface of earphone, the second detection signal exported by described earphone detection circuit judges whether described second test side is connected with the second interface of earphone;
When described second test side is connected with the second interface of earphone, confirm that earphone inserts.
12. earphone detecting methods as claimed in claim 11, it is characterized in that, also comprise: when described first test side is connected with the first interface of earphone, before judging whether described second test side is connected with the second interface of earphone by described second detection signal, start described second source.
13. earphone detecting methods as claimed in claim 11, it is characterized in that, described earphone detection circuit also comprises the first switch unit and AD conversion unit, and described first switch unit is suitable for the connection switching described first test side, the second test side and described AD conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described earphone detecting method also comprises:
After confirmation earphone inserts, control described first switch unit and be communicated with described first test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described first test side;
Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described second test side;
If the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then determine that the earphone inserted is four-section type headset;
If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then determine that the earphone inserted is three-section earphone.
14. earphone detecting methods as claimed in claim 13, it is characterized in that, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described earphone detecting method also comprises:
If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be greater than voltage threshold, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect;
After switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then determine that the earphone inserted is four-section type headset.
15. earphone detecting methods as claimed in claim 10, it is characterized in that, described earphone detection circuit also comprises the first switch unit and AD conversion unit, and described first switch unit is suitable for the connection switching described first test side, the second test side and described AD conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described at least whether insertion by the signal confirmation earphone detecting described second test side is comprised:
Control described first switch unit and be communicated with described first test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described first test side;
Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that described AD conversion unit exports, to obtain the magnitude of voltage of described second test side;
If the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset;
If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then confirm that earphone inserts and is three-section earphone.
16. earphone detecting methods as claimed in claim 15, is characterized in that, also comprise: when described first test side is connected with the first interface of earphone, before described reading unit reads magnitude of voltage, start described second source.
17. earphone detecting methods as claimed in claim 15, it is characterized in that, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described earphone detecting method also comprises:
If the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be greater than voltage threshold, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect;
After switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset.
18. earphone detecting methods as described in any one of claim 10 to 17, is characterized in that, also comprise:
Under the state that earphone inserts, the signal based on described first test side determines whether described first test side disconnects with first interface, and the signal based on described second test side determines whether described second test side disconnects with the second interface;
When the first interface of described first test side and earphone disconnects and the second interface of described second test side and earphone disconnects, confirm that earphone is extracted.
19. earphone detecting methods as claimed in claim 18, is characterized in that, also comprise: after confirmation earphone is extracted, close described second source.
20. 1 kinds of headset detection devices, is characterized in that, comprising:
First judging unit, the first detection signal being suitable for being exported by earphone detection circuit described in any one of claim 1 to 6 judges whether described first test side is connected with the first interface of earphone;
Confirmation unit, is suitable for when described first test side is connected with the first interface of earphone, and the signal at least by detecting described second test side confirms whether earphone inserts.
21. headset detection devices as claimed in claim 20, it is characterized in that, described confirmation unit comprises:
Second judging unit, is suitable for when described first test side is connected with the first interface of earphone, and the second detection signal exported by described earphone detection circuit judges whether described second test side is connected with the second interface of earphone;
Confirm subelement, be suitable for when described second test side is connected with the second interface of earphone, confirm that earphone inserts.
22. headset detection devices as claimed in claim 21, it is characterized in that, also comprise startup control unit, described startup control unit is suitable for when described first test side is connected with the first interface of earphone, before judging whether described second test side is connected with the second interface of earphone by described second detection signal, start described second source.
23. headset detection devices as claimed in claim 21, it is characterized in that, described earphone detection circuit also comprises: the first switch unit and AD conversion unit; Described first switch unit is suitable for the connection switching described first test side, the second test side and described D/A conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described headset detection device also comprises: reading unit and type confirmation unit;
Described reading unit is suitable for after confirmation earphone inserts, and controls described first switch unit and is communicated with described first test side and described AD conversion unit, read the digital signal that AD conversion unit exports, to obtain the magnitude of voltage of described first test side; Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that AD conversion unit exports, to obtain the magnitude of voltage of described second test side;
The magnitude of voltage that described type confirmation unit is suitable for when magnitude of voltage and described second test side of described first test side is unequal, then determine that the earphone of insertion is four-section type headset; When the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then determine that the earphone inserted is three-section earphone.
24. headset detection devices as claimed in claim 23, it is characterized in that, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described headset detection device also comprises switch control unit, it is equal with the magnitude of voltage of described second test side and be greater than voltage threshold that described switch control unit is suitable for magnitude of voltage when described first test side, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect;
Described type confirmation unit is also suitable for after switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then determines that the earphone inserted is four-section type headset.
25. headset detection devices as claimed in claim 20, it is characterized in that, described earphone detection circuit also comprises: the first switch unit and AD conversion unit; Described first switch unit is suitable for the connection switching described first test side, the second test side and described D/A conversion unit; Described AD conversion unit is suitable for carrying out analog-to-digital conversion, with the magnitude of voltage of the magnitude of voltage or the second test side of determining described first test side to the voltage of input;
Described confirmation unit comprises:
Reading unit, be suitable for when described first test side is connected with the first interface of earphone, control described first switch unit and be communicated with described first test side and described AD conversion unit, read the digital signal that AD conversion unit exports, to obtain the magnitude of voltage of described first test side; Control described first switch unit and be communicated with described second test side and described AD conversion unit, read the digital signal that AD conversion unit exports, to obtain the magnitude of voltage of described second test side;
Type confirmation unit, the magnitude of voltage be suitable for when magnitude of voltage and described second test side of described first test side is unequal, then confirm earphone insertion and be four-section type headset; When the magnitude of voltage of described first test side is equal with the magnitude of voltage of described second test side and be less than voltage threshold, then confirm that earphone inserts and is three-section earphone.
26. headset detection devices as claimed in claim 25, it is characterized in that, also comprise startup control unit, described startup control unit is suitable for when described first test side is connected with the first interface of earphone, before described reading unit reads magnitude of voltage, start described second source.
27. headset detection devices as claimed in claim 25, it is characterized in that, described earphone detection circuit is suitable for being connected with earphone interface circuit; Described earphone interface circuit comprises described first test side, the second test side, the first power supply, second source and ground end, also comprise the second switch unit, described second switch unit be suitable for switching the second interface of earphone, the 3rd interface and described second test side, hold correspondingly to connect;
Described headset detection device also comprises switch control unit, it is equal with the magnitude of voltage of described second test side and be greater than voltage threshold that described switch control unit is suitable for magnitude of voltage when described first test side, then control described second switch unit switch the second interface, the 3rd interface and described second test side, hold correspondingly to connect;
Described type confirmation unit is also suitable for after switching interface connects, if the magnitude of voltage of the magnitude of voltage of described first test side and described second test side is unequal, then confirmation earphone inserts and is four-section type headset.
28. headset detection devices as described in any one of claim 20 to 27, is characterized in that,
Under described confirmation unit is also suitable for the state inserted at earphone, when the signal based on described first test side determines that described first test side and first interface disconnect and determine that described second test side and the second interface disconnect based on the signal of described second test side, confirm that earphone is extracted.
29. headset detection devices as claimed in claim 28, is characterized in that, also comprise closing control unit, and described closing control unit is suitable for, after confirmation earphone is extracted, closing described second source.
30. 1 kinds of electronic equipments, is characterized in that, comprise the earphone detection circuit described in any one of claim 1 to 6 and the headset detection device described in any one of claim 20 to 29.
CN201310627106.XA 2013-11-28 2013-11-28 Electronic equipment and earphone detection circuit, method and apparatus Active CN104683915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310627106.XA CN104683915B (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
CN201310627106.XA CN104683915B (en) 2013-11-28 2013-11-28 Electronic equipment and earphone detection circuit, method and apparatus

Publications (2)

Publication Number Publication Date
CN104683915A true CN104683915A (en) 2015-06-03
CN104683915B CN104683915B (en) 2018-10-16

Family

ID=53318385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310627106.XA Active CN104683915B (en) 2013-11-28 2013-11-28 Electronic equipment and earphone detection circuit, method and apparatus

Country Status (1)

Country Link
CN (1) CN104683915B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196818A (en) * 2017-12-30 2018-06-22 珠海市杰理科技股份有限公司 Earphone recognition apparatus
WO2018232604A1 (en) * 2017-06-20 2018-12-27 华为技术有限公司 Audio control method, circuit, graphic user interface, electronic apparatus, and storage medium
CN109218871A (en) * 2017-06-29 2019-01-15 北京小米移动软件有限公司 Earphone interface circuit, audio mould group and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453510A (en) * 2007-12-05 2009-06-10 德信智能手机技术(北京)有限公司 Earphone recognition apparatus and method for mobile communication terminal
CN101783986A (en) * 2010-03-17 2010-07-21 青岛海信移动通信技术股份有限公司 Earphone interface circuit and electronic equipment
CN102413239A (en) * 2011-11-15 2012-04-11 惠州Tcl移动通信有限公司 Mobile phone and method for detecting earphone mode of mobile phone
CN102480563A (en) * 2010-11-30 2012-05-30 比亚迪股份有限公司 Control method and device in process of inserting earphone into earphone socket
CN103297908A (en) * 2012-02-24 2013-09-11 宏达国际电子股份有限公司 Electronic device, accessory, and method for detecting an accessory
US20130293240A1 (en) * 2012-05-03 2013-11-07 Samsung Electronics Co., Ltd. Apparatus and method for preventing erroneous detection of jack

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453510A (en) * 2007-12-05 2009-06-10 德信智能手机技术(北京)有限公司 Earphone recognition apparatus and method for mobile communication terminal
CN101783986A (en) * 2010-03-17 2010-07-21 青岛海信移动通信技术股份有限公司 Earphone interface circuit and electronic equipment
CN102480563A (en) * 2010-11-30 2012-05-30 比亚迪股份有限公司 Control method and device in process of inserting earphone into earphone socket
CN102413239A (en) * 2011-11-15 2012-04-11 惠州Tcl移动通信有限公司 Mobile phone and method for detecting earphone mode of mobile phone
CN103297908A (en) * 2012-02-24 2013-09-11 宏达国际电子股份有限公司 Electronic device, accessory, and method for detecting an accessory
US20130293240A1 (en) * 2012-05-03 2013-11-07 Samsung Electronics Co., Ltd. Apparatus and method for preventing erroneous detection of jack

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018232604A1 (en) * 2017-06-20 2018-12-27 华为技术有限公司 Audio control method, circuit, graphic user interface, electronic apparatus, and storage medium
CN109218871A (en) * 2017-06-29 2019-01-15 北京小米移动软件有限公司 Earphone interface circuit, audio mould group and electronic equipment
CN109218871B (en) * 2017-06-29 2020-10-16 北京小米移动软件有限公司 Earphone interface circuit, audio module and electronic equipment
CN108196818A (en) * 2017-12-30 2018-06-22 珠海市杰理科技股份有限公司 Earphone recognition apparatus

Also Published As

Publication number Publication date
CN104683915B (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN101783986B (en) Earphone interface circuit and electronic equipment
CN102892059B (en) GSM noise detecting circuit and method
CN105101009B (en) Audio jack detection circuit, system and method
CN101951446B (en) It is connected to the detection of the ancillary equipment of electronic equipment via audio/video plug, identifies and operate
CN102143262B (en) Electronic device and method for switching audio input channel thereof
CN104683914A (en) Electronic equipment and earphone detection circuit, method and device
EP2806662B1 (en) Apparatus for detecting the type of an audio interface
US8290171B1 (en) Headset with microphone and wired remote control
EP2863652A1 (en) Audio interface self-adaptation device
CN104618836A (en) Communication device
US20150208154A1 (en) Apparatus and method for detecting insertion anomaly of an audio jack
US8509857B2 (en) Headsets
CN102480563B (en) Control method and device in process of inserting earphone into earphone socket
KR20150073216A (en) Earphone and method for realizing automatic recognition switching control of earphone
CN104267781B (en) The reusable mobile terminal of docking station and its method of docking station multiplexing
CN102780949A (en) Method and device for automatically identifying MAC (Media Access Control) pin and ground pin of audio interface
CN104683915A (en) Electronic equipment and earphone detection circuit, method and device
US20150078577A1 (en) Accessory plug detection
CN201075704Y (en) Detection circuit of electrical equipment and mobile phone having the circuit
US9584893B2 (en) Apparatus and method for recovering from partial insertion of an audio jack
CN106338937B (en) Apparatus and method for generating an output signal based on a detected load resistance value
CN204350278U (en) Communication device
CN102448006B (en) Detection circuit of audio equipment
CN104735570B (en) The circuit and head circuit of interface voltage are provided to earphone interface circuit
CN101917659A (en) Detection device, method and mobile terminal of earphone circuit

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