Embodiment
With detailed reference to example embodiment of the present invention, the example of described example embodiment is described in the accompanying drawings.In addition, all may part, in graphic and execution mode, use the identical or similar portions of the element/member/symbology of same numeral.
Fig. 1 is that Fig. 2 A is the block schematic diagram according to the electronic installation of the first embodiment of the present invention according to the flow chart of the earphone detecting method of one embodiment of the invention explanation electronic installation.Please also refer to Fig. 1 and Fig. 2 A, in step S100, the earphone of plug detecting unit 120 detection. electronics 100 connects hole 130 and whether inserts the conductive plug 210 of loudspeaker arrangement 220.In the time that step S100 is "No", plug detecting unit 120 can be got back to step S100 to continue detection.
When conductive plug 210 is when plugged earphone has connect hole 130 (when namely step S100 is "Yes"), enter step S110, audio process 140 closes the recording path of system microphone 250 in closing electronic device 100, and starts the recording path of the ear microphone that is connected to loudspeaker arrangement 220.Secondly, the alternative step of carrying out is that the signal gain value that audio process 140 can improve electronic installation 100 is peak signal yield value.Finally, audio process 140 records to produce recording result (mode of operation of above-mentioned steps S110 will be elaborated at Fig. 3 A-3B) to the microphone contact MIC of conductive plug 210.And after step S110 completes, entered in step S120 by step S110.
In step S120, audio process 140 can be sent to processing unit 150 by recording result, judges for processing unit 150 whether recording result comprises sound source signal.In the time that processing unit 150 judgement recording results comprise sound source signal, enter step S130 from step S120, represent that the loudspeaker arrangement 220 inserting has the function of microphone, the loudspeaker arrangement 220 that is also this insertion is microphone earphone.Then, enter step S135 by step S130, audio process 140 can revert to preset signals yield value by peak signal yield value, and continues the recording path (this part will be elaborated in Fig. 3 A-3B) of the ear microphone that uses loudspeaker arrangement 220.
Relatively, in the time that processing unit 150 judgement recording results do not comprise sound source signal, enter step S140 from step S120, represent that the loudspeaker arrangement 220 inserting does not have the function of microphone, the loudspeaker arrangement 220 that is also this insertion is general earphone or external sound amplifying loudspeaker etc.Then, enter step S145 by step S140, audio process 140 can revert to preset signals yield value by peak signal yield value, and close the recording path of the ear microphone that is connected to loudspeaker arrangement 220, and restart the recording path (this part will be elaborated in Fig. 3 A-3B) of system microphone 250 in electronic installation 100.
It should be noted that in the present embodiment, the step of above-mentioned earphone detecting method need complete in specified time interval.For example, described specified time interval can be within 2 milliseconds (ms), but not as restriction.
Please continue with reference to figure 2A, electronic installation 100 can be notebook computer, panel computer, smart mobile phone, MP3 player ... etc.Electronic installation 100 comprises earphone jack 130, be connected to the plug detecting unit 120 of earphone jack 130 and the audio process 140 in order to the send and receive of audio signal.In the present embodiment, audio process 140 can be audio digital signal processor (Audio DSP), audio codec (Coder decoder, Codec) or the two set, but not as restriction.
In addition, electronic installation 100 also comprises processing unit 150, wherein processing unit 150 can be CPU (the Central Processing Unit in notebook computer or panel computer, and/or bracket signal hub CPU), also can be the embedded wafer that is used in particular for controlling audio process 140, but not as restriction.
In Fig. 2 A, earphone connects hole 130 and sequentially has from left to right tie point 122,124,126 and 128, wherein each tie point can correspond to respectively microphone contact MIC, ground contact GND, R channel contact R and the L channel contact L in conductive plug 210, as shown in Figure 2 A.But, above-mentioned earphone connects the visual actual design/application demand that puts in order of microphone contact MIC, ground contact GND, R channel contact R and L channel contact L in each tie point 122,124,126 and 128 and the conductive plug 210 in hole 130 and changes, but not as restriction.For example, R channel contact R in conductive plug 210 and L channel contact L displacement position mutually, but R channel contact R and L channel contact L displacement position mutually in conductive plug 210, the tie point 126 and 128 that earphone connects hole 130 also needs corresponding displacement position to receive corresponding sound source signal.
In addition, different vendor also can be slightly different for the arrangement mode of microphone contact MIC, ground contact GND in conductive plug 210.Widely to use at present the arrangement mode of the each contact in the conductive plug 210 with microphone contact MIC to have two kinds, the one arrangement mode that normally apple (Apple) company mainly adopts, wherein the ground contact GND in conductive plug 210 is arranged between microphone contact MIC and R channel contact R and L channel contact L, namely be sequentially from left to right microphone contact MIC, ground contact GND, R channel contact R and L channel contact L, therefore earphone connects each tie point in hole 130 and also sequentially corresponds to from left to right tie point 122, 124, 126 and 128 arrangement mode (as shown in Figure 2 A).
Another arrangement mode that normally other companies mainly adopt, wherein the microphone contact MIC in conductive plug 210 is arranged between ground contact GND and R channel contact R and L channel contact L, namely be sequentially from left to right ground contact GND, microphone contact MIC, R channel contact R and L channel contact L, also sequentially correspond to from left to right the arrangement mode of tie point 124,122,126 and 128 therefore earphone connects each tie point in hole 130.But, though only illustrating conductive plug 210, Fig. 2 A there is microphone contact MIC, if loudspeaker arrangement 220 does not have microphone function, in conductive plug 210, do not there is microphone contact MIC, and its position will be done to replace with ground contact GND.
It should be noted that, in the present embodiment, what the detection contact of plug detecting unit 120 and earphone connect that the tie point 128 in hole 130 adopts is normality open circuit (normal open), to such an extent as to the conductive plug 210 that plug detecting unit 120 can detect speaker unit 220 the detection contact of conduction plug detecting unit 120 and earphone connect the tie point 128 in hole 130, if so, the conductive plug 210 that represents speaker unit 220 plugged earphone connects in hole 130.
Fig. 2 B is the block schematic diagram according to the electronic installation of the second embodiment of the present invention.In the present embodiment, what the detection contact of plug detecting unit 120 and earphone connect that the tie point 126 in hole 130 adopts is normality open circuit, to such an extent as to the conductive plug 210 that plug detecting unit 120 can detect speaker unit 220 the detection contact of conduction plug detecting unit 120 and earphone connect the tie point 126 in hole 130, if so, the conductive plug 210 that represents speaker unit 220 plugged earphone connects in hole 130.
Fig. 2 C is the block schematic diagram according to the electronic installation of the third embodiment of the present invention, and Fig. 2 D is the block schematic diagram according to the electronic installation of the fourth embodiment of the present invention.It should be noted, the difference of Fig. 2 C and Fig. 2 D is, in Fig. 2 C, the tie point 124 that the detection contact of plug detecting unit 120 and earphone connect hole 130 adopts the mode of normality open circuit, and in Fig. 2 D, the tie point 124 that the detection contact of plug detecting unit 120 and earphone connect hole 130 adopts the mode of normality closed circuit (normal close), and its object is all that whether plugged earphone connects in hole 130 for conductive plug 210 for judging speaker unit 220.But the detection contact of the plug detecting unit in Fig. 2 A-2D and earphone connect normality open circuit or the closed circuit visual actual design/application demand of annexation of normality that the tie point in hole adopts and change, but not as restriction.
Fig. 3 A is the operation chart according to the audio process of one embodiment of the invention.Please also refer to Fig. 1, Fig. 2 A and Fig. 3 A, in the present embodiment, audio process 140 comprises the recording path 320 of the system microphone 250 in recording path 310 and the connection of electronic devices of the ear microphone that is connected to loudspeaker arrangement 220.Insert the earphone of electronic installation 100 and connect behind hole 130 (being step 100) when plug testing circuit 120 detects the conductive plug 210 of loudspeaker arrangement 220, audio process 140 can close the recording path 320 of system microphone 250 in this electronic installation, and startup is connected to the recording path 310 of the ear microphone of loudspeaker arrangement 220, as shown in Figure 3A, then, the microphone contact MIC of the conductive plug 210 of audio process 140 to loudspeaker arrangement 220 records to produce recording result and is sent to processing unit 150 (being step 110), judge for processing unit 150 whether recording result comprises sound source signal (being step 120).
On the other hand, audio process 140 also comprises signal amplifier 330, and wherein said signal amplifier 330 has signal gain value, gains in order to the recording result for receiving.In the present embodiment, the object that audio process 140 utilizes signal amplifier 330 to gain to the recording result receiving is, in order to allow processing unit 150 more easily judge whether the recording result receiving comprises sound source signal.That is to say, (being step 100) after the conductive plug 210 of loudspeaker arrangement 220 is inserted the earphone of electronic installation 100 to connect hole 130 detected at plug testing circuit 120, it is peak signal yield value that audio process 140 improves the wherein signal gain value of signal amplifier 330, in order to amplify the sound source signal in recording result, even in sound source signal slightly and unconspicuous noise (being step 110), can more clearly judge whether the result of recording comprises sound source signal (being step 120) for processing unit 150.In other words, processing unit 150 can judge whether the loudspeaker arrangement 220 that plugged earphone connects hole 130 has microphone function.
In other embodiments, if processing unit 150 can not need the signal gain value of signal amplifier 330 to adjust to peak signal yield value, just can from recording result, judge environment noise or related audio, this case embodiment also can not need to adjust the signal gain value of electronic installation in step S110, S135 and S145.
Fig. 3 B is the operation chart according to the audio process of one embodiment of the invention.Please also refer to Fig. 1, Fig. 2 A and Fig. 3 B, in the present embodiment, when judging the loudspeaker arrangement 220 that plugged earphone connects hole 130, processing unit 150 do not have after microphone function (being step 140), audio process 140 can be closed the recording path 310 of the ear microphone that is connected to loudspeaker arrangement, and starts the recording path 320 (being step 145) of system microphone 250 in electronic installation.In other words, the loudspeaker arrangement 220 that connects hole 130 due to plugged earphone does not have microphone function, therefore adopt the system microphone 250 in electronic installation 100 to carry out speech voice input function for user.
In addition, it should be noted that, whether the loudspeaker arrangement 220 no matter plugged earphone connects hole 130 has microphone function, judge (after being the step S130 shown in Fig. 1, S140) after whether loudspeaker arrangement 220 has this microphone function at processing unit 150, audio process 140 can revert to preset signals yield value by peak signal yield value by the signal gain value of signal amplifier 330, to avoid electronic installation 100 to receive the noise in the sound source signal after too much gain, and then affect the original radio reception quality of electronic installation.
In sum, electronic installation proposed by the invention and earphone detecting method can insert after the conductive plug of loudspeaker arrangement, directly record to produce recording result for the microphone contact of conductive plug, and judge in recording result whether comprise sound source signal, can judge that the loudspeaker arrangement of insertion has the function of microphone.Also therefore, the present invention only needs or not additionally to connect microphone testing circuit by the detection of software, takies the usage space of electronic installation inside, to such an extent as to can have more polynary selection thereby can save microphone testing circuit in the design of usage space.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or some or all of technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.