CN108810701B - A kind of Type-C interface method for detecting abnormality and mobile terminal - Google Patents

A kind of Type-C interface method for detecting abnormality and mobile terminal Download PDF

Info

Publication number
CN108810701B
CN108810701B CN201810678890.XA CN201810678890A CN108810701B CN 108810701 B CN108810701 B CN 108810701B CN 201810678890 A CN201810678890 A CN 201810678890A CN 108810701 B CN108810701 B CN 108810701B
Authority
CN
China
Prior art keywords
type
voltage
interface
mobile terminal
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810678890.XA
Other languages
Chinese (zh)
Other versions
CN108810701A (en
Inventor
邵超杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810678890.XA priority Critical patent/CN108810701B/en
Publication of CN108810701A publication Critical patent/CN108810701A/en
Application granted granted Critical
Publication of CN108810701B publication Critical patent/CN108810701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups

Abstract

The invention discloses a kind of Type-C interface method for detecting abnormality and mobile terminals, this method comprises: whether the first voltage of the CC1 pin of detection mobile terminal Type-C interface and the second voltage of CC2 pin are respectively less than predetermined voltage threshold;If so, whether detection mobile terminal accesses identifiable ear speaker device;In the case where detecting that mobile terminal does not access identifiable ear speaker device, determine that Type-C interface is abnormal.In the embodiment of the present invention, if mobile terminal does not access identifiable ear speaker device, the voltage of the voltage and CC2 pin that then show CC1 pin is respectively less than predetermined voltage threshold, is that it is abnormal to determine that Type-C interface exists at this time as caused by CC1 pin or CC2 pin shorted to earth.It is not necessarily to redefine the pin of Type-C interface in the embodiment of the present invention, so that it may realize the detection of Type-C interface exception, completely compatible existing Type-C interface specification.

Description

A kind of Type-C interface method for detecting abnormality and mobile terminal
Technical field
The present embodiments relate to technical field of mobile terminals more particularly to a kind of Type-C interface method for detecting abnormality and Mobile terminal.
Background technique
As user is to the Image character of mobile terminal and the promotion of quick charge demand, more and more mobile terminals are adopted With Type-C interface.Based on the mobile terminal of Type-C interface, in use, if there is abnormal, example in Type-C interface If Type-C interface has foreign matter or the moist pin shorted to earth for leading to Type-C interface, then it will affect mobile terminal charging or ear The normal use of machine results even in Type-C interface and burns when serious.
In the prior art, when the Type-C interface to mobile terminal detects, need to redefine Type-C interface In the function of pin to be detected the voltage change situation of pin to be detected, last basis are measured using other detection devices later The voltage change situation of pin to be detected determines whether Type-C interface is abnormal.
However, due to the function of redefining pin to be detected in Type-C interface, it is incompatible with Type-C specification, therefore It will lead to the partial function failure of Type-C interface, compatibility is poor.
Summary of the invention
The embodiment of the present invention provides a kind of Type-C interface method for detecting abnormality and mobile terminal, to solve in the prior art The partial function of existing Type-C interface fails, the poor problem of compatibility.
In order to solve the above technical problems, the embodiments of the present invention are implemented as follows:
In a first aspect, the embodiment of the invention also provides a kind of Type-C interface method for detecting abnormality, which comprises
Whether the second voltage of the first voltage and CC2 pin that detect the CC1 pin of mobile terminal Type-C interface is small In predetermined voltage threshold;
In the case where detecting that the first voltage and the second voltage are respectively less than the predetermined voltage threshold, detection Whether the mobile terminal accesses identifiable ear speaker device;
In the case where detecting that the mobile terminal does not access identifiable ear speaker device, the Type-C interface is determined It is abnormal.
Second aspect, the embodiment of the invention also provides a kind of mobile terminal, the mobile terminal includes:
First detection module, the second detection module and determining module, wherein
The first detection module, first voltage and CC2 for detecting the CC1 pin of mobile terminal Type-C interface are drawn Whether the second voltage of foot is respectively less than predetermined voltage threshold;
Second detection module, connect with the first detection module, for the detection in the first detection module It as a result is in the case where being, to detect whether the mobile terminal accesses identifiable ear speaker device;
The determining module is connect with second detection module, for the testing result in second detection module In the case where no, determine that the Type-C interface is abnormal.
The third aspect the embodiment of the invention also provides a kind of mobile terminal, including processor, memory and is stored in institute The computer program that can be run on memory and on the processor is stated, when the computer program is executed by the processor The step of realizing above-mentioned Type-C interface abnormality detection.
Fourth aspect, it is described computer-readable to deposit the embodiment of the invention also provides a kind of computer readable storage medium Computer program is stored on storage media, the computer program realizes above-mentioned Type-C interface abnormality detection when being executed by processor The step of method.
In embodiments of the present invention, it can be examined based on the recognition principle of Type-C earphone and Type-C interface off-note It is abnormal to survey Type-C interface, when the voltage of the CC1 pin of Type-C interface and the voltage of CC2 pin are respectively less than predetermined voltage threshold When, if mobile terminal does not access identifiable ear speaker device, the voltage of the voltage and CC2 pin that show CC1 pin is small It is as caused by the CC1 pin or CC2 pin shorted to earth of Type-C interface, at this point, determining Type-C in predetermined voltage threshold Interface exists abnormal.As it can be seen that in the embodiment of the present invention, without redefining the pin of Type-C interface, so that it may realize Type- The detection of C interface exception, completely compatible existing Type-C interface specification, compatibility is preferably.
Detailed description of the invention
Fig. 1 is the flow chart of Type-C interface method for detecting abnormality provided in an embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the earphone adapter of band Type-C plug provided in an embodiment of the present invention;
Equivalent circuit diagram when Fig. 3 is ear speaker device access mobile terminal provided in an embodiment of the present invention;
Schematic diagram when Fig. 4 is the Type-C interface exception of mobile terminal provided in an embodiment of the present invention;
Fig. 5 is the application scenario diagram of Type-C interface method for detecting abnormality provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of mobile terminal provided in an embodiment of the present invention;
Fig. 7 is the hardware structural diagram for realizing a kind of mobile terminal of each embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of Type-C interface method for detecting abnormality and mobile terminals.First below to this hair The Type-C interface method for detecting abnormality that bright embodiment provides is introduced.
It should be noted that Type-C interface method for detecting abnormality provided in an embodiment of the present invention is suitable for mobile terminal, In practical applications, which may include: smart phone, tablet computer etc., and the embodiment of the present invention is not construed as limiting this.
Fig. 1 is the flow chart of Type-C interface method for detecting abnormality provided in an embodiment of the present invention, as shown in Figure 1, the party Method may comprise steps of: step 101, step 102 and step 103, wherein
Step 101, the first voltage of the CC1 pin of mobile terminal Type-C interface and the second voltage of CC2 pin are detected Whether predetermined voltage threshold is respectively less than;If so, thening follow the steps 102.
In order to make it easy to understand, being set by taking the earphone adapter with Type-C plug, earphone and mobile terminal as an example to earphone Standby recognition principle is introduced.
As shown in Fig. 2, the earphone adapter with Type-C plug, one end of the adapter is the earphone of traditional 3.5mm Socket, for connecting earphone, the other end of the adapter is Type-C plug, for being inserted into the Type-C interface of mobile terminal (also known as Type-C socket).
When the Type-C interface of adapter one end insertion mobile terminal, when the other end is inserted into earphone, at this point, mobile terminal The CC1 (pin is also known as pin foot) and CC2 pin of Type-C interface are connected to the HS_DET pin hardware of adapter, mobile whole The CC1 pin for detecting Type-C interface and CC2 pin is held to pull down to ground by the resistance Ra of adapter.At this point, mobile terminal The CC1 pin of Type-C interface and the voltage of CC2 pin: Vcc1 and Vcc2 are sampled, when Vcc1 and Vcc2 is less than Vra (i.e. simultaneously For the corresponding voltage of Ra) when, mobile terminal has recognized earphone insertion, and earphone insertion detection is completed;Wherein, Vra is earphone inspection Voltage is surveyed, usually 0.15V.
After the completion of earphone insertion detection, mobile terminal enters headset type detection, the electricity according to MIC interface (earphone interface) Pressure is which type of earphone to distinguish: headset, headphone etc..By taking headset as an example, when have headset earphone insert After entering, on hardware access, the HPH_L pin of audio chip in the Dn pin and mobile terminal that the L channel of earphone passes through Type-C Relevant connection;The HPH_R pin associated of audio chip in the Dp pin and mobile terminal that the right channel of earphone passes through Type-C It connects;The microphone of earphone is related to the MIC_INP pin of audio chip in mobile terminal by the SBU1/SBU2 pin of Type-C Connection;The ground wire of earphone is related to the HPH_REF pin of audio chip in mobile terminal by the SBU2/SBU1 pin of Type-C Connection.
As shown in figure 3, Fig. 3 shows the equivalent circuit diagram after headset ear speaker device access mobile terminal, wherein sound The pin of frequency chip is respectively HPH_L pin, HPH_R pin, HPH_REF pin, MIC_BIAS pin and MIC_INP pin, It include HPH_Left PA (left headset amp), HPH_Right PA (right headset amp), MIC bias in audio chip (microphone circuit) and MIC_amp (microphone amplifier), Rl are the earth impedance of left earpiece, and Rr is right earpiece to ground resistance Anti-, Rmic is the earth impedance of microphone.
In the embodiment of the present invention, carried out based on the recognition principle of earphone in Type-C and Type-C interface off-note The detection of Type-C interface exception, wherein the recognition principle of earphone refers to that earphone recognition principle above-mentioned, Type-C interface are different When Chang Tezheng refers to that mobile terminal Type-C interface has foreign matter or humidity, the CC1 pin or CC2 pin of Type-C interface are over the ground This short-circuit feature.
As shown in figure 4, Fig. 4 is shown when the CC1 pin or CC2 pin of the Type-C interface 41 of mobile terminal 40 are short over the ground Lu Shi, the abnormal schematic diagram of caused Type-C interface 41, wherein Rg is the CC1 pin or CC2 pin pair of Type-C interface 41 The equivalent impedance of ground short circuit.
It should be noted that since the voltage that the precondition of headset detection is CC1 pin and CC2 pin is respectively less than Vra, Therefore, it in the embodiment of the present invention, is only used for detection Vrg (Vrg is the corresponding voltage of Rg in Fig. 4) and is less than or equal in the case of Vra Type-C interface it is abnormal.
In the embodiment of the present invention, when receiving the instruction of Type-C interface abnormality detection, mobile terminal can detecte it The first voltage of the CC1 pin of Type-C interface and the second voltage of CC2 pin;Wherein, first voltage is the electricity of CC1 pin Pressure, second voltage are the voltage of CC2 pin.
In the embodiment of the present invention, predetermined voltage threshold Vra, when the first of the CC1 pin of mobile terminal Type-C interface When the second voltage of voltage and CC2 pin is respectively less than Vra, further detects the mobile terminal and whether access identifiable earphone and set It is standby;Otherwise continue to obtain the first voltage of the CC1 pin of mobile terminal Type-C interface and the second voltage of CC2 pin.
Step 102, whether detection mobile terminal accesses identifiable ear speaker device;If it is not, thening follow the steps 103.
In the embodiment of the present invention, can by the detection of earphone standard, come detect mobile terminal whether access it is identifiable Ear speaker device, at this point, above-mentioned steps 102 can specifically include following steps: step 1021 (not shown), wherein
Step 1021, whether detection Type-C interface accesses sets with the preset matched earphone of Type-C interface standard It is standby.
In the embodiment of the present invention, earphone standard detection refers to whether test earphone equipment matches with socket, if Europe Mark earphone insertion be Europe superscript socket, then be matching, if American Standard earphone insertion be American Standard socket, for matching.
As it can be seen that in the embodiment of the present invention, can by test earphone standard, detect Type-C interface whether access in advance If the matched ear speaker device of Type-C interface standard, detection efficiency is higher.
In the embodiment of the present invention, in the case where equivalent circuit shown in Fig. 3, above-mentioned steps 1021 can specifically include following Step: S1, S2, S3, S4 and S5 (not shown), wherein
S1, the MIC_BIAS pin conducting of control audio frequency of mobile terminal chip;
In the embodiment of the present invention, even if the MIC_BIAS pin conducting that mobile terminal passes through control audio frequency of mobile terminal chip Energy MIC_BIAS pin, to control equivalent circuit conducting shown in Fig. 3.
S2, obtain first state subaudio frequency chip MIC_INP pin tertiary voltage and the second state under MIC_INP draw 4th voltage of foot;
In the embodiment of the present invention, first state is the circuit on state in equivalent circuit shown in Fig. 3 under S1 disconnection, Second state is the circuit on state in equivalent circuit shown in Fig. 3 under S1 closure situation.
In the embodiment of the present invention, front and back is operated by detection switch S1, whether the voltage of MIC_INP pin is identical, to examine Survey whether ear speaker device matches with socket;If switch S1 operation front and back, the voltage of MIC_INP pin is identical, i.e. tertiary voltage Equal to the 4th voltage, then show to match;If switch S1 operation front and back, the voltage of MIC_INP pin is not identical, i.e. tertiary voltage Not equal to the 4th voltage, then show to mismatch.
In the embodiment of the present invention, if ear speaker device is matched with socket, can further test earphone type, this When, following steps can also be increased:
In the case where tertiary voltage is equal to the 4th voltage condition, the ear speaker device of mobile terminal access is determined according to tertiary voltage Type;
Specifically, tertiary voltage is equal to the 4th voltage and tertiary voltage is less than the feelings of default first earphone voltage threshold Under condition, the type of the ear speaker device of prompting mobile terminal access is headphone;
It is equal to the 4th voltage and tertiary voltage in tertiary voltage to be greater than default first earphone voltage threshold and be less than default the In the case where two earphone voltage thresholds, the type of the ear speaker device of prompting mobile terminal access is headset;
In the case where tertiary voltage is equal to the 4th voltage and tertiary voltage is greater than default second earphone voltage threshold, mention Show that mobile terminal accesses other kinds of ear speaker device.
For example, default first earphone voltage threshold is 30mV, the second earphone voltage threshold 2.4V is preset.
As it can be seen that under ear speaker device and the matched situation of socket, can also further detect movement in the embodiment of the present invention The type of the ear speaker device of terminal access, and remind to user, so that user understands the type of ear speaker device.
S3 exchanges the microphone MIC and ground wire of audio chip in the case where tertiary voltage is not equal to four voltage The connection type of Ground;
In the embodiment of the present invention, it is contemplated that mobile terminal may support the ear speaker device of multiple standards, for example, propping up simultaneously American Standard and Europe superscript earphone are held, therefore, further earphone standard detection can be carried out, at this point, mobile terminal exchanges audio chip Microphone MIC and ground wire Ground connection type, i.e. switched path, after switched path, test earphone equipment and socket Whether match.
S4 obtains the 6th electricity of the 5th voltage of MIC_INP pin and MIC_INP pin under the 4th state under the third state Pressure;
In the embodiment of the present invention, the third state is the circuit on state under S1 closure situation after switched path, the 4th shape State is the circuit on state under S1 disconnection after switched path.
S5, the 5th voltage be not equal to six voltage in the case where, determine Type-C interface do not access with it is preset The matched ear speaker device of Type-C interface standard.
In the embodiment of the present invention, if after mobile terminal switched path, the voltage of switch S1 operation front and back MIC_INP pin Identical, i.e. the 5th voltage is equal to the 6th voltage, then shows to match, if after mobile terminal switched path, switch S1 operation front and back The voltage of MIC_INP pin is not identical, i.e. the 5th voltage is not equal to the 6th voltage, then shows to mismatch.That is to say, being, CC1 draws Foot and CC2 pin voltage be respectively less than Vra not instead of as mobile terminal access ear speaker device caused by, drawn by CC1 pin or CC2 Caused by foot shorted to earth, i.e., the Type-C interface of mobile terminal exists abnormal.
In the embodiment of the present invention, following steps can also be increased after above-mentioned steps S1:
In the case where the voltage that MIC_INP pin is not detected within a preset period of time, determine that Type-C interface does not connect Enter and the preset matched ear speaker device of Type-C interface standard.For example, preset time period is 30s.
As it can be seen that can be opened after the MIC_BIAS pin conducting of control audio frequency of mobile terminal chip in the embodiment of the present invention Dynamic time-out detection, to avoid causing energy loss long lasting for detection.
Step 103, determine that the Type-C interface of mobile terminal is abnormal.
In the embodiment of the present invention, when the CC1 pin of mobile terminal Type-C interface and CC2 pin voltage are respectively less than Vra, If do not detect ear speaker device access mobile terminal, then it is assumed that be as caused by CC1 pin or CC2 pin shorted to earth, I.e. the Type-C interface of mobile terminal exists abnormal.
In the embodiment of the present invention, following steps can also be increased after above-mentioned steps 103:
Export prompting message, wherein the prompting message is abnormal for prompting Type-C interface to exist.
As it can be seen that can be deposited when abnormal detecting Type-C interface in the embodiment of the present invention, prompt user in time, with Just user can have found in time and using corresponding measure.
In one example, as shown in figure 5, including: mobile terminal 50 in the application scenarios, if the mobile terminal 50 There is exception in Type-C interface 51, and the exception is that the CC1 pin of Type-C interface 51 or CC2 pin shorted to earth cause, that It, can be in mobile terminal 50 after starting Type-C interface abnormality detection in the case where mobile terminal 50 does not access ear speaker device Interface on show " interface exception or ear speaker device are not supported ".For user perspective, due to user understand mobile terminal this When do not access ear speaker device, therefore the Type-C interface of mobile terminal can be determined according to the content shown on mobile terminal 50 It is abnormal.
It as seen from the above-described embodiment, can recognition principle and Type-C interface based on Type-C earphone in the embodiment Off-note is abnormal to detect Type-C interface, when the voltage of the CC1 pin of Type-C interface and the voltage of CC2 pin are respectively less than When predetermined voltage threshold, if mobile terminal does not access identifiable ear speaker device, show that the voltage of CC1 pin and CC2 draw The voltage of foot is respectively less than predetermined voltage threshold, be as caused by the CC1 pin or CC2 pin shorted to earth of Type-C interface, this When, it is abnormal to determine that Type-C interface exists.As it can be seen that in the embodiment of the present invention, without redefining the pin of Type-C interface, just The detection of Type-C interface exception may be implemented, completely compatible existing Type-C interface specification, compatibility is preferably.
Fig. 6 is the structural schematic diagram of mobile terminal provided in an embodiment of the present invention, as shown in fig. 6, the mobile terminal 600, It may include: first detection module 601, the second detection module 602 and determining module 603, wherein
First detection module 601, first voltage and CC2 for detecting the CC1 pin of mobile terminal Type-C interface are drawn Whether the second voltage of foot is respectively less than predetermined voltage threshold;
Second detection module 602, connect with first detection module 601, for the testing result in first detection module 601 In the case where being, detect whether the mobile terminal accesses identifiable ear speaker device;
Determining module 603 is connect with the second detection module 602, is no for the testing result in the second detection module 602 In the case where, determine that Type-C interface is abnormal.
It as seen from the above-described embodiment, can recognition principle and Type-C interface based on Type-C earphone in the embodiment Off-note is abnormal to detect Type-C interface, when the voltage of the CC1 pin of Type-C interface and the voltage of CC2 pin are respectively less than When predetermined voltage threshold, if mobile terminal does not access identifiable ear speaker device, show that the voltage of CC1 pin and CC2 draw The voltage of foot is respectively less than predetermined voltage threshold, be as caused by the CC1 pin or CC2 pin shorted to earth of Type-C interface, this When, it is abnormal to determine that Type-C interface exists.As it can be seen that in the embodiment of the present invention, without redefining the pin of Type-C interface, just The detection of Type-C interface exception may be implemented, completely compatible existing Type-C interface specification, compatibility is preferably.
Optionally, as one embodiment, second detection module 602 may include:
Detection sub-module is connect with the first detection module 601, for the detection in the first detection module 601 It as a result is in the case where being, to detect whether the Type-C interface accesses and the preset matched earphone of Type-C interface standard Equipment.
Optionally, as one embodiment, the detection sub-module may include:
Control unit is connect with the first detection module 601, for the detection knot in the first detection module 601 Fruit is the MIC_BIAS pin conducting that the audio frequency of mobile terminal chip is controlled in the case where being;
First voltage acquiring unit, connect with described control unit, for obtaining the audio chip under first state 4th voltage of the MIC_INP pin under the tertiary voltage of MIC_INP pin and the second state;
Connection type crosspoint is connect with the first voltage acquiring unit, single for obtaining in the first voltage In the case that the tertiary voltage that member is got is not equal to the 4th voltage, the microphone MIC of the audio chip is exchanged With the connection type of ground wire Ground;
Second voltage acquiring unit is connect with connection type crosspoint, for obtaining the MIC_INP under the third state 6th voltage of the MIC_INP pin under 5th voltage of pin and the 4th state;
First determination unit is connect with the second voltage acquiring unit, for obtaining in the second voltage acquiring unit In the case that the 5th voltage got is not equal to the 6th voltage, determine that the Type-C interface is not accessed and preset The matched ear speaker device of Type-C interface standard.
Optionally, as one embodiment, the detection sub-module can also include:
Second determination unit, connect with described control unit, for the MIC_INP to be not detected within a preset period of time In the case where the voltage of pin, determine that the Type-C interface does not access and the preset matched earphone of Type-C interface standard Equipment.
Optionally, as one embodiment, the mobile terminal 600 can also include:
Output module is connect, for exporting prompting message with the determining module, wherein the prompting message is for mentioning It is abnormal to show that the Type-C interface exists.
Fig. 7 is the hardware structural diagram for realizing a kind of mobile terminal of each embodiment of the present invention, as shown in fig. 7, should Mobile terminal 700 includes but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, Sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, Yi Ji electricity The components such as source 711.It will be understood by those skilled in the art that mobile terminal structure shown in Fig. 7 is not constituted to mobile terminal Restriction, mobile terminal may include perhaps combining certain components or different components than illustrating more or fewer components Arrangement.In embodiments of the present invention, mobile terminal include but is not limited to mobile phone, tablet computer, laptop, palm PC, Car-mounted terminal, wearable device and pedometer etc..
Wherein, processor 710, for detecting the first voltage and CC2 pin of the CC1 pin of mobile terminal Type-C interface Second voltage whether be respectively less than predetermined voltage threshold;
In the case where detecting that the first voltage and the second voltage are respectively less than the predetermined voltage threshold, detection Whether the mobile terminal accesses identifiable ear speaker device;
In the case where detecting that the mobile terminal does not access identifiable ear speaker device, the Type-C interface is determined It is abnormal.
In embodiments of the present invention, it can be examined based on the recognition principle of Type-C earphone and Type-C interface off-note It is abnormal to survey Type-C interface, when the voltage of the CC1 pin of Type-C interface and the voltage of CC2 pin are respectively less than predetermined voltage threshold When, if mobile terminal does not access identifiable ear speaker device, the voltage of the voltage and CC2 pin that show CC1 pin is small It is as caused by the CC1 pin or CC2 pin shorted to earth of Type-C interface, at this point, determining Type-C in predetermined voltage threshold Interface exists abnormal.As it can be seen that in the embodiment of the present invention, without redefining the pin of Type-C interface, so that it may realize Type- The detection of C interface exception, completely compatible existing Type-C interface specification, compatibility is preferably.
Optionally, as one embodiment, whether the detection mobile terminal accesses identifiable ear speaker device, wraps It includes:
Detect whether the Type-C interface accesses and the preset matched ear speaker device of Type-C interface standard.
Optionally, as one embodiment, whether the detection Type-C interface is accessed and preset Type-C The matched ear speaker device of interface standard, comprising:
Control the MIC_BIAS pin conducting of the audio frequency of mobile terminal chip;
Obtain first state under the audio chip MIC_INP pin tertiary voltage and the second state under the MIC_ 4th voltage of INP pin;
In the case where the tertiary voltage is not equal to four voltage, the microphone MIC of the audio chip is exchanged With the connection type of ground wire Ground;
Obtain the 5th voltage of the MIC_INP pin and the MIC_INP pin under the 4th state under the third state 6th voltage;
The 5th voltage be not equal to six voltage in the case where, determine the Type-C interface do not access with The preset matched ear speaker device of Type-C interface standard.
Optionally, as one embodiment, the MIC_BIAS pin conducting of the control audio frequency of mobile terminal chip Later, further includes:
In the case where the voltage that the MIC_INP pin is not detected within a preset period of time, determine that the Type-C connects It is not accessed and the preset matched ear speaker device of Type-C interface standard at mouthful.
Optionally, as one embodiment, after the determination Type-C interface exception, further includes:
Export prompting message, wherein the prompting message is abnormal for prompting the Type-C interface to exist.
It should be understood that the embodiment of the present invention in, radio frequency unit 701 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 710 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 701 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 701 can also by wireless communication system and network and other set Standby communication.
Mobile terminal provides wireless broadband internet by network module 702 for user and accesses, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 703 can be received by radio frequency unit 701 or network module 702 or in memory 709 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 703 can also be provided and be moved The relevant audio output of specific function that dynamic terminal 700 executes is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 703 includes loudspeaker, buzzer and receiver etc..
Input unit 704 is for receiving audio or video signal.Input unit 704 may include graphics processor (Graphics Processing Unit, GPU) 7071 and microphone 7042, graphics processor 7071 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 706.Through graphics processor 7071, treated that picture frame can be deposited Storage is sent in memory 709 (or other storage mediums) or via radio frequency unit 701 or network module 702.Mike Wind 7042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output that mobile communication base station can be sent to via radio frequency unit 701 is converted in the case where telephone calling model.
Mobile terminal 700 further includes at least one sensor 705, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 7071, and proximity sensor can close when mobile terminal 700 is moved in one's ear Display panel 7071 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify mobile terminal posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 705 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared sensor etc. are spent, details are not described herein.
Display unit 706 is for showing information input by user or being supplied to the information of user.Display unit 706 can wrap Display panel 7071 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 7071.
User input unit 707 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 707 include touch panel 7071 and Other input equipments 7072.Touch panel 7071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 7071 or in touch panel 7071 Neighbouring operation).Touch panel 7071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 710, receiving area It manages the order that device 710 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Seed type realizes touch panel 7071.In addition to touch panel 7071, user input unit 707 can also include other input equipments 7072.Specifically, other input equipments 7072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 7071 can be covered on display panel 7071, when touch panel 7071 is detected at it On or near touch operation after, send processor 710 to determine the type of touch event, be followed by subsequent processing device 710 according to touching The type for touching event provides corresponding visual output on display panel 7071.Although in Fig. 7, touch panel 7071 and display Panel 7071 is the function that outputs and inputs of realizing mobile terminal as two independent components, but in some embodiments In, can be integrated by touch panel 7071 and display panel 7071 and realize the function that outputs and inputs of mobile terminal, it is specific this Place is without limitation.
Interface unit 708 is the interface that external device (ED) is connect with mobile terminal 700.For example, external device (ED) may include having Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 708 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and By one or more elements that the input received is transferred in mobile terminal 700 or can be used in 700 He of mobile terminal Data are transmitted between external device (ED).
Memory 709 can be used for storing software program and various data.Memory 709 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 709 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 710 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 709, and calls and is stored in storage Data in device 709 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Managing device 710 may include one or more processing units;Preferably, processor 710 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 710.
Mobile terminal 700 can also include the power supply 711 (such as battery) powered to all parts, it is preferred that power supply 711 Can be logically contiguous by power-supply management system and processor 710, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, mobile terminal 700 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor 710, and memory 709 is stored in On memory 709 and the computer program that can run on the processor 710, the computer program are executed by processor 710 Each process of the above-mentioned Type-C interface method for detecting abnormality embodiment of Shi Shixian, and identical technical effect can be reached, to keep away Exempt to repeat, which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each of above-mentioned Type-C interface method for detecting abnormality embodiment when being executed by processor Process, and identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, the computer-readable storage Medium, such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
It should be noted that in the present specification, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or device including a series of elements are not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or device Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or device including the element.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (12)

1. a kind of Type-C interface method for detecting abnormality, which is characterized in that the described method includes:
It is pre- whether the second voltage of the first voltage and CC2 pin that detect the CC1 pin of mobile terminal Type-C interface is respectively less than If voltage threshold;
In the case where detecting that the first voltage and the second voltage are respectively less than the predetermined voltage threshold, described in detection Whether mobile terminal accesses identifiable ear speaker device;
In the case where detecting that the mobile terminal does not access identifiable ear speaker device, determine that the Type-C interface is different Often.
2. the method according to claim 1, wherein the detection mobile terminal whether access it is identifiable Ear speaker device, comprising:
Detect whether the Type-C interface accesses and the preset matched ear speaker device of Type-C interface standard.
3. according to the method described in claim 2, it is characterized in that, the detection Type-C interface whether access in advance If the matched ear speaker device of Type-C interface standard, comprising:
Control the MIC_BIAS pin conducting of the audio frequency of mobile terminal chip;
Obtain first state under the audio chip MIC_INP pin tertiary voltage and the second state under the MIC_INP 4th voltage of pin, wherein the first state is the circuit on state under target switch disconnection, second shape State is the circuit on state under the target switch closure situation;
In the case where the tertiary voltage is not equal to four voltage, the microphone MIC and ground of the audio chip are exchanged The connection type of line Ground;
Obtain the 6th of the 5th voltage of the MIC_INP pin and the MIC_INP pin under the 4th state under the third state Voltage, wherein the third state be the connection type for exchanging the microphone MIC and ground wire Ground of the audio chip it Circuit on state under the target switch closure situation afterwards, the 4th state are in the Mike for exchanging the audio chip Circuit on state after the connection type of wind MIC and ground wire Ground under the target switch disconnection;
In the case where the 5th voltage is not equal to six voltage, determine that the Type-C interface is not accessed and preset The matched ear speaker device of Type-C interface standard.
4. according to the method described in claim 3, it is characterized in that, the MIC_ of the control audio frequency of mobile terminal chip After the conducting of BIAS pin, further includes:
In the case where the voltage that the MIC_INP pin is not detected within a preset period of time, the Type-C interface is determined It does not access and the preset matched ear speaker device of Type-C interface standard.
5. the method according to claim 1, wherein also being wrapped after the determination Type-C interface exception It includes:
Export prompting message, wherein the prompting message is abnormal for prompting the Type-C interface to exist.
6. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
First detection module, the second detection module and determining module, wherein
The first detection module, for detecting the first voltage and CC2 pin of the CC1 pin of mobile terminal Type-C interface Whether second voltage is respectively less than predetermined voltage threshold;
Second detection module, connect with the first detection module, for the testing result in the first detection module In the case where being, detect whether the mobile terminal accesses identifiable ear speaker device;
The determining module is connect with second detection module, is no for the testing result in second detection module In the case where, determine that the Type-C interface is abnormal.
7. mobile terminal according to claim 6, which is characterized in that second detection module includes:
Detection sub-module is connect with the first detection module, is yes for the testing result in the first detection module In the case of, detect whether the Type-C interface accesses and the preset matched ear speaker device of Type-C interface standard.
8. mobile terminal according to claim 7, which is characterized in that the detection sub-module includes:
Control unit is connect with the first detection module, the feelings for being yes in the testing result of the first detection module Under condition, the MIC_BIAS pin conducting of the audio frequency of mobile terminal chip is controlled;
First voltage acquiring unit, connect with described control unit, for obtaining the MIC_ of the audio chip under first state 4th voltage of the MIC_INP pin under the tertiary voltage of INP pin and the second state, wherein the first state is mesh Circuit on state under mark switch disconnection, second state are the circuit conducting under the target switch closure situation State;
Connection type crosspoint is connect with the first voltage acquiring unit, for obtaining in the first voltage acquiring unit In the case that the tertiary voltage got is not equal to the 4th voltage, the microphone MIC and ground of the audio chip are exchanged The connection type of line Ground;
Second voltage acquiring unit is connect with connection type crosspoint, for obtaining the MIC_INP pin under the third state The 5th voltage and the 4th state under the MIC_INP pin the 6th voltage, wherein the third state is described in the exchange The microphone MIC of audio chip is connected with the circuit under target switch closure situation described after the connection type of ground wire Ground State, the 4th state are the institute after exchanging the connection type of microphone MIC and ground wire Ground of the audio chip State the circuit on state under target switch disconnection;
First determination unit is connect with the second voltage acquiring unit, for getting in the second voltage acquiring unit The 5th voltage not equal in the case where the 6th voltage, determine the Type-C interface do not access with it is preset The matched ear speaker device of Type-C interface standard.
9. mobile terminal according to claim 8, which is characterized in that the detection sub-module further include:
Second determination unit, connect with described control unit, for the MIC_INP pin to be not detected within a preset period of time Voltage in the case where, determine that the Type-C interface does not access and set with the preset matched earphone of Type-C interface standard It is standby.
10. mobile terminal according to claim 6, which is characterized in that the mobile terminal further include:
Output module is connect, for exporting prompting message with the determining module, wherein the prompting message is for prompting institute It states Type-C interface and there is exception.
11. a kind of mobile terminal, which is characterized in that including processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, such as claim 1 to 5 is realized when the computer program is executed by the processor Any one of described in Type-C interface abnormality detection the step of.
12. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence realizes that the Type-C interface as described in any one of claims 1 to 5 is abnormal when the computer program is executed by processor The step of detection.
CN201810678890.XA 2018-06-27 2018-06-27 A kind of Type-C interface method for detecting abnormality and mobile terminal Active CN108810701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810678890.XA CN108810701B (en) 2018-06-27 2018-06-27 A kind of Type-C interface method for detecting abnormality and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810678890.XA CN108810701B (en) 2018-06-27 2018-06-27 A kind of Type-C interface method for detecting abnormality and mobile terminal

Publications (2)

Publication Number Publication Date
CN108810701A CN108810701A (en) 2018-11-13
CN108810701B true CN108810701B (en) 2019-12-03

Family

ID=64071988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810678890.XA Active CN108810701B (en) 2018-06-27 2018-06-27 A kind of Type-C interface method for detecting abnormality and mobile terminal

Country Status (1)

Country Link
CN (1) CN108810701B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862457A (en) * 2018-12-25 2019-06-07 维沃移动通信有限公司 Terminal device, adapter and charging method
CN111381118B (en) * 2018-12-28 2022-12-27 北京小米移动软件有限公司 Water inflow detection module, water inflow detection method and terminal
CN110749845A (en) * 2019-10-14 2020-02-04 Oppo(重庆)智能科技有限公司 Socket foreign matter detection method and device, storage medium and terminal
CN111586549B (en) * 2020-05-14 2022-03-15 昆明闻泰通讯有限公司 Earphone insertion detection circuit

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105445604A (en) * 2015-11-06 2016-03-30 上海斐讯数据通信技术有限公司 USB 3.1 C type cable automatic test method
CN105867593A (en) * 2016-05-17 2016-08-17 深圳慧能泰半导体科技有限公司 USB Type-C interface circuit and control device thereof
CN106358125A (en) * 2016-09-09 2017-01-25 北京小米移动软件有限公司 Method and device for audio output
CN106802875A (en) * 2017-01-13 2017-06-06 珠海市魅族科技有限公司 Electronic equipment
CN206470749U (en) * 2017-01-13 2017-09-05 珠海市魅族科技有限公司 Electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652351B2 (en) * 2014-12-23 2017-05-16 Intel Corporation System to detect charger and remote host for type-C connector
CN205826789U (en) * 2016-06-30 2016-12-21 成绎半导体技术(上海)有限公司 A kind of USB Type C interface male Intelligent Measurement and protection circuit
US10331579B2 (en) * 2016-11-22 2019-06-25 Qualcomm Incorporated Universal serial bus (USB) system supporting display alternate mode functionality on a USB type-C adapter
CN108628787B (en) * 2017-03-22 2023-02-07 鸿富锦精密工业(武汉)有限公司 Interface control circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105445604A (en) * 2015-11-06 2016-03-30 上海斐讯数据通信技术有限公司 USB 3.1 C type cable automatic test method
CN105867593A (en) * 2016-05-17 2016-08-17 深圳慧能泰半导体科技有限公司 USB Type-C interface circuit and control device thereof
CN106358125A (en) * 2016-09-09 2017-01-25 北京小米移动软件有限公司 Method and device for audio output
CN106802875A (en) * 2017-01-13 2017-06-06 珠海市魅族科技有限公司 Electronic equipment
CN206470749U (en) * 2017-01-13 2017-09-05 珠海市魅族科技有限公司 Electronic equipment

Also Published As

Publication number Publication date
CN108810701A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108810701B (en) A kind of Type-C interface method for detecting abnormality and mobile terminal
CN107770760B (en) A kind of method and mobile terminal of the type identifying bluetooth equipment
CN109445736A (en) A kind of multi-screen display method and mobile terminal
CN108347759A (en) A kind of anti-interference method and mobile terminal of flexible screen
CN109768810A (en) A kind of signal processing circuit, terminal device and signal processing method
CN109547054A (en) Signal control circuit, terminal device and signal control method
WO2021109931A1 (en) Touch control method and wearable device
CN109639313A (en) A kind of communication control method, system and circuit
CN110212877A (en) A kind of circuit control method, electronic equipment and radio circuit
CN110213686A (en) A kind of detection method and terminal of earphone socket
CN109379145A (en) A kind of signal processing circuit, terminal device and signal processing method
CN109348504A (en) Power detecting method, mobile terminal and power-sensing circuit
CN109407948A (en) A kind of interface display method and mobile terminal
CN110267145A (en) A kind of state display method and terminal device
CN109888928A (en) A kind of terminal and wireless charging control method
CN109995110A (en) A kind of connector, electronic equipment, data transmission method and device
CN109194827A (en) A kind of terminal device, audio frequency signal output and system
CN109061342A (en) A kind of fast charge plug test method and device
CN109144393A (en) A kind of image display method and mobile terminal
CN108683980A (en) A kind of transmission method and mobile terminal of audio signal
CN109831582A (en) Non- response events processing method and terminal
CN107749761B (en) A kind of anti-interference method and mobile terminal
CN109788114A (en) A kind of call handling method and terminal
CN109698711A (en) A kind of radio frequency mould group and terminal device
CN108319440A (en) Audio-frequency inputting method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant