Summary of the invention
In order to solve the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, the embodiment of the invention provides a kind of electronic equipment, MHL connector, MHL system and connector detection method.Described technical scheme is as follows:
First aspect provides a kind of electronic equipment, comprises processor, portable terminal high-definition audio and video standard interface MHL chip, general-purpose serial bus USB diverter switch, USB interface and power subsystem, and described equipment also comprises:
By first switch of described MHL chip controls and the second switch of being controlled by described processor;
One end and the described processor of described first switch are electrical connected, detection terminal ID in the other end of described first switch and the described USB interface is electrical connected, described first switch is used for when described USB interface is connected with the miscellaneous equipment of non-MHL connector, makes described processor get access to identification signal on the described detection terminal ID;
One end and the described processor of described second switch are electrical connected, detection terminal ID in the other end of described second switch and the described USB interface is electrical connected, described second switch is used for when described USB interface is connected with the MHL connector, make described processor get access to the identification signal whether be used for characterizing on the described detection terminal ID be the MHL connector be scheduled to, so that described processor is selected to allow or forbid exporting audio-video signal in the MHL mode according to described identification signal.
Further, described processor and described MHL chip are electrical connected, the described processor also described USB diverter switch by being in first conducting state and the first data terminal D+ in the described USB interface and the second data terminal D-is electrical connected respectively, and described processor also is electrical connected with described power management chip;
The control end of described MHL chip and described USB diverter switch is electrical connected, and the described MHL chip also described USB diverter switch by being in second conducting state and the first data terminal D+ in the described USB interface and the second data terminal D-is electrical connected respectively;
Power supply terminal VBUS in described power subsystem and the described USB interface is electrical connected.
Second aspect provides a kind of MHL connector, comprises portable terminal high-definition audio and video standard interface MHL chip and general-purpose serial bus USB interface, and described connector also comprises:
The 3rd switch, earth resistance and encryption chip;
Power supply terminal VBUS in the control end of described the 3rd switch and the described USB interface is electrical connected, one end of described the 3rd switch and the detection terminal ID in the described USB interface are electrical connected, the other end of described the 3rd switch when being in first switching state and an end of described earth resistance be electrical connected; The other end of described the 3rd switch when being in second switching state and described encryption chip be electrical connected;
Power supply terminal VBUS in described encryption chip and the described USB interface is electrical connected, described encryption chip is used for when described USB interface is connected with electronic equipment, output is used for characterizing described connector and is the identification signal of predetermined MHL connector, so that the processor in the described electronic equipment is selected to allow or forbid exporting audio-video signal in the MHL mode according to described identification signal;
The other end ground connection of described earth resistance.
Further, described connector also comprises pull-up resistor, and described encryption chip also is electrical connected by the power supply terminal VBUS in described pull-up resistor and the described USB interface.
Further, when the power supply terminal VBUS in the described USB interface was low level, described the 3rd switch was in first switching state; When the power supply terminal VBUS in the described USB interface was high level, described the 3rd switch was in second switching state.
The third aspect provides a kind of MHL system, and described system comprises:
Electronic equipment and the MHL connector that is electrical connected with described electronic equipment;
Described electronic equipment is the as above described electronic equipment of first aspect;
Described MHL connector is the as above described MHL connector of second aspect.
Fourth aspect provides a kind of connector detection method, is used for the described electronic equipment of first aspect, and described method comprises:
Whether the connector of judging the current connection of described USB interface is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to;
If judged result is that the connector of the current connection of described USB interface is the MHL connector of being scheduled to, then allow with MHL mode outputting video signal;
If judged result is that the connector of the current connection of described USB interface is not the MHL connector of being scheduled to, then forbid with MHL mode outputting video signal.
Further, describedly judge whether the connector of the current connection of described USB interface is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to, and comprising:
Obtain identification signal on the described detection terminal ID by the on off state of controlling described first switch and/or second switch, judge according to the described identification signal that gets access to whether the connector of the current connection of described USB interface is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to.
Further, describedly obtain identification signal on the described detection terminal ID by the on off state of controlling described first switch and/or second switch, whether the connector of judging the current connection of described USB interface according to the described identification signal that gets access to is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to, and comprising:
Whether be first predetermined voltage by the voltage on the detection terminal ID in the described USB interface of described MHL chip detection;
If the testing result of described MHL chip is that the voltage on the detection terminal ID in the described USB interface is first predetermined voltage, then be in conducting state by described first switch of described MHL chip controls; Be in second conducting state by the described USB diverter switch of described MHL chip controls; Send interrupt signal by described MHL chip to described processor;
After described processor receives described interrupt signal, detect the state information of described MHL chip by described processor;
Be that the connector of current connection is the MHL connector if the testing result of described processor is the state information of described MHL chip, then control described second switch by described processor and be in conducting state; Control described power subsystem to described power supply terminal VBUS output high level by described processor;
Obtain identification signal by described processor from described detection terminal ID;
If the identification signal that described processor gets access to from described detection terminal ID is the enciphered message of being scheduled to, the connector that then is judged to be the current connection of described USB interface is the MHL connector of being scheduled to;
If the identification signal that described processor gets access to from described detection terminal ID is not the enciphered message of being scheduled to, perhaps described processor does not get access to identification signal from described detection terminal ID, and the connector that then is judged to be the current connection of described USB interface is not the MHL connector of being scheduled to.
Further, describedly obtain identification signal on the described detection terminal ID by the on off state of controlling described first switch and/or second switch, whether the connector of judging the current connection of described USB interface according to the described identification signal that gets access to is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to, and comprising:
Whether the voltage that detects on the described power supply terminal VBUS by described power subsystem is high level;
Detecting by described processor whether voltage on the described detection terminal ID dragged down is second predetermined voltage;
If the testing result of described power subsystem is that the voltage on the described power supply terminal VBUS is high level, and the testing result of described processor be that voltage on the described detection terminal ID do not dragged down is second predetermined voltage; Then control described second switch by described processor and be in conducting state;
Obtain identification signal by described processor from described detection terminal ID;
If described processor is predetermined enciphered message from the identification signal that described detection terminal ID gets access to, the connector that then is judged to be the current connection of described USB interface is the MHL connector of being scheduled to;
If the identification signal that described processor gets access to from described detection terminal ID is not the enciphered message of being scheduled to, perhaps described processor does not get access to identification signal from described detection terminal ID, and the connector that then is judged to be the current connection of described USB interface is not the MHL connector of being scheduled to.
Further, describedly obtain identification signal on the described detection terminal ID by the on off state of controlling described first switch and/or second switch, whether the connector of judging the current connection of described USB interface according to the described identification signal that gets access to is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to, and comprising:
Whether be second predetermined voltage by the voltage on the detection terminal ID in the described USB interface of described MHL chip detection;
If the testing result of described MHL chip is that the voltage on the detection terminal ID in the described USB interface is second predetermined voltage, then be in first conducting state by the described USB diverter switch of described MHL chip controls; Be in conducting state by described first switch of described MHL chip controls, make described processor get access to described second predetermined voltage as identification signal from described detection terminal ID; Control described power subsystem to described power supply terminal VBUS output high level by described processor; And the connector that is judged to be the current connection of described USB interface is not the MHL connector of being scheduled to.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
Obtain identification signal according to first switch on the electronic equipment and/or second switch from detection terminal ID, and then select to allow or forbid exporting audio-video signal in the MHL mode according to the identification signal that gets access to, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, reached electronic equipment and only under the situation of the MHL connector that detects current connection for predetermined MHL connector, just exported audio-video signal to guarantee the effect of signal transmission quality preferably.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Please refer to Fig. 1, it shows a kind of structural representation of electronic apparatus system.This electronic apparatus system comprises: electronic equipment 120, MHL connector 140 and playback equipment 160.
Electronic equipment 120 comprises processor 121, MHL chip 122, USB diverter switch 123, usb 1 24 and power subsystem 125.
Processor 121 is electrical connected with MHL chip 122, the processor also described USB diverter switch by being in first conducting state 123 is electrical connected respectively with the first data terminal D+ and the second data terminal D-in the usb 1 24, and processor 121 also is electrical connected with power subsystem 125; Processor 121 is used for the signal in control and the processing electronic equipment 120.
MHL chip 122 is electrical connected with the control end of USB diverter switch 123, and the MHL chip 122 also USB diverter switch 123 by being in second conducting state is electrical connected respectively with the first data terminal D+ and the second data terminal D-in the usb 1 24; MHL chip 122 is used for the HDMI(High Definition Multimedia Interface with processor 121 outputs, HDMI (High Definition Multimedia Interface)) signal is converted to the MHL signal, then the MHL signal exported to MHL connector 140 by usb 1 24.
USB diverter switch 123 is at usb 1 24 and OTG(On-The-Go) when equipment is connected, be in first conducting state, make usb 1 24 use as the common USB interface.When USB diverter switch 123 is connected with MHL connector 140 at usb 1 24, be in second conducting state, make usb 1 24 use as the MHL interface.Specifically, the detection terminal ID of OTG equipment is directly grounded, and the detection terminal ID of MHL connector 140 is to be that the earth resistance R1 of 1K comes ground connection by resistance, and what electronic equipment 120 can be distinguished current connection according to the voltage on the detection terminal ID is OTG equipment or MHL connector 140.
Usb 1 24 comprises power supply terminal VBUS, the first data terminal D+, the second data terminal D-, detection terminal ID and earth terminal GND.
Power subsystem 125 is used for providing power supply to the power supply terminal VBUS of usb 1 24, so that to 140 power supplies of MHL connector, power subsystem 125 can be PMU(power management unit, Power Management Unit) out-put supply in also can be an independent DC-DC(DC-to-DC) power supply.
MHL connector 140 comprises MHL chip 141 and usb 1 42.
Usb 1 42 is used for linking to each other with electronic equipment 120 by the USB connecting line.Usb 1 42 also comprises power supply terminal VBUS, the first data terminal D+, the second data terminal D-, detection terminal ID and earth terminal GND.
MHL chip 141 is used for the MHL signal of electronic equipment 120 transmission is converted to the HDMI signal.
Playback equipment 160 is used for playing the HDMI signal that 140 transmission of MHL connector come.
As one of the emphasis of the embodiment of the invention and difficult point, the embodiment of the invention is improved above-mentioned electronic apparatus system, have by providing to include whether the MHL connector that detects current connection is electronic equipment and the corresponding MHL connector of the measuring ability of predetermined MHL connector, realize only under the situation of the MHL connector that detects current connection for predetermined MHL, just exporting audio-video signal to guarantee the purpose of signal transmission quality preferably.
Embodiment one
Please refer to Fig. 2, it shows the structural representation of the electronic equipment that the embodiment of the invention one provides.This electronic equipment comprises:
Processor 201, MHL chip 202, USB diverter switch 203, USB interface 204, power subsystem 205, by first switch S 1 of MHL chip 202 controls with by the second switch S2 of processor 201 controls.
One end and the processor 201 of first switch S 1 are electrical connected, detection terminal ID in the other end of first switch S 1 and the USB interface 204 is electrical connected, first switch S 1 is used for when USB interface 204 is connected with the miscellaneous equipment of non-MHL connector, makes processor 201 get access to identification signal on the detection terminal ID;
An end and the processor 201 of second switch S2 are electrical connected, detection terminal ID in the other end of second switch S2 and the USB interface 204 is electrical connected, second switch S2 is used for when USB interface 204 is connected with the MHL connector, make processor 201 get access to the identification signal whether be used for characterizing on the detection terminal ID be the MHL connector be scheduled to, so that described processor is selected to allow or forbid exporting audio-video signal in the MHL mode according to described identification signal.
In sum, the electronic equipment that present embodiment provides, obtain identification signal by first switch and/or second switch from detection terminal ID, and then select to allow or forbid exporting audio-video signal in the MHL mode according to the identification signal that gets access to, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output has reached electronic equipment and has only just exported audio-video signal to guarantee the effect of signal transmission quality preferably under the situation of the MHL connector that detects current connection for predetermined MHL connector.
Embodiment two
Please refer to Fig. 3, it shows the structural representation of the MHL connector that the embodiment of the invention two provides.This MHL connector comprises:
MHL chip 301, USB interface 302, the 3rd switch S 3, earth resistance R1 and encryption chip 303.
Power supply terminal VBUS in the control end of the 3rd switch S 3 and the USB interface 302 is electrical connected, one end of the 3rd switch S 3 and the detection terminal ID in the USB interface 302 are electrical connected, the other end of the 3rd switch S 3 when being in first switching state and the end of earth resistance R1 be electrical connected; The other end of the 3rd switch S 3 when being in second switching state and encryption chip 303 be electrical connected.The other end ground connection of earth resistance R1.
Power supply terminal VBUS in encryption chip 303 and the USB interface 302 is electrical connected, encryption chip 303 is used for when USB interface 302 is connected with electronic equipment, output is used for characterizing this connector and is the identification signal of predetermined MHL connector, so that the processor in the electronic equipment is selected to allow or forbid exporting audio-video signal in the MHL mode according to this identification signal.
In sum, the MHL connector that the embodiment of the invention provides has increased encryption chip, this encryption chip is used for when USB interface is connected with electronic equipment, output is used for characterizing this connector and is the identification signal of predetermined MHL connector, so that the processor in the electronic equipment is selected to allow or forbid exporting audio-video signal in the MHL mode according to this identification signal, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output has reached electronic equipment and has only just exported audio-video signal to guarantee the effect of signal transmission quality preferably under the situation of the MHL connector that detects current connection for predetermined MHL connector.
Embodiment three
Please refer to Fig. 4, it shows the structural representation of the MHL system that the embodiment of the invention three provides.This MHL system comprises: electronic equipment 420, MHL connector 440 and playback equipment 460.
Electronic equipment 420 comprises: processor 421, MHL chip 422, USB diverter switch 423, USB interface 424, power subsystem 425, by first switch S 1 of MHL chip 422 controls with by the second switch S2 of processor 421 controls.Wherein:
Processor 421 is electrical connected with MHL chip 422, the processor 421 also USB diverter switch by being in first conducting state 423 is electrical connected respectively with the first data terminal D+ and the second data terminal D-in the USB interface 424, and processor 421 also is electrical connected with power subsystem 425.
MHL chip 422 is electrical connected with the control end of USB diverter switch 423, and the MHL chip 422 also USB diverter switch 423 by being in second conducting state is electrical connected respectively with the first data terminal D+ and the second data terminal D-in the USB interface 424.
One end and the processor 421 of first switch S 1 are electrical connected, and the detection terminal ID in the other end of first switch S 1 and the USB interface 424 is electrical connected.First switch S 1 is switched between conducting and cut-off state according to the control signal of MHL chip 222.First switch S 1 is used for when USB interface 424 is connected with the miscellaneous equipment of non-MHL connector, makes processor 421 get access to identification signal on the detection terminal ID.
An end and the processor 421 of second switch S2 are electrical connected, and the detection terminal ID in the other end of second switch S2 and the USB interface 424 is electrical connected.Second switch S2 switches between conducting and cut-off state according to the control signal of processor 421, second switch S2 is used for when USB interface 424 is connected with the MHL connector, make processor 421 get access to the identification signal whether be used for characterizing on the detection terminal ID be the MHL connector be scheduled to, so that processor 421 is selected to allow or forbid exporting audio-video signal in the MHL mode according to identification signal.
USB diverter switch 423 is at USB interface 424 and OTG(On-The-Go) when equipment is connected, be in first conducting state, make USB interface 424 use as the common USB interface.When USB diverter switch 423 is connected with MHL connector 440 in USB interface 424, be in second conducting state, make USB interface 424 use as the MHL interface.Specifically, the detection terminal ID of OTG equipment is directly grounded, and the detection terminal ID of MHL connector 440 comes ground connection by the earth resistance R1 that resistance is generally 1K, and what electronic equipment 420 can be distinguished current connection according to the voltage on the detection terminal ID is OTG equipment or MHL connector 440.
USB interface 424 comprises power supply terminal VBUS, the first data terminal D+, the second data terminal D-, detection terminal ID and earth terminal GND.
Power subsystem 425 is used for providing power supply to the power supply terminal VBUS of USB interface 424, so that to 440 power supplies of MHL connector, power subsystem 425 can be PMU(power management unit, Power Management Unit) out-put supply in also can be an independent DC-DC(DC-to-DC) power supply.
MHL connector 440 comprises: MHL chip 441, USB interface 442, the 3rd switch S 3, earth resistance R1, pull-up resistor R2 and encryption chip 443.
USB interface 442 also comprises power supply terminal VBUS, the first data terminal D+, the second data terminal D-, detection terminal ID and earth terminal GND.Wherein, the first data terminal D+ links to each other with MHL chip 441 with the second data terminal D-.
Power supply terminal VBUS in the control end of the 3rd switch S 3 and the USB interface 442 is electrical connected, one end of the 3rd switch S 3 and the detection terminal ID in the USB interface 442 are electrical connected, the other end of the 3rd switch S 3 when being in first switching state and the end of earth resistance R1 be electrical connected the other end ground connection of earth resistance R1; The other end of the 3rd switch S 3 when being in second switching state and encryption chip 443 be electrical connected.When the power supply terminal VBUS in the USB interface 442 was low level, the 3rd switch S 3 was in first switching state; When the power supply terminal VBUS in the USB interface 442 was high level, the 3rd switch S 3 was in second switching state.
Power supply terminal VBUS in encryption chip 443 and the USB interface 442 is electrical connected.Because encryption chip 443 can be divided into encryption chip and the inner encryption chip that does not include pull-up resistor that inside includes pull-up resistor.When encryption chip 443 is inner when not including the encryption chip of pull-up resistor, also include pull-up resistor R2 in the MHL connector 440, encryption chip 443 also is electrical connected by the power supply terminal VBUS in pull-up resistor R2 and the USB interface.The resistance of pull-up resistor R2 can be 100K.Encryption chip 443 is used for when USB interface 442 is connected with electronic equipment, output is used for characterizing connector and is the identification signal of predetermined MHL connector, so that the processor in the electronic equipment is selected to allow or forbid exporting audio-video signal in the MHL mode according to identification signal.
Need to prove that MHL connector 440 can be powered by electronic equipment 420, MHL connector 440 also can be powered by external power supply.Divide with this, can be divided into: by the MHL connector of power electronic equipment with by two kinds of the MHL connectors of external power supply power supply.
When concrete work, electronic equipment 420 can obtain the last signal from MHL connector 420 of detection terminal ID by the on off state of controlling first switch S 1 and second switch S3, this signal can be the signal of encryption chip output, and electronic equipment 420 judges according to the signal that gets access to whether the connector of current connection on the USB interface 424 is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to then.If then allow the output audio-video signal; If not, then forbid exporting audio-video signal.
Playback equipment 460 is used for playing the HDMI signal that 440 transmission of MHL connector come.
In sum, the MHL system that the embodiment of the invention provides, electronic equipment obtains identification signal by first switch and/or second switch from detection terminal ID, and then select to allow or forbid exporting audio-video signal in the MHL mode according to the identification signal that gets access to, and the MHL connector is used for characterizing connector by encryption chip output and is the identification signal of predetermined MHL connector; Solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, reached electronic equipment and only under the situation of the MHL connector that detects current connection for predetermined MHL connector, just exported audio-video signal to guarantee the effect of signal transmission quality preferably.
Embodiment four
Please refer to Fig. 5, it shows the method flow diagram of the connector detection method that the embodiment of the invention four provides.Present embodiment is applied in the electronic equipment that embodiment one or embodiment three provide with this connector detection method, and illustrates as predetermined MHL connector with the MHL connector that embodiment two or embodiment three provide.This connector detection method comprises:
Step 502 judges whether the connector of the current connection of USB interface is the MHL connector of being scheduled to;
Electronic equipment judges whether the connector of the current connection of USB interface is the MHL connector of being scheduled to.Owing to be provided with first switch S 1 and the second switch S2 that links to each other with detection terminal ID in the electronic equipment, electronic equipment can obtain the identification signal on the detection terminal ID by the on off state of controlling first switch S 1 and second switch S2, this identification signal that gets access to can be the enciphered message of encryption chip output, and electronic equipment judges according to the identification signal that gets access to whether the connector of the current connection of USB interface is the portable terminal high-definition audio and video standard interface MHL connector of being scheduled to then.
Step 504 is the MHL connector of being scheduled to if judged result is the connector of the current connection of USB interface, then allows with MHL mode outputting video signal;
If the electronic equipment judged result is that the connector of the current connection of USB interface is the MHL connector of being scheduled to, then allow with MHL mode outputting video signal.
Step 506 is not the MHL connector of being scheduled to if judged result is the connector of the current connection of USB interface, then forbids with MHL mode outputting video signal;
If the electronic equipment judged result is that the connector of the current connection of USB interface is not the MHL connector of being scheduled to, then forbid with MHL mode outputting video signal.
In sum, the connector detection method that the embodiment of the invention provides, make electronic equipment to obtain identification signal from detection terminal ID by first switch and/or second switch, and then select to allow or forbid exporting audio-video signal in the MHL mode according to the identification signal that gets access to, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output has reached electronic equipment and has only just exported audio-video signal to guarantee the effect of signal transmission quality preferably under the situation of the MHL connector that detects current connection for predetermined MHL connector.
Embodiment five
Please refer to Fig. 6, it shows the method flow diagram of the connector detection method that the embodiment of the invention five provides.As the more preferred embodiment that provides based on embodiment four, present embodiment is applied in the electronic equipment that embodiment one or embodiment three provide with this connector detection method, and what this electronic equipment connected is not the MHL connector of being scheduled to, but a common OTG connector illustrates.This connector detection method comprises:
Whether step 601 is second predetermined voltage by the voltage on the detection terminal ID in the MHL chip detection USB interface;
In conjunction with Fig. 7 as can be known, when the USB interface 424 of electronic equipment 420 has aerial lug to insert, whether electronic equipment 420 is second predetermined voltage by the voltage on the detection terminal ID in the MHL chip 422 detection USB interface 424, and second predetermined voltage is the directly grounded earthed voltage of detection terminal ID.Whether namely detect external equipment is OTG connector 430.
Step 602 is second predetermined voltage if the testing result of MHL chip is voltage on the detection terminal ID in the USB interface, then is in first conducting state by MHL chip controls USB diverter switch;
If the testing result of MHL chip 422 is that the voltage on the detection terminal ID in the USB interface 424 is second predetermined voltage, the voltage that namely detects on the detection terminal ID in the USB interface 424 is the directly grounded earthed voltage of detection terminal ID, the connector that current connection then is described is OTG connector 430, electronic equipment 420 is in first conducting state by MHL chip 424 control USB diverter switches 823 so, makes processor 421 be electrical connected respectively by the first data terminal D+ in USB diverter switch 423 and the USB interface 424 and the second data terminal D-.Thereby USB interface 424 can be used as the common USB interface, be allowed communicate between electronic equipment 420 and the OTG equipment 460.
Step 603 is in conducting state by MHL chip controls first switch, makes processor get access to second predetermined voltage as identification signal from detection terminal ID;
Electronic equipment 420 is in conducting state by MHL chip 422 controls first switch S 1, makes the detection terminal ID of processor 421 and USB interface 424 be electrical connected, and gets access to second predetermined voltage as identification signal from detection terminal ID.
Step 604 is exported high level by processor control power subsystem to power supply terminal VBUS;
After the ID detection terminal of processor 421 and USB interface 424 is electrical connected, receive after the ground signalling of ID detection terminal of USB interface 424, electronic equipment 420 by processor 421 control power subsystems 425 to power supply terminal VBUS output high level.Namely detect aerial lug and be after the OTG connector 430, electronic equipment 420 control power subsystems 425 are to power supply terminal VBUS output high level, in order to give the OTG connector 430 power supplies.
Step 605, the connector that is judged to be the current connection of USB interface are not the MHL connectors of being scheduled to;
Electronic equipment 420 judges that the connector of USB interface 424 current connections is not the MHL connector of being scheduled to.
Step 606 forbids exporting audio-video signal in the MHL mode.
Electronic equipment 420 is forbidden exporting audio-video signal in the MHL mode.
In sum, the connector detection method that the embodiment of the invention provides, obtain identification signal on the detection terminal ID by the on off state of controlling first switch, and then detect according to the identification signal that obtains whether the MHL connector that connects is predetermined MHL connector, whether allow or to forbid exporting audio-video signal in the MHL mode selecting, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, reached electronic equipment and only under the situation of the MHL connector that detects current connection for predetermined MHL connector, just exported audio-video signal, to guarantee the effect of signal transmission quality preferably.
Embodiment six
Please refer to Fig. 8, it shows the method flow diagram of the connector detection method that the embodiment of the invention six provides.As the more preferred embodiment that provides based on embodiment four, present embodiment is applied in the electronic equipment that embodiment one or embodiment three provide with this connector detection method, and the predetermined MHL connector that the embodiment two that this electronic equipment connects or embodiment three provide, and should predetermined MHL connector be to be illustrated by the MHL connector that external power supply is powered.This connector detection method comprises:
Step 801, whether the voltage that detects on the power supply terminal VBUS by power subsystem is high level;
In conjunction with Fig. 9, for MHL connector 440, owing to there is the external power supply power supply, then the voltage on the power supply terminal VBUS is high level.When the USB interface 424 of electronic equipment 420 had aerial lug to insert, electronic equipment 420 detected by power subsystem 425 whether the voltage on the power supply terminal VBUS is high level in the USB interface 424.If the testing result of power subsystem 425 is that the voltage on the power supply terminal VBUS is high level in the USB interface 424, then power subsystem 425 can send interrupt signal to processor 421.
Step 802, whether dragged down by the voltage on the processor detection detection terminal ID is second predetermined voltage;
Whether electronic equipment 420 is also dragged down by the voltage on the detection terminal ID in the processor 421 detection USB interface 424 is second predetermined voltage.In the present embodiment, second predetermined voltage is the directly grounded earthed voltage of detection terminal ID.
Need to prove that step 820 can be that the voltage on the power supply terminal VBUS triggers when being high level and carries out in the testing result of step 801.
Step 803 is high level if the testing result of power subsystem is voltage on the power supply terminal VBUS, and the testing result of processor be that voltage on the detection terminal ID do not dragged down is second predetermined voltage; Then be in conducting state by processor control second switch;
If the testing result of power subsystem 425 is that the voltage on the voltage terminal VBUS is high level, and the testing result of processor 421 is that the voltage on the detection terminal ID is not dragged down and is earthed voltage, illustrates that then the external connector of current connection is the MHL connector 440 by external power source.Electronic equipment 420 is in conducting state by processor 421 control second switch S2, makes that the ID detection terminal in processor 421 and the USB interface 424 is electrical connected.Simultaneously, electronic equipment 420 can also be enabled charged state by processor 421 control power subsystems 425.Electronic equipment 420 also needs to be in second conducting state by MHL chip 422 control USB diverter switches
Need to prove that to be dragged down be second predetermined voltage if the testing result of processor 421 is voltage on the detection terminal ID, also is earthed voltage, represents that then aerial lug is the OTG connector, the subsequent treatment mode is identical with a last embodiment, repeats no more.
For MHL connector 440, owing to there is the external power supply power supply, then the voltage on the power supply terminal VBUS is high level, so the 3rd switch S 3 will be in second switching state, makes that the detection terminal ID in the USB interface 442 links to each other with encryption chip 443.
Step 804 is obtained identification signal by processor from detection terminal ID;
Electronic equipment 420 obtains identification signal by processor 421 from detection terminal ID.This identification signal is the enciphered message that is sent by the encryption chip 443 in the MHL connector 440.
Step 805, if the identification signal that processor gets access to from detection terminal ID is the enciphered message of being scheduled to, the connector that then is judged to be the current connection of USB interface is the MHL connector of being scheduled to;
If the identification signal that gets access to from detection terminal ID of processor 421 is the enciphered message of being scheduled to, then to be judged to be the connector of the current connection of USB interface be the MHL connector of being scheduled to electronic equipment 420.
Step 806 allows to export audio-video signal in the MHL mode.
Because the judged result of electronic equipment 420 is that the connector of the current connection of USB interface is the MHL connector of being scheduled to, so electronic equipment 420 allows to export audio-video signal in the MHL mode, make playback equipment 460 can play the audio-video signal of electronic equipment 420 outputs.
Step 807, if the identification signal that processor gets access to from detection terminal ID is not the enciphered message of being scheduled to, perhaps processor does not get access to identification signal from detection terminal ID, and the connector that then is judged to be the current connection of USB interface is not the MHL connector of being scheduled to;
If the identification signal that processor 421 gets access to from detection terminal ID is not the enciphered message of being scheduled to, perhaps processor does not get access to the identification signal of expectation from the detection terminal ID, and then to be judged to be the connector of the current connection of USB interface be not the MHL connector of being scheduled to electronic equipment 420.
Step 808 forbids exporting audio-video signal in the MHL mode.
Because the judged result of electronic equipment 420 is that the connector of the current connection of USB interface is not the MHL connector of being scheduled to, so electronic equipment 420 is forbidden exporting audio-video signal in the MHL mode.
In sum, the connector detection method that the embodiment of the invention provides, on off state by the control second switch obtains identification signal on the detection terminal ID, and then detect according to the signal that obtains whether the MHL connector that connects is predetermined MHL connector, to select permission or to forbid exporting audio-video signal in the MHL mode, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, reached electronic equipment and only under the situation of the MHL connector that detects current connection for predetermined MHL connector, just exported audio-video signal, to guarantee the effect of signal transmission quality preferably.
Embodiment seven
Please refer to Figure 10, it shows the method flow diagram of the connector detection method that the embodiment of the invention seven provides.As the more preferred embodiment that provides based on embodiment four, present embodiment is applied in the electronic equipment that embodiment one or embodiment three provide with this connector detection method, and the predetermined MHL connector that the embodiment two that this electronic equipment connects or embodiment three provide, and should predetermined MHL connector be that MHL connector by power electronic equipment illustrates.This connector detection method comprises:
Whether step 1001 is first predetermined voltage by the voltage on the detection terminal ID in the MHL chip detection USB interface;
In conjunction with Figure 11, when the USB interface 424 of electronic equipment 420 has aerial lug to insert, whether electronic equipment 420 is first predetermined voltage by the voltage on the detection terminal ID in the MHL chip 422 detection USB interface 424, first predetermined voltage is the earthed voltage of detection terminal ID by earth resistance R1 ground connection, and the resistance of this earth resistance R1 is generally 1K.
Step 1002 is first predetermined voltage if the testing result of MHL chip is voltage on the detection terminal ID in the USB interface, then is in conducting state by MHL chip controls first switch;
If the testing result of MHL chip 422 is that the voltage on the detection terminal ID in the USB interface 424 is first predetermined voltage, the connector that then shows current connection is the MHL connector, electronic equipment 420 is in conducting state by MHL chip 422 control first switch S 1, makes processor 421 link to each other with detection terminal ID in the USB interface 424.
Step 1003 is in second conducting state by MHL chip controls USB diverter switch;
Electronic equipment 420 also is in second conducting state by MHL chip 422 control USB diverter switches.Make USB interface 424 use as the MHL interface.
Step 1004 sends interrupt signal by the MHL chip to processor;
Electronic equipment 420 also sends interrupt signal by MHL chip 422 to processor 421.Simultaneously, owing to can set in advance 1 register in the MHL chip, be used for storaging state information, this state information can be divided into: current connection be MHL connector state; With, current connection be not MHL connector state.So the state information that electronic equipment 420 can also be revised self by the MHL chip be: current connection be MHL connector state.
Step 1005 after processor receives interrupt signal, detects the state information of MHL chip by processor;
After processor 421 received interrupt signal, electronic equipment 420 detected the state information of MHL chip by processor 421.
Step 1006 is that the connector of current connection is the MHL connector if the testing result of processor is the state information of MHL chip, then is in conducting state by processor control second switch;
Be that the connector of current connection is the MHL connector if the testing result of processor 421 is the state information of MHL chip, then electronic equipment 420 is in conducting state by processor 421 control second switch S2;
Step 1007 is exported high level by processor control power subsystem to power supply terminal VBUS;
Electronic equipment 420 is also exported high level by processor 421 control power subsystems 425 to power supply terminal VBUS, to 440 power supplies of MHL connector.MHL connector 440 is after power supply terminal VBUS becomes high level, and the 3rd switch S 3 can become second switching state by the first initial switching state, makes that the detection terminal ID in the USB interface 442 links to each other with encryption chip 443.
Step 1008 is obtained identification signal by processor from detection terminal ID;
Electronic equipment 420 obtains identification signal by processor 421 from detection terminal ID.This identification signal is the enciphered message that is sent by the encryption chip 443 in the MHL connector 440.
Step 1009, if the identification signal that processor gets access to from detection terminal ID is the enciphered message of being scheduled to, the connector that then is judged to be the current connection of USB interface is the MHL connector of being scheduled to;
If the identification signal that gets access to from detection terminal ID of processor 421 is the enciphered message of being scheduled to, then to be judged to be the connector of the current connection of USB interface be the MHL connector of being scheduled to electronic equipment 420.
Step 1000 allows to export audio-video signal in the MHL mode.
Because the judged result of electronic equipment 420 is that the connector of the current connection of USB interface is the MHL connector of being scheduled to, so electronic equipment 420 allows to export audio-video signal in the MHL mode, make playback equipment 460 can play the audio-video signal of electronic equipment 420 outputs.
Step 1011, if the identification signal that processor gets access to from detection terminal ID is not the enciphered message of being scheduled to, perhaps processor does not get access to identification signal from detection terminal ID, and the connector that then is judged to be the current connection of USB interface is not the MHL connector of being scheduled to;
If it is not the enciphered message of being scheduled to that processor 421 gets access to identification signal from detection terminal ID, perhaps, processor 421 does not get access to identification signal from detection terminal ID, then to be judged to be the connector of the current connection of USB interface be not the MHL connector of being scheduled to electronic equipment 420.
Step 1012 forbids exporting audio-video signal in the MHL mode.
Because the judged result of electronic equipment 420 is that the connector of the current connection of USB interface is not the MHL connector of being scheduled to, so electronic equipment 420 is forbidden exporting audio-video signal in the MHL mode.
In sum, the connector detection method that the embodiment of the invention provides, on off state by the control second switch obtains identification signal on the detection terminal ID, and then detect according to the identification signal that obtains whether the MHL connector that connects is predetermined MHL connector, to select permission or to forbid exporting audio-video signal in the MHL mode, solved the job insecurity that electronic equipment at will uses the MHL connector to take place, the ropy problem of audio-video signal of output, reached electronic equipment and only under the situation of the MHL connector that detects current connection for predetermined MHL connector, just exported audio-video signal, to guarantee the effect of signal transmission quality preferably.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.