Embodiment
For solve prior art can not correctly detect the band Mike headset plug whether insert the problem that puts in place, the embodiment of the invention provides a kind of method and terminal that detects earphones plug inserting to position.Describe below in conjunction with accompanying drawing and specific embodiment.
As shown in Figure 1, the method for the detection earphones plug inserting to position that the embodiment of the invention provides comprises:
Step 101, whether detection headset plug microphone part is inserted and is put in place.
In the present embodiment, when described band Mike's headset plug inserts socket, Mike's shell fragment on the socket may contact with described three positions of Mike's headset plug of being with: the one, and, described Mike's shell fragment partly contacts with the right receiver of plug, as shown in Figure 2; The 2nd,, the insulation course between right receiver of described Mike's shell fragment and plug and the Mike contacts, as shown in Figure 3; The 3rd,, described Mike's shell fragment contacts with the microphone part of plug, as shown in Figure 4.
Whether in the present embodiment, whether the described detection headset plug of step 101 microphone part is inserted and is put in place, be specifically as follows to detect described headset plug and contact with Mike's shell fragment in the socket.Certainly, in the use of reality, whether described step 101 detection headset plug microphone part inserts the method that puts in place is not limited in the above, every kind of situation is not introduced one by one herein.
Step 102, according to the testing result of headset plug microphone part, whether the output headset plug inserts the testing result that puts in place.Insert for the headset plug microphone part when the testing result of described headset plug microphone part and to put in place, then export earphone and insert and put in place, otherwise the output earphone does not insert and puts in place.
In the present embodiment, described step 102 can be exported earphone in several ways and whether insert the testing result that puts in place, for example: can be by the electron device screen of this earphone insertion, export described testing result, on the electron device screen that inserts at earphone, show with the form of dialog box whether earphone inserts the testing result that puts in place; Perhaps, also can export described testing result by the mode of prompt tone.Certainly, can also pass through other modes, export described testing result, give unnecessary details no longer one by one herein.
Whether the method for the detection earphones plug inserting to position that the embodiment of the invention provides is inserted and is put in place by detecting the earphone microphone part, and whether the headset plug that can detect band Mike inserts and put in place.The embodiment of the invention has solved in the prior art, because headset plug receiver part is longer, whether only detect the headset plug front end inserts and puts in place, whether the microphone part that can't determine headset plug is also inserted and is put in place, thereby can't correctly judge headset plug and whether insert the problem that puts in place, can detect the earphone of being with Mike more accurately.
In another embodiment of the present invention, whether the method for the detection earphones plug inserting to position that the embodiment of the invention as shown in Figure 1 provides, step 101 can detect the headset plug microphone part as follows and insert and put in place:
The first, after headset plug inserts socket, the voltage of Mike's shell fragment in the test socket;
The second, according to the voltage detecting result of described Mike's shell fragment, whether the microphone part of detection headset plug is inserted and is put in place.
In order to make those skilled in the art can more be expressly understood the technical scheme that present embodiment provides, below Fig. 2 Mike's shell fragment extremely shown in Figure 4 is introduced respectively with three kinds of situations that band Mike's headset plug contacts:
1, described Mike's shell fragment partly contacts with the right receiver of plug.
As shown in Figure 2, when described Mike's shell fragment partly contacts with the right receiver of plug, because the right receiver shell fragment of socket also partly contacts with the right receiver of plug this moment, so described Mike's shell fragment partly is connected with the right receiver of right receiver shell fragment by plug.Described right receiver shell fragment is by the voice coil loudspeaker voice coil (not shown) that links to each other with ground, and the resistance of voice coil loudspeaker voice coil is very little, so, described right receiver shell fragment is equivalent to direct ground connection, at this moment, because described Mike's shell fragment links to each other with right receiver shell fragment, so described Mike's shell fragment also is equivalent to direct ground connection.
In such cases, when measuring the voltage of Mike's shell fragment, the voltage measurements of acquisition is approximately zero, can detect according to this voltage measurements, and the microphone part of described headset plug is not inserted and put in place.
2, the insulation course between right receiver of described Mike's shell fragment and plug and the Mike contacts.
As shown in Figure 3, because described insulation course is non-conductive, so, in such cases, when detecting the voltage of Mike's shell fragment, the voltage measurements of acquisition is big (can be similar to and be considered as infinity), can detect according to this voltage measurements, the microphone part of described headset plug is not inserted and is put in place.
3, described Mike's shell fragment contacts with the microphone part of plug.
As shown in Figure 4, when Mike's shell fragment contacts with the microphone part of plug, because described microphone part is by two pull-up resistors (not shown) that links to each other with ground, so, in such cases, when detecting the voltage of Mike's shell fragment, the voltage measurements of acquisition is certain moderate numerical value (this numerical value can be decided according to the size of described pull-up resistor), can detect according to this voltage measurements, the microphone part of described headset plug has been inserted and has been put in place.
In sum, in the present embodiment, described step 101 can be by the voltage of Mike's shell fragment in the test socket, and whether the microphone part that detects plug is inserted and put in place.When the voltage of described Mike's shell fragment is excessive or too small, represent that all the microphone part of described headset plug does not have insertion to put in place; When the voltage of described Mike's shell fragment was a rational numerical, the microphone part of then representing this headset plug had been inserted and has been put in place.
The embodiment of the invention as shown in Figure 1 provide the method for detection earphones plug inserting to position, for not with Mike's earphone, because its microphone part is communicated with ground, so the testing result of described step 101 is that the microphone part of plug puts in place less than insertion.
In order to make the method for the detection earphones plug inserting to position that the embodiment of the invention provides, whether the earphone that can not only detect band Mike exactly inserts and puts in place, whether can also detect the headset plug of not being with Mike exactly inserts and puts in place, as shown in Figure 5, the method of the detection earphones plug inserting to position that further embodiment of this invention provides comprises:
Step 501, whether detection headset plug microphone part is inserted and is put in place.In the present embodiment, described step 501 is identical with described step 101 implementation method of above embodiment, repeats no more herein.
Step 502, whether detection headset plug receiver part is inserted and is put in place.
Step 503 according to the testing result of step 501 and 502 described headset plug microphone part that obtain and receiver part, is exported described headset plug and whether is inserted the testing result that puts in place.
In the present embodiment, when the testing result of headset plug receiver part puts in place for not inserting, the testing result of the earphones plug inserting to position of then described step 503 output is that headset plug does not insert and puts in place, the headset plug of described step 503 output this moment does not insert the testing result that puts in place and can show by electronic equipment screen that this headset plug is inserted into, as demonstration " earphone does not insert " on screen etc.; When headset plug receiver testing result partly puts in place for inserting, and the testing result of headset plug microphone part is when putting in place for not inserting, the testing result of the earphones plug inserting to position of then described step 503 output does not have insertion to put in place for band Mike's headset plug, not with Mike's earphones plug inserting to position, at this moment, can on the electronic equipment screen that this headset plug inserts, show " current earphone is with Mike? " prompting, further export headset plug according to the signal (Y/N) of user's input and whether insert the testing result that puts in place, earphone shows information such as " earphone insert " for not with Mike's earphone the time as described in as the signal when user input being on screen; When the testing result of headset plug receiver part and microphone part is insertion and puts in place, the testing result of the earphones plug inserting to position of then described step 503 output is an earphones plug inserting to position, can show this testing result this moment by the electronic equipment screen that this earphone inserted, as at screen on hour " earphone inserts " etc.
Whether the method for the detection earphones plug inserting to position that present embodiment provides can be according to the testing result of headset plug microphone part and receiver part, judge headset plug and insert and put in place.The method of the detection earphones plug inserting to position that present embodiment provides, whether whether the headset plug that not only can judge band Mike exactly inserts and puts in place, can also judge the headset plug of not being with Mike exactly and insert and put in place.
In an embodiment more of the present invention, whether above-mentioned step 502 shown in Figure 5 can be inserted by two kinds of methods detection headset plug receiver parts is put in place: a kind of method is, whether the left receiver part that detects headset plug contacts with the left receiver shell fragment of socket, judges according to testing result whether the receiver of headset plug partly inserts and puts in place; Another kind method is, whether the right receiver part that detects headset plug contacts with the right receiver shell fragment of socket, judges according to testing result whether the receiver of headset plug partly inserts and puts in place.
Whether the detection principle of above-mentioned two kinds of methods is identical, only contact with the left receiver shell fragment of socket with the left receiver part that detects headset plug below, judges according to testing result whether the receiver of headset plug partly inserts to put in place and is example, describes.
As shown in Figure 6, when headset plug does not insert socket, left receiver shell fragment contacts with switch 1 in the socket, because described left receiver shell fragment is by the voice coil loudspeaker voice coil (not shown) that links to each other with ground, voice coil loudspeaker voice coil resistance is very little, so this moment, described left receiver shell fragment can be similar to and be considered as direct ground connection, further, switch 1 can be considered as direct ground connection (switch 1 links to each other with left receiver shell fragment), at this moment, the voltage of switch 1 is 0.
Shown in any width of cloth among Fig. 2 to 4, after headset plug inserted socket, described left receiver shell fragment and switch 1 were separated, and at this moment, the voltage of described switch 1 is not 0.
In sum, in the present embodiment, whether described step 502 can be 0 by the voltage of detector switch 1, and whether the left receiver part of judging headset plug contacts with the left receiver shell fragment of socket.When detected voltage was 0 on the described switch 1, the left receiver of expression headset plug did not partly contact with the left receiver shell fragment of socket, otherwise the left receiver part of expression headset plug contacts with the receiver shell fragment of doing of socket.
In the present embodiment, described headset plug is according to the Φ 2.5mm of standard design or Φ 3.5mm headset plug, so can obtain plug receiver testing result partly according to above-mentioned testing result to plug left side receiver part, that is: partly insert when putting in place when the left receiver of plug, the whole receiver part (comprising left receiver and right receiver) of plug is all inserted and is put in place, otherwise the whole receiver part of plug all puts in place less than inserting.
In another embodiment of the present invention, detection earphone that the embodiment of the invention provides insert the method that puts in place carry out as Fig. 1 or flow process as shown in Figure 5 headset plug is detected before, can also comprise: the step that detects timing.When described detection timing arrives default detection time, carry out as Fig. 1 or testing process as shown in Figure 5, headset plug is inserted the detection that puts in place.
In the present embodiment, can set described detection time according to actual conditions, for example: can be set to for 10 seconds detection time, when inserting socket, headset plug begins to detect timing later on, when described detection timing arrives 10 default seconds, carry out as Fig. 1 or testing process as shown in Figure 5, headset plug is inserted the detection that puts in place.
Whether the method for the detection earphones plug inserting to position that the embodiment of the invention provides is inserted and is put in place by detecting the earphone microphone part, and whether the headset plug that can detect band Mike inserts and put in place.Solved in the prior art, because headset plug receiver part is longer, whether only detect the headset plug front end inserts and puts in place, whether the microphone part that can't determine headset plug is also inserted and is put in place, thereby can't correctly judge headset plug and whether insert the problem that puts in place, can detect the earphone of being with Mike more accurately.
As shown in Figure 7, the embodiment of the invention also provides a kind of terminal, comprising:
Whether Mike's detecting unit 701 is used to detect the headset plug microphone part and inserts and put in place;
Headset plug testing result output unit 702 is used for the testing result according to the headset plug microphone part, and whether the output headset plug inserts the testing result that puts in place.
In that being inserted, headset plug puts in place when detecting, whether described Mike's detecting unit 701 detection headset plug microphone part are inserted and are put in place, the testing result that described headset plug testing result output unit 702 obtains according to described Mike's detecting unit 701, whether the output headset plug inserts the testing result that puts in place.
In another embodiment of the present invention, as shown in Figure 8, described terminal can also comprise:
Whether receiver detecting unit 703 is used to detect headset plug receiver part and inserts and put in place;
Described headset plug testing result output unit 702 can also be used for the testing result according to headset plug receiver part and microphone part, and whether the output headset plug inserts the testing result that puts in place.
When earphone to be detected is not with Mike, whether described terminal detects the headset plug microphone part at Mike's detecting unit 701 and inserts on the basis that puts in place, also to partly detect by 703 pairs of headset plug receivers of receiver detecting unit, described headset plug testing result output unit 702 is according to the testing result of described Mike's detecting unit 701 and receiver detecting unit 703, and whether the output headset plug inserts the testing result that puts in place.
In another embodiment of the present invention, as shown in Figure 7, described terminal can also comprise:
Detect timing unit 704, be used to detect timing, when the detection timing arrives default detection time, trigger Mike's detecting unit 701.
In order to make the more reasonable described terminal of detection detect timing, when the detection timing arrives default detection time, trigger Mike's detecting unit 701 and begin the microphone part of headset plug is detected by detecting timing unit 704.
Whether the terminal that the embodiment of the invention provides is inserted and is put in place by detecting the earphone microphone part, and whether the headset plug that can detect band Mike inserts and put in place.The embodiment of the invention has solved in the prior art, because headset plug receiver part is longer, whether only detect the headset plug front end inserts and puts in place, whether the microphone part that can't determine headset plug is also inserted and is put in place, thereby can't correctly judge headset plug and whether insert the problem that puts in place, can detect the earphone of being with Mike more accurately.
The method and the terminal of the detection earphones plug inserting to position that the embodiment of the invention provides can be applied on the visual electronic equipment, as mobile phone, PDA etc., improve the use experience of user to product.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer-readable recording medium, as ROM/RAM, magnetic disc or CD etc.
The above; it only is the embodiment of the embodiment of the invention; but the protection domain of the embodiment of the invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, the protection domain of the embodiment of the invention should be as the criterion with the protection domain of claim.