The disclosure requires in " the method and apparatus for audio plug of No. 8 submissions of in July, 2015
Mic/ground position detection " U.S. Provisional Application no.62/189,869 and No. 1 submission of in March, 2016
“method and apparatus for audio plug mic/ground position and load detection”
U.S. Provisional Application no.62/301,913 rights and interests, these applications are hereby incorporated by by reference of text.
Specific embodiment
Fig. 1 show an embodiment according to the disclosure to be configured to matching connector 110 and 210 electric each other
The external equipment 100 of coupling and the exemplary functional block diagram of device 200.
In the embodiment that Fig. 1 describes, external equipment 100 includes the first adapter 110, such as audio jack, and fills
Put 200, such as computer or media player includes the second adapter 210, such as audio sockets.As shown, outside sets
Standby 100 can be electrically coupled to device 200 via the first adapter 110 and 210.And, in the embodiment that Fig. 1 describes, outward
Portion's equipment 100 includes constituting the assembly 120 of headband receiver.In alternative example, assembly 120 is configured to other equipment, all
As speaker, mike etc..And, device 200 includes the assembly outside adapter 210, and these assemblies are collectively referred to as at signal
Reason circuit (not shown).In some instances, the signal processing circuit of device 200 is configured to drive mike reception audio frequency defeated
Enter signal, or drive the one of external equipment 100 when external equipment 100 is connected to device 200 by adapter 110 and 210
Individual or multiple speakers.
External equipment 100, device 200, audio jack 110 and audio sockets 210 are shown as non-limiting example.One
In a little examples, adapter 110 and 210 is other kinds of adapter, and one of adapter is configured to receive another even
Connect device so that the connection terminal at the appropriate section of these adapters is coupled together to external equipment 100 and device
200 electric coupling.In some instances, adapter 110 and 210 is configured as carrying audio signal or the multimedia of analog form
The matching connector of signal.
As shown, the various pieces of audio jack 110 correspond to four coupling parts, including most advanced and sophisticated coupling part
112nd, the first ring coupling part 114, the second ring coupling part 116 and sleeve connection part 118.In some being configured according to 4 poles
In example, audio jack 110 has four detached connection terminals, and this four detached connection terminals are disposed respectively in four
At each part of coupling part 112-118.In other examples according to 3 pole configurations, audio jack 110 has three separation
Connection terminal, the detached connection terminal of two of which is placed on tip connection portion 112 and the first ring coupling part 114
Place, and other connection terminals extend past the second ring coupling part 116 and sleeve connection part 118.According to 2 pole configurations
In some examples, audio jack 110 has two detached connection terminals, and one of connection terminal is placed on top and connects
Part 112, and another connection terminal extends past the first ring coupling part 114, the second ring coupling part 116 and sleeve even
Socket part divides 118.
In some instances, the assembly 120 of external equipment 100 electrically connects the connecting portion of audio jack 110 in every way
Divide so that the audio jack being designed to 4 poles configuration audio jack is adapted to be as 3 poles configuration audio jack or 2 poles
Configuration audio jack;Or be designed to 3 poles configure audio jack audio jack be adapted to be as 2 poles configure audio frequency insert
Head.In some examples according to the present invention, 2 pole configurations are processed as 3 pole configurations.
As non-limiting example, in FIG, assembly 120 forms stereo headset, this stereo wear-type ear
Machine includes left ear speaker 122, right ear speakers 124 and mike 126.Left ear speaker 122 is used as to be coupling in left driving
Load resistance equipment between node (being marked as " hpl ") and ground connection reference mode (being marked as " gnd ").Right ear speakers
124 are used as the load resistance equipment being coupling between right driving node (being marked as " hpr ") and ground connection reference mode gnd.
Mike 126 is coupling between microphone bias/signal node (being marked as " mic ") and ground connection reference mode gnd.At this
In individual example, audio jack 110 has 4 pole configurations, the connection end at wherein left driving node hpl and tip connection portion 112
Son coupling;Right driving node hpr is coupled with the connection terminal at the first ring coupling part 114;Microphone bias/signal node
Mic is coupled with the connection terminal at the second ring coupling part 116;And it is grounded at reference mode gnd and sleeve connection part 118
Connection terminal coupling.
Some various combinations of assembly 120 and the coupling part of audio jack 110 are listed in Table 1 using as unrestricted
Property example.The external equipment 100 of Fig. 1 falls within the situation 2 of table 1.Expression " floating " (" float ") in table 1 indicates right
The connection terminal of the connecting portion office answered does not exist or is not connected to form from power supply to the complete point path with reference to ground connection
(also referred to as " electrically floating ").And, in some instances, the situation 13 in table 1 is implemented as 3 pole audio jack or 2 pole sounds
Frequency socket.Other changes are in the embodiment being contemplated that of the disclosure.
Table 1
Audio sockets 210 are configured to receive audio jack 110 and include each coupling part with audio jack 110
Corresponding coupling part.For example, audio sockets 210 include top connection terminal t corresponding with tip connection portion 112tp;With
The corresponding first ring connection terminal t in one ring coupling part 114r1;With the corresponding second ring connection terminal in the second ring coupling part 116
tr2;Sleeve connection terminal t corresponding with sleeve connection part 118sl.Audio sockets 210 also include inserting detection terminal 212, should
Insertion detection terminal 212 be placed on at one of coupling part 112-118 corresponding position.
Insertion detection terminal 212 is electrically floating and in audio frequency when audio sockets 210 do not receive any audio jack
Socket 210 is received and (is respectively labeled as t with one of these corresponding terminals corresponding terminal during audio jacktp、tr1、tr2Or
tsl) electrical short.Thus, device 200 is known by inserting the electrical characteristics of detection terminal 212 and is known the insertion of audio jack.?
In some examples, insertion detection terminal 212 does not have and the audio jack being inserted into directly electric coupling.On the contrary, insert test side
Son 212 includes by mechanical organ removable electrode, and this electrode be may move by the audio jack being inserted into.In some enforcements
In example, the mechanical organ of insertion detection terminal 212 is in primary importance simultaneously when audio sockets 210 do not receive any audio jack
And it is in the second position when audio sockets 210 receive audio jack.In some instances, insert the electrode of detection terminal 212
It is shorted to ground connection reference mode when mechanical organ is at one of primary importance and second position position and in machine
It is electrically floating when at another position that tool element is in primary importance and the second position.
Further graphic display unit 200 will be carried out with reference to Fig. 2.
Fig. 2 shows the illustrative functions of the device 200 for generating output signal of an embodiment according to the disclosure
Block diagram.
Device 200 includes audio sockets 210.Device 200 also includes controller 222, insertion detector 224, comparator
226th, current-mode digital to analog converter (dac) 232, analog-digital converter (adc) 234, audio codec 242, audio frequency amplifier
244th, switch 252 and 254 and processor 260.Controller 222, insertion detector 224, comparator 226, current-mode digital-to-analogue
Transducer (dac) 232, analog-digital converter (adc) 234, audio codec 242, audio frequency amplifier 244, switch 252 and 254
And processor 260 is collectively referred to as signal processing circuit.
In various embodiments, processor 260 includes individual signals process cores or multiple signal processing core.Processor 260
It is configured to run various application programs so that execution various functions, including by bus audiodTo audio codec 242
Export the audio signal of digital form, pass through bus gaindWith bus gainaAudio codec 242 and/or audio frequency is controlled to put
(multiple) gain amplifier of big device 244.Processor 260 and controller 222 exchange information also by bus data.In some enforcements
In example, (multiple) gain amplifier of one of audio codec 242 and audio frequency amplifier 244 can not adjust, and therefore
Corresponding bus gain can be omitteddAnd gaina.
Controller 222 is logic circuit, the operating and configuring of managing device 200 during detection pattern of this logic circuit
Device 200 is used for normal manipulation mode.During detection pattern, controller 222 obtains insertion with regard to audio jack, is inserted into
The type (for example, which kind of situation in 13 sample situations in table 1) of audio jack, the audio jack that is inserted into is on top
End connection terminal ttpWith the first ring connection terminal tr1The load resistor value of place's measurement.During normal manipulation mode, controller
222 are based on testing result, arrange each assembly and connection terminal t by switching 252 and 254tp、tr1、tr2And tslBetween company
Connect, and correspondingly configuration audio codec 242 and audio frequency amplifier 244, and processor 260 is to audio codec
242 output digital forms audio signals and based on these audio signals be provided for generate output signal gain amplifier.
During normal manipulation mode, controller 222 passes also by bus micdata reception microphone data and by microphone data
Pass processor 260.
During detection pattern, controller 222 is from insertion detector 224 (in the node being marked as " hsdet "), ratio
Compared with device 226 (at the node being marked as " shdet ") and audio frequency amplifier 244 (by being marked as the bus of " toggle ")
Receipt signal.Controller 222 is additionally configured to output control signal and (is being marked as " sw to arrange switch 252mic" node
Place) and switch and 254 (be marked as " swgnd" node at), and export for driving current pattern adc 232 (by quilt
Be labeled as the bus of " micbias ") and audio codec (by being marked as " ctrld" bus) digital value.Control
Device 222 also receives digital value from dac 234 (by being marked as the bus of " micdata ").
In some instances, processor 260 and controller 222 are implemented as integrated logic circuit, and processor 260 He
Controller 222 is therefore replaced by unified controller.
Insertion detector 224 and inserts detection terminal 212 electric coupling and is configured to based on slotting at node hsdet
Entering detection terminal 212 is electrically floating or (is for example grounded reference mode gnd with another connection terminal or ground connection reference modea)
Electrical short, to determine whether audio sockets 210 receive audio jack.In some instances, insertion detector 224 includes pull-up electricity
Resistance device, this pullup resistor be configured to allow voltage level node hsdet at insert detection terminal 212 and another
Connection terminal or ground connection reference mode electrical short when drop to logic low and insertion detection terminal 212 be electrically floating
When the voltage level at node hsdet is moved to high level.
In one embodiment, comparator 226 is configured to detection in the first ring connection terminal tr1Place voltage level be
No more than predetermined threshold voltage and to node shdet export comparative result.In some instances, during detection pattern, when
Audio frequency amplifier 244 is just driving top connection terminal ttpAnd will be with the first ring connection terminal tr1Corresponding output channel setting
During to high resistance output mode, comparator 226 output indication the first ring connection terminal tr1Whether still driven by audio frequency amplifier 244
Dynamic comparative result, this indicates top connection terminal ttpWith the first ring connection terminal tr1Whether by audio jack 110 and/or
The assembly 120 of external equipment 100 is short-circuit.When passage is in high resistance output mode, this passage will not output driving letter
Number and be used as open-circuit.On the contrary, when passage is in drive pattern, this passage output drive signal.
Current-mode dac 232 is configured to node (being marked as " micio ") output bias current, wherein this circuit
The digital current values that provided by bus (being marked as " micbias ") of the controlled device of amount 222 control.Adc 234 is configured
Be by the voltage level conversion at node micio become digital voltage value and by this digital voltage value pass through bus micdata defeated
Go out to controller 222.In some instances, during normal manipulation mode, current-mode dac 232 output bias current, use
To drive the mike 126 in the mike of external equipment being connected to audio sockets 210, such as Fig. 1.In some examples
In, during normal manipulation mode, adc 234 exports digital voltage value, and this digital voltage value represents to be inserted by being connected to audio frequency
The audio signal that mike 126 in the mike of external equipment of mouth 210, such as Fig. 1 obtains.In some instances, in inspection
During survey pattern, current-mode dac232 output test electric current, in order to drive the external equipment being connected to audio sockets 210
Load, and the voltage level at adc 234 detection node micio.Based on the voltage level being detected in view of from test electricity
The current known level of stream, determines the current-voltage relation of this load.
Audio codec 242 generates output signal together with audio frequency amplifier 244, for driving the audio frequency being inserted into insert
The corresponding load resistance of head.In the disclosure, audio codec 242 and audio frequency amplifier 244 are also collectively referred to as signal generation
Circuit.
In one embodiment, audio codec 242 be configured to receive with one or more from controller 222
Respective channel is corresponding, one or more audio signals of digital form.These audio signals pass through bus ctrldOr by
Reason device 260 passes through bus audiodAnd be received, and one or more audio signal passes through bus audioaWith with one or
The corresponding digital form of multiple respective channel is exported to audio frequency amplifier 244.In some instances, audio codec 242
Including digital to analog converter (dac), this dac is configured to generate analog form based on one or more audio signals of digital form
One or more audio signals.Audio codec 242 passes through bus gaindReceive dac gain setting ginseng from processor 260
Number.In some instances, audio codec 242 passes through bus audio in the normal operation perioddReceive audio signal and
Pass through bus ctrl during detection patterndReceive test signal.Audio codec 242 is also by bus ctrlaPut to audio frequency
Big device 244 transmits various control signals, such as indicates one or more passages drive pattern whether to be arranged on, silent mode
Or the control signal of high resistance output mode.
Audio frequency amplifier 244 is configured to adjustment and is in digital form and passes through bus audioaAnd from audio coding decoding
The amplitude of one or more audio signals that device 242 receives.Audio frequency amplifier 244 is additionally configured to audio frequency amplifier 244
The corresponding output terminals amplified audio signal of output using as output signal.During normal manipulation mode, audio frequency amplifies
The lead-out terminal of the device 244 top connection terminal t with audio sockets 210 respectivelytpWith the first ring connection terminal tr1Electric coupling.?
During detection pattern, the current comparator in current comparator, such as audio frequency amplifier 244 is inserted in top connection terminal ttp
Or the first ring connection terminal tr1And the corresponding lead-out terminal of audio frequency amplifier 244 between.Audio frequency amplifier 244 passes through bus
gainaFrom processor 260 reception amplifier gain arrange parameter.In some instances, audio frequency amplifier 244 also include one or
Multiple current comparators, one or more current comparators are configured to compare knot to the output of bus toggle is one or more
Really.In one embodiment, top connection terminal t is passed through in these comparative results instructiontpWith the first ring connection terminal tr1Electric current
Predetermined threshold electric current is reached during detection pattern.In some instances, such instruction is used for measuring each connection terminal
The current level at place.Further detail below with regard to the current comparator in audio frequency amplifier 244 will be described with reference to Fig. 6.
Switch 252 is configured to respond to by bus swmicFrom the control signal of controller 222, selectively will save
Point micio is coupled to the second ring connection terminal tr2Or sleeve connection terminal tsl.Switch 254 is configured to respond to by total
Line swgndFrom the control signal of controller 222, selectively by the second ring connection terminal tr2It is coupled to ground connection reference mode
gndaOr selectively by sleeve connection terminal tslIt is coupled to ground connection reference mode gnda.
When audio jack is inserted in audio sockets 210, voltage electricity at node hsdet for the insertion detector 224
The insertion of flat place's reflection audio jack, and controller 222 is and so knows that the inserting and start in detection pattern of audio jack
Middle operation.
During detection pattern, controller 222 detects the second ring connection terminal t firstr2Or sleeve connection terminal tslIt is
No with ground connection reference mode, the ground connection reference mode gnd electric coupling in such as Fig. 1.In some instances, by a certain amount of
Measure magnitude of voltage at this node when electric current is provided to determine whether connection terminal is coupled with ground connection reference mode.For example, give
Determine the electric current of scheduled volume, if the second ring connection terminal tr2Or sleeve connection terminal tslThe voltage level at place is less than the first threshold
Value, corresponding connection terminal is confirmed as coupling with ground connection reference mode;If greater than the second ring connection terminal tr2Or sleeve
Connection terminal tslThe voltage level at place is more than Second Threshold, and connection terminal is confirmed as and the mike in mike, such as Fig. 1
Biasing/signal node couples.In some instances, Second Threshold is more than first threshold.In some instances, if the second ring connects
Connecting terminal tr2Or sleeve connection terminal tsl, between first threshold and Second Threshold, controller 222 will be by for the voltage level at place
The plug of insertion is identified as corresponding to the device outside the scope of example listed in Table 1.
In some instances, in order to measure the second ring connection terminal t as discussed abover2The voltage at place, controller 222 sets
Put switch 252 with by node micio and the second ring connection terminal tr2Electric coupling and switch 254 is set with by sleeve connection end
Sub- tslWith ground connection reference mode gndaElectric coupling and by the second ring connection terminal tr2With ground connection reference mode gndaSolution electric coupling.
Controller 222 and then control electric current pattern dac 232 is to pass through the second ring connection terminal t by electric currentr2It is injected into audio jack,
And determine the second ring connection terminal t using adc 234r2The voltage level at place.In some instances, in order to measure as begged for above
By sleeve connection terminal tslThe voltage at place, controller 222 setting switch 252 is with by node micio and sleeve connection terminal tsl
Electric coupling and switch 254 is set with by the second ring connection terminal tr2With ground connection reference mode gndaElectric coupling and by sleeve
Connection terminal tslWith ground connection reference mode gndaSolution electric coupling.Controller 222 and then control electric current pattern dac 232 are so that by electricity
Stream passes through sleeve connection terminal tslIt is injected into audio jack, and determine sleeve connection terminal t using adc 234slThe voltage at place
Level.
Based on testing result, controller 222 is it is then determined that audio jack and the second ring connection terminal t of being inserted intor2With
Sleeve connection terminal tslWhether corresponding connection terminal is coupled to ground connection reference mode, and arranges switch 252 and 253 to carry
Suitable connection for consistent with testing result (for example consistent with one of the 13 kinds of situations in table 1).
For example, if audio jack and the second ring connection terminal tr2The connection terminal of coupling is determined to correspond to outer
Microphone bias/signal node mic of portion's equipment, controller 222 setting switch 254 is with by the second ring connection terminal tr2From device
200 ground connection reference mode gndaSolution electric coupling, and switch 252 is set with by the second ring connection terminal tr2It is electrically coupled to node
micio.And, if audio jack and sleeve connection terminal tslThe connection terminal of coupling is determined to correspond to outside and sets
Standby ground connection reference mode, controller 222 setting switch 254 is with by sleeve connection terminal tslIt is electrically coupled to the ground connection of device 200
Reference mode gnda.In this case, controller 222 determines that audio jack has 4 poles, type i configures (corresponding in table 1
Situation 2 and 6-8).
In some other examples, if audio jack and sleeve connection terminal tslThe connection terminal of coupling is true
It is set to microphone bias/signal node mic corresponding to external equipment, controller 222 setting switch 254 is with by sleeve connection end
Sub- tslGround connection reference mode gnd from device 200aSolution electric coupling, and switch 252 is set with by sleeve connection terminal tslThermocouple
It is bonded to node micio.And, if audio jack and the second ring connection terminal tr2It is right that the connection terminal of coupling is confirmed as
Should be in the ground connection reference mode of external equipment, controller 222 setting switch 254 is with by the second ring connection terminal tr2It is electrically coupled to dress
Put 200 ground connection reference mode gnda.In this case, controller 222 also determines that audio jack has 4 poles, type ii is joined
Put (corresponding to the situation 1 in table 1 and 3-5).
In some other examples, if audio jack and the second ring connection terminal tr2With sleeve connection terminal tsl
The connection terminal of coupling is determined to correspond to the ground connection reference mode of external equipment, and controller 222 setting switch 252 is with by the
Bicyclo- connection terminal tr2With sleeve connection terminal tslFrom node micio solves electric coupling, and arranges switch 254 with by the second ring
Connection terminal tr2With sleeve connection terminal tslAll it is electrically coupled to ground connection reference mode gnda.In this case, controller 222 is gone back
Determine that audio jack has 3 pole configurations.
During detection pattern, detecting and configuring the second ring connection terminal tr2With sleeve connection terminal tslAfterwards, control
Device 222 detects in top connection terminal ttpWith the first ring connection terminal tr1The load of the audio jack being inserted into that place measures
Resistance value, and determine top connection terminal ttpWith the first ring connection terminal tr1Whether by the audio jack that is inserted into and quilt
Electrical short.
In order to determine in top connection terminal ttpThe load resistor value of the audio jack being inserted into that place measures, controller
222 by audio frequency amplifier 244 and drive the first ring connection terminal tr1Corresponding output channel is arranged on high capacity output mould
Formula.And, controller 222 setting audio frequency amplifier 244 in case circuit by (electrically route) in audio frequency amplifier
244 corresponding to top connection terminal ttpLead-out terminal and top connection terminal ttpBetween current comparator.Controller
222 are used audio frequency amplifier 244 as voltage supply to be incrementally increased top connection terminal ttpThe voltage level at place, and
And determine whether the electric current obtaining from audio frequency amplifier 244 has reached predetermined current level using current comparator.Institute
The voltage level (such as vx) that the electric current obtaining reaches during predetermined current level (for example, ix) is used for calculating top connection terminal
ttpThe resistance value (such as rx=vx/ix) at place is using as in top connection terminal ttpThe audio jack being inserted into that place measures
Load resistor value.
Driving top connection terminal t as discussed abovetpTo determine the audio jack and top being inserted into
Connection terminal ttpDuring corresponding load resistor value at corresponding connection terminal, comparator 226 also detects the first ring connection terminal tr1
Whether also driven by audio frequency amplifier 244.If comparator 226 detects the first ring connection terminal tr1The voltage level at place exceedes
Predetermined voltage level, controller 222 determines top connection terminal ttpWith the first ring connection terminal tr1Inserted by the audio frequency being inserted into
Head and be short-circuit.In some instances, top connection terminal ttpWith the first ring connection terminal tr1Inserted by the audio frequency being inserted into
Head and be short-circuit, this correspond to table 1 in situation 4,7 and 12.
If top connection terminal ttpWith the first ring connection terminal tr1It is not through the audio jack that is inserted into and short by electricity
Road, controller continues to determine in the first ring connection terminal tr1The load resistor value of the audio jack being inserted into that place measures.
In order to determine in the first ring connection terminal tr1The load resistor value of the audio jack being inserted into that place measures, controls
Device 222 by audio frequency amplifier 244 and drive the first ring connection terminal tr1Corresponding output channel is arranged on high capacity output mould
Formula.And, controller 222 setting audio frequency amplifier 244 is so that circuit is connected corresponding to the first ring by audio frequency amplifier 244
Terminal tr1Lead-out terminal and the first ring connection terminal tr1Between current comparator.According to an embodiment, controller 222
It is used audio frequency amplifier 244 as voltage supply to be incrementally increased the first ring connection terminal tr1The voltage level at place, and
Determine using current comparator whether the electric current obtaining from audio frequency amplifier 244 has reached predetermined current level.Obtaining
The voltage level that reaches during predetermined current level of electric current be used for calculating the first ring connection terminal tr1The current-voltage at place closes
System, and the first ring connection terminal tr1The load resistor value of the audio jack being inserted into that place measures therefore is determined.
Having determined top connection terminal ttpWith the first ring connection terminal tr1Locate measurable audio jack being inserted into
Load resistor value after, controller 222 configuration audio frequency amplifier 244 so that will be with the first ring connection terminal tr1Connect with top
Terminal ttpCorresponding output channel is arranged on drive pattern or high resistance output mode.
In some instances, if the load resistor value measuring is less than the 3rd threshold value, the corresponding connection of the first adapter
Terminal is confirmed as coupling with the ground connection reference mode of the second adapter.For drive the output channel of this connection terminal therefore by
High resistance output mode is set.In some instances, if the load resistor value measuring is more than the 4th threshold value, this load electricity
Resistance is considered Tai Gao and can not effectively be output channels drive, and the corresponding connection terminal of the first adapter is determined as
Electrically floating.Output channel for driving this connection terminal is therefore set to drive pattern or high resistance output mode.?
In some examples, if the load resistor value scope measuring from the 3rd threshold value to the 4th threshold value, this load resistance is considered
In the designed driving force of output channel, and for driving the output channel of this connection terminal to be set to driving mould
Formula.In certain embodiments, the 3rd threshold value is 4ohms, and the 4th threshold value is 1000ohms.
And, controller 222 is to load resistor value determined by processor 260 report.Processor 260 and then setting amplification
Gain, to drive top connection terminal t for generating output signaltpWith the first ring connection terminal tr1.Audio codec
242 and audio frequency amplifier 244 output signal is generated with set gain amplifier.In some instances, export for each
The gain amplifier of signal includes may be used on the first parameter of the dac part of audio codec 242 and/or may be used on audio frequency
Second parameter of the analogue amplifier of amplifier 244.
In some instances, gain amplifier is arranged to proportional to corresponding load resistor value.Thus, if user will
The headband receiver with higher loudspeaker impedance replaces with the headband receiver with relatively low loudspeaker impedance for listening to
The music of device 200 output, the voltage amplitude of drive signal be correspondingly adjusted to minimizing cause uncomfortable experience or
Probability even to the hearing loss of user.In some instances, make based on look-up table, using measured load resistor value
For indexing, gain amplifier is set.
Fig. 3 shows that summarizing of an embodiment according to the disclosure generates the output signal to adapter to be output
Process 300 example flow diagram.It is noted that in various embodiments, before the process 300 that Fig. 3 describes, period and/
Or execute additional operation afterwards.
In certain embodiments, process 300 by control Fig. 2 in device 200 other assemblies controller 222 and process
Device 260 is executing, and the detailed description of therefore some operations may be simplified or omitted.Process 300 start from s301 and
March to s310.
In s310, execution insertion detection process is built with detecting be connected between the first adapter and the second adapter
Vertical.First adapter be configured to receive the second adapter so that it is to be noted that the first adapter and it is to be noted that second connection
Connection terminal at the appropriate section of device is coupled.Be connected between detection the first adapter and the second adapter builds
Vertical, process 300 marches to step s320.
For example, the first adapter corresponds to audio sockets 210, and the second adapter corresponds to audio jack 110.Insertion
Voltage level at node hsdet is arranged at different logic levels by detector 224, these different logic level instructions
Be connected between audio jack and audio sockets is presence or absence of.
In s320, whether the first connection terminal set based on the first adapter is coupled to the ground connection reference of the second adapter
Node come to execute pole configuration determination process.In some instances, pole configuration process include identifying the first adapter and second even
Connect the connection terminal of the ground terminal electric coupling (or being reduced to " electrically grounded ") of device, and be then based on the institute of the first adapter
The coupling part being electrically grounded of identification, determines the type of the second adapter.
For example, controller 222 uses current-mode dac 232 to the second ring connection terminal tr2With sleeve connection terminal tsl
The electric current of injection test one by one, and measure corresponding voltage level using adc 234 or other proper circuit.Base
In such information, controller 222 determines whether the audio jack being inserted into has 3 pole configurations or the configuration of 4 poles.Will be with reference to Fig. 4
Diagram is for the other details of the pole configuration determination process of audio sockets further.
In s330, whether it is coupled to the ground connection ginseng of the second adapter in the first connection terminal set determining the first adapter
After examining node, the one or more connection terminals being confirmed as the ground connection reference mode coupled to the second adapter are electrically coupled to
First adapter occupy the ground connection reference mode of device therein.(multiple) in first connection terminal set of the first adapter
Other connection terminals node suitable with (multiple) couples.
For example, determining the second ring connection terminal tr2Or sleeve connection terminal tslGround connection reference mode with audio jack
After electric coupling, controller 222 setting switch 254 is to be coupled to ground connection reference mode gnd by corresponding connection terminala, and
And switch 252 is set so that the connection terminal not being grounded is passed through node micio and dac 232 and adc 234 electric coupling.
At s340, determine the load of the second controller measuring at the second connection terminal set of the first adapter
Resistance value.In some instances, the current-voltage relation at the first terminal based on the second adapter, determines the second adapter
The first load resistor value, the first terminal of the second adapter is configured to when being coupled to the first adapter to receive first defeated
Go out signal.And, the current-voltage relation at Second terminal based on the second adapter, determine that the second of the second adapter is negative
Carry resistance value, the Second terminal of the second adapter is configured to when being coupled to the first adapter receive the second output signal.
For example, controller 222 is used audio frequency amplifier 244 in one embodiment as voltage source, to audio jack
Corresponding load provides test voltage.And, controller 222 configuration audio frequency amplifier is to re-route connection terminal under test
With the current comparator between the lead-out terminal of the corresponding output channel of audio frequency amplifier 244.Current comparator determines by corresponding to
Load obtain electric current whether reached predetermined current level.Controller 222 be then based on predetermined current level and
The voltage level that electric current reaches during predetermined current level carrys out computational load resistance value.To illustrate further with reference to Fig. 5 and 6 and be directed to sound
The other details of the load detecting process of frequency socket.
In s350, determine the load electricity of the second adapter measuring at the second connection terminal set of the first adapter
After resistance, correspondingly setting is configured to the output channel of the signal generating circuit of the load driving the second adapter.For example,
If the load resistor value measuring at connection terminal is less than lower threshold, this connection terminal is confirmed as being grounded, and
For high resistance output mode is set to by the corresponding output channel of this connection terminal driving load.If in connection terminal
The load resistor value that place measures is more than higher thresholds, and this connection terminal is confirmed as electrically floating, and for by this connection
The corresponding output channel of terminal driving load is set to high resistance output mode or drive pattern.If surveyed at connection terminal
The load resistor value measured between lower threshold and higher thresholds, for the respective channel by this connection terminal driving load
It is set to drive pattern.
For example, determine in top connection terminal ttpWith the first ring connection terminal tr1After the load resistor value that place measures,
The output channel of audio frequency amplifier 244 is correspondingly configured to drive pattern or high resistance output mode by controller 222.
In s360, the gain amplifier for output signal is set based on corresponding load resistor value.In some instances,
Gain amplifier is proportional to corresponding load resistor value.
For example, processor 260 passes through to adjust the gain setting that may be used on audio codec 242 or may be used on sound
Both the gain setting of audio amplifier 244 or adjustment, to arrange the gain amplifier for each output signal.
After s360, process 300 marches to 399 and terminates.
Fig. 4 shows the example flow diagram summarizing pole configuration determination process 400 of an embodiment according to the disclosure.
It is noted that in various embodiments, executed additional operation before, during and/or after the process 400 that Fig. 3 describes.?
In Fig. 4, pole configures the operation s320 that determination process 400 corresponds to Fig. 3, and as illustrated in non-limiting example, pole is joined
Put determination process 400 to the audio sockets that may be used on receiving audio jack.Other kinds of adapter and corresponding modification are can
In the embodiment expected.
In certain embodiments, process 400 to be held by the controller 222 of the other assemblies of the device 200 controlling in Fig. 2
OK, and the detailed description of therefore some operations may be simplified or omitted.Process 400 starts from s401 and marches to
s410.
In s410, initial setting up set is applied to signal generating circuit, so as measurement be inserted into audio jack
Second ring connection terminal, the connection terminal t of such as Fig. 2r2The magnitude of voltage that place measures.
For example, controller 222 setting switch 254 is with by sleeve connection terminal tslWith ground connection reference mode gndaElectric coupling,
And switch 252 is set with by the second ring connection terminal tr2With node micio electric coupling.
In s415, test electric current and be applied to the second ring connection terminal.In some instances, by predetermined amount of time
Increase current level from the zero to predetermined current level step by step, to apply this test electric current.
For example, controller 222 control electric current pattern dac 232 is to be applied to the second ring connection terminal by test electric current
tr2.In some instances, by increasing current level from the zero to 250 μ a step by step on 40 to the period of 60ms, to apply this
Test electric current.
In s420, when test electric current reaches predetermined current level, measure the second ring connection terminal tr2The voltage level at place
(it is represented as v in the diagramr2).The resistance value of the audio jack that be inserted into corresponding with the second ring connection terminal is electric with test
It is proportional that stream reaches the voltage level measuring during predetermined current level.In some instances, in measurement voltage level vr2Afterwards,
The electric current being applied to the second ring connection terminal is reduced to zero.
In s425, apply initial setting up set to signal processing circuit in case measurement be inserted into audio jack, in set
Cylinder connection terminal (the connection terminal t in such as Fig. 2sl) the measured resistance value in place.
For example, controller 222 setting switch 254 is with by the second ring connection terminal tr2It is electrically coupled to ground connection reference mode
gnda, and switch 252 is set with by sleeve connection terminal tslIt is electrically coupled to node micio.
In s430, to sleeve connection terminal tslApply test electric current.In some instances, by predetermined amount of time by
Step ground increases current level from the zero to 250 μ a, to apply this electric current.
For example, controller 222 control electric current pattern dac 232 is to be applied to sleeve connection terminal t by test electric currentsl.
In some instances, by increasing current level from the zero to 250 μ a step by step on 40 to the period of 60ms, to apply this electricity
Stream.
In s435, when test electric current reaches predetermined current level, measuring set of cylinder connection terminal tslPlace voltage level (
It is represented as v in Fig. 4sl).The resistance value of the audio jack that be inserted into corresponding with sleeve connection terminal reaches with test electric current
The voltage level measuring during predetermined current level is proportional.In some instances, in measurement voltage level vslAfterwards, it is applied in
Electric current to the second ring connection terminal is reduced to zero.
In s440, the voltage level v measuringr2And vslCompare with first threshold (being represented as vthl in the diagram).?
Two voltage level vr2And vslWhen being respectively less than first threshold vthl, this process marches to s445, the audio jack being wherein inserted into
Be confirmed as being coupled to ground connection reference mode with the second ring connection terminal and the corresponding connection terminal of sleeve connection terminal.
Therefore, the audio jack of insertion is confirmed as thering is 3 poles configuration (corresponding to 9-13 in table 1).In some instances,
One threshold value vthl is program-controlled.In some instances, first threshold vthl is arranged to 50mv.
As at least one voltage level vr2Or vslDuring equal to or more than first threshold vthl, this process marches to s450.
In s450, voltage level vr2Deduct voltage level vslResult and Second Threshold (being represented as vthd in the diagram)
Relatively.When this result be more than Second Threshold vthd when, this process marches to step s455, be wherein inserted into audio jack,
Connection terminal corresponding with the second ring connection terminal is determined as microphone bias/signal node, and the audio frequency being inserted into
The connection terminal corresponding with sleeve connection part of plug is confirmed as being coupled to ground connection reference mode.Therefore, it is inserted into
Audio jack is confirmed as thering is 4 poles, type i configuration (corresponding in table 12 and 6-8).In some instances, second
Threshold value vthd is program-controlled.In some instances, Second Threshold vthd is arranged to 100mv.
When this result is equal to or less than Second Threshold vthd, this process marches to s460.
In s460, voltage level vslDeduct voltage level vr2Result compare with Second Threshold vthd.When this difference results
During more than Second Threshold vthd, this process marches to step s465, the audio jack and sleeve connection terminal being wherein inserted into
Corresponding connection terminal is determined as microphone bias/signal node, and audio jack and the second ring being inserted into is even
The corresponding connection terminal of connecting terminal is confirmed as being coupled to ground connection reference mode.Therefore, the audio jack being inserted into is determined
For having a case that 4 poles, type ii configuration (corresponding in table 11 and 3-5).
When this result is equal to or less than Second Threshold vthd, this process marches to s470.
In s470, report exceptional result, in order to indicate that the audio jack being inserted into do not fall within 13 kinds listing in Table 1
Any one in predetermined configurations.
After s445, s455, s465 or s470, process 400 marches to s499 and terminates.
Fig. 5 shows the example flow diagram summarizing load detecting process 500 of an embodiment according to the disclosure.Note
Meaning, in various embodiments, executes additional operation before, during and/or after the process 500 described in Figure 5.?
In Fig. 5, this load detecting process corresponds to the s340 in Fig. 3 and may be used on the receiving sound as non-limiting example diagram
The audio sockets of frequency plug.Other kinds of adapter and corresponding modification are in the embodiment being contemplated that.
In certain embodiments, process 500 is executed by the controller 222 of the other assemblies of the device 200 controlling in Fig. 2,
And the detailed description of therefore certain operations may be simplified or omitted.Process 500 starts from s501 and marches to s510.
In s510, measurement is in the top connection terminal t of audio socketstpThe load resistor value of the audio jack being inserted at place
(it is represented as r in Figure 5tp).In certain embodiments, controller 222 using audio frequency amplifier 244 for driving top even
Connecting terminal ttpOutput channel come to top connection terminal ttpTest voltage is provided, until by top connection terminal ttpObtain
Electric current reaches predetermined current level.In certain embodiments, in measurement top connection terminal ttpWhile the resistance value at place, audio frequency
Amplifier 244 for driving the first ring connection terminal tr1Output channel be set to high resistance output mode.
In s515, determine load resistor value rtpWhether it is less than threshold value, such as 4ohms.If load resistor value rtpBeing less than should
Threshold value, the top connection terminal t of the audio jack and audio sockets being inserted intotpCorresponding connection terminal is confirmed as being connect
Ground, and this process marches to s520.If load resistor value rtpEqual to or more than this threshold value, this process marches to s545.
In s520, in the first ring connection terminal t of audio socketsr1The load resistor value of the audio jack that place's measurement is inserted into
(it is represented as r in Figure 5r1).In certain embodiments, controller 222 using audio frequency amplifier 244 for driving the first ring
Connection terminal tr1Output channel come to the first ring connection terminal tr1Test voltage is provided, until by the first ring connection terminal tr1
The electric current obtaining reaches predetermined current level.In certain embodiments, in measurement the first ring connection terminal tr1The resistance value at place
Meanwhile, audio frequency amplifier 244 for driving top connection terminal ttpOutput channel be set to high resistance output mode.
In s525, determine load resistor value rr1Whether it is less than threshold value, such as 4ohms.If load resistor value rr1Being less than should
Threshold value, the audio jack being inserted into be confirmed as being connect with the corresponding connection terminal of the first ring connection terminal of audio sockets
Ground, and this process marches to s530.If load resistor value rr1Equal to or more than this threshold value, this process marches to s540.
In s530, report testing result, the top of the audio jack and audio sockets that the instruction of this testing result is inserted into
Connection terminal ttpWith the first ring connection terminal tr1Corresponding connection terminal is grounded.
In s540, report testing result, the audio jack and top connection terminal t that the instruction of this testing result is inserted intotp
Corresponding connection terminal be grounded and indicate the audio jack being inserted in the first ring connection terminal tr1It is negative that place measures
Carry resistance value rr1.The audio jack being inserted in this case corresponds to the situation 3,6 or 13 in table 1.
In s545, determine top connection terminal ttpWith the first ring connection terminal tr1Whether by the audio jack being inserted into
And be short-circuit.For example, top connection terminal t is determined by comparatortpWith the first ring connection terminal tr1Whether it is short-circuit.When
Top connection terminal ttpWith the first ring connection terminal tr1When being shorted, in the first ring connection terminal tr1It is arranged to high resistance defeated
During exit pattern, the first ring connection terminal tr1Also by for driving top connection terminal ttpOutput channel drive.Therefore, when than
The first ring connection terminal t is detected compared with devicer1Also by for driving top connection terminal ttpOutput channel when driving, top is even
Connecting terminal ttpWith the first ring connection terminal tr1It is confirmed as by the audio jack being inserted into being short-circuit, and this process
March to s550.If top connection terminal ttpWith the first ring connection terminal tr1It is confirmed as not being short-circuit, this process row
Proceed to s560.
In s550, report testing result, this testing result indicates top connection terminal ttpWith the first ring connection terminal tr1Quilt
Electrical short and indicate load resistor value rtp, it is with load resistor value rr1Identical.Because top connection terminal ttpWith the first ring
Connection terminal tr1It is short-circuit, the audio jack being inserted into therefore corresponds to the situation 4,7 or 12 in table 1.
In s560, measurement is in the first ring connection terminal t of audio socketsr1The load resistance of the audio jack being inserted at place
Value rr1.
In s565, determine load resistor value rr1Whether it is less than threshold value, such as 4ohms.If load resistor value rr1Being less than should
Threshold value, the first ring connection terminal t with audio sockets of audio jackr1Corresponding connection terminal is confirmed as being grounded, and
This process marches to s570.If load resistor value rr1Equal to or more than this threshold value, this process marches to s580.
In s570, report testing result, the audio jack that the instruction of this testing result is inserted into the first ring connection terminal
tr1Corresponding link terminal be grounded and indicate the audio jack being inserted in top connection terminal ttpIt is negative that place measures
Carry resistance value rtp.
In s580, report testing result, the audio jack that the instruction of this testing result is inserted in top connection terminal ttp
The load resistor value r of place's measurementtpWith the audio jack being inserted in the first ring connection terminal tr1The load resistor value of place's measurement
rr1.The audio jack being inserted into therefore corresponds to the situation 1,2,5,8,9,10 or 11 in table 1.
After s530, s540, s550, s570 or s580, this process 500 marches to s599 and terminates.
Illustrate for measuring load resistor value, such as operating the example measuring circuit of s510, s520 or s560 with reference to Fig. 6.
Fig. 6 shows the example schematic diagram of the measuring circuit 600 of an embodiment according to the disclosure.Measuring circuit 600
Including for the connection terminal (t being currently at testtpOr tr1) amplifier 610 of corresponding output channel, current comparator
620 and load resistance equipment 630, load resistance equipment 630 represents and is coupled to the connection terminal (t being currently at testtp
Or tr1) the load being inserted into audio jack.In certain embodiments, amplifier 610 and current comparator 620 are embodied in sound
In audio amplifier 244.The same or similar assembly of the assembly with Fig. 2 in Fig. 6 is presented same reference numbers, and therefore saves
Omit detailed description.
In one embodiment, amplifier 610 includes operational amplifier 612 and output stage, and this output stage includes transistor
614 and 616.Amplifier 612 includes non-inverting input terminal 612a, reversed input terminal 612b and lead-out terminal 612c.Non- anti-
Phase input terminal 612a is configured to from bus audioaReceive analogue signal.Reversed input terminal 612b be configured to corresponding
Coupling part ttpOr tr1Electric coupling.Lead-out terminal 612c and the gate terminal electric coupling of transistor 614.Transistor 614 He
616 in power line vsuppWith corresponding coupling part ttpOr tr1Between series coupled.The gate terminal of transistor 616 is configured to
Receive bias voltage vb.
In some instances, the audio frequency amplifier 244 of Fig. 2 includes n amplifier 610, and each is used in n output channel
An output channel, wherein n is positive integer.In some instances, audio frequency amplifier 244 includes being shared by n amplifier 610
Only one current comparator 620.In some instances, audio frequency amplifier 244 is included by being more than that n amplifier 610 is shared
The current comparator 620 of one.In at least one example, audio frequency amplifier 244 includes n current comparator 620, each use
In one of n amplifier 610 amplifier.
During detection pattern, amplifier 610 passes through bus audioaTest is received at non-inverting input terminal 612a
Voltage signal vtest, and by the voltage level mirror image at non-inverting input terminal 612a to inverting terminal 612b.Show at some
In example, apply test voltage by increasing this voltage level from the zero to predetermined voltage level step by step within a predetermined period of time.
For example, this voltage level increases to 250mv by the every step-length of 0.5mv from 0v within the persistent period of 100ms.
Current comparator 620 is included in power line vsuppThe transistor 622 and 624 being connected in series and node nc between.Electricity
Stream comparator 620 also includes reference current source 626 and the phase inverter 628 coupling with node nc.The gate terminal of transistor 622 with
The gate terminal electric coupling of transistor 614.The gate terminal of transistor 624 and the gate terminal electric coupling of transistor 616.Crystal
Pipe 622 and 624 is configured to the electric current i of load 630 acquisitionloadTest electric current i is mirrored to estimated rate mtest.Test electricity
Stream itestWith the reference current i being generated by reference current source 626refCompetition, so as by the input terminal of phase inverter 628 (for example
At node nc) voltage level move logic high or logic low to.As test voltage signal vtestVoltage level by
When step ground increases, test electric current itestIncrease.
Phase inverter 628 is configured in test electric current itestLess than reference current irefWhen output high logic level and
Test electric current itestEqual to or more than reference current irefWhen output ground logic level.Bus is passed through in the output of phase inverter 628
Toggle is transferred to controller 222.Once the output of phase inverter 628 is switched to logic low from logic high, control
The resistance value loading 630 is calculated as v by device 222 processedtoggle/m·iref, wherein vtoggleRepresent the logic of the output in phase inverter
The voltage level v of test signal when state changetest.
Although describe each side of the disclosure already in connection with the specific embodiment being given as example, it is right to make
The alternate ways of these examples, modifications and variations.Thus, embodiment set forth herein is intended to be illustrative and non-limiting
's.The scope without departing from given claim can be made a change.