CN105407442B - A kind of the plug detection method and its device of ear speaker device - Google Patents
A kind of the plug detection method and its device of ear speaker device Download PDFInfo
- Publication number
- CN105407442B CN105407442B CN201510999814.5A CN201510999814A CN105407442B CN 105407442 B CN105407442 B CN 105407442B CN 201510999814 A CN201510999814 A CN 201510999814A CN 105407442 B CN105407442 B CN 105407442B
- Authority
- CN
- China
- Prior art keywords
- ear speaker
- speaker device
- interrupt signal
- plug
- mobile terminal
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R29/00—Monitoring arrangements; Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2420/00—Details of connection covered by H04R, not provided for in its groups
- H04R2420/05—Detection of connection of loudspeakers or headphones to amplifiers
Landscapes
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Otolaryngology (AREA)
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses the plug detection methods and its device of a kind of ear speaker device, comprising the following steps: sets a left side for ear speaker device or/and right channel to interrupt monitoring pin;Ear speaker device counts interrupt number;If the interrupt number counted on is more than threshold value, determine that ear speaker device has been inserted into terminal device;If being generated in certain time without interrupting, though determine that ear speaker device has been extracted or has been inserted into terminal device and do not used.The present invention can rapidly and accurately realize the detection to headset plugging state by a monitoring earphone left side or/and the interruption situation of right channel.
Description
Technical field
The present invention relates to the terminal communications field more particularly to a kind of plug detection methods of ear speaker device.
Background technique
With the increasing popularization of smart mobile phone, derivative equipment relevant to smart phone is also intimately got up further.Meanwhile with
The maturation of the earphone communication technology, constantly have the listing of headphone terminal equipment, such as earphone line control self-shooting bar, 360 hot keys.Have plenty of
Powered by earphone MIC, some be then carry it is battery powered.For carrying for battery powered ear speaker device, in addition to
The mobile terminals such as mobile phone are wanted outside the plug of test earphone equipment, and ear speaker device itself will also detect whether to be inserted into the shifting such as mobile phone
On dynamic terminal device.
Plug detection for ear speaker device itself, whether the prior art is surpassed by the voltage at test earphone Mike end
Cross threshold value to judge, there are two o'clock deficiencies for this mode: one is influenced by headset mode judgement.Ear speaker device first has to
Judge that the mobile terminals such as mobile phone are European standard or Unite States Standard, then comes further according to the voltage condition of determining Mike's foot
Judge that mobile phone is the state of extraction or insertion, if headset mode judgement failure, the detection to Mike's voltage are exactly wrong
Accidentally, then being exactly inaccurate to the detection of ear speaker device plug;Secondly, this mode need ear speaker device use poll side
Formula is realized, for the headphone terminal equipment relatively low for processor performance is a kind of burden.
Summary of the invention
The present invention in order to overcome the deficiencies of the prior art, provides a kind of plug detection method of ear speaker device, for passing through prison
The interruption situation for surveying an earphone left side or/and right channel, realizes the detection to headset plugging state.
The present invention provides a kind of plug detection method of ear speaker device, comprising the following steps:
S11: it sets a left side for ear speaker device or/and right channel to interrupt monitoring pin;
S12: ear speaker device counts interrupt signal number;
S13: if the interrupt signal number counted on is more than threshold value, determine that ear speaker device has been inserted into terminal device;
If being generated in certain time without interrupt signal, though determine that ear speaker device has been extracted or has been inserted into terminal device and do not used.
Further, it is further comprised the steps of: before the step S11 and ear speaker device is inserted into terminal device, ear speaker device
It is waken up.
Further, though being further comprised the steps of: after the step S13 if it is determined that terminal device has been extracted or be inserted into ear speaker device
But it does not use, then ear speaker device enters low-power consumption or sleep pattern.
The present invention also provides a kind of ear speaker devices with plug detection device, which is characterized in that including plug detection device,
The plug detection device includes:
Headset plug is configured to can receive interrupt signal for being inserted into terminal device;
The microprocessor being connected with the headset plug;The microprocessor includes counter, is configured to headset plug
The detection of the interrupt signal number received;And the microprocessor further includes timer, is configured to after generating from interrupt signal
Start timing;With
Power supply;
Wherein, the microprocessor counts on interrupt signal number more than threshold value, then determines that ear speaker device has been inserted into end
In end equipment;If being generated in certain time without interrupt signal, though determine that terminal device has been extracted or be inserted into ear speaker device
Do not use.
Further, the headset plug is four-section type headset plug.
The present invention also provides the ear speaker device plug detection methods on a kind of mobile terminal, which is characterized in that including following
Step:
S21: related application, and the broadcast message of real-time reception earphone plug are opened in mobile terminal;
S22: mobile terminal is after receiving the information of earphone insertion, at a time interval to the left or/and right channel draws
Human hair combing waste send interrupt signal;
S23: ear speaker device counts on interrupt signal number more than threshold value, then determines that ear speaker device has been inserted into mobile terminal
In, while decision-feedback information is issued to mobile terminal;If time span, which is longer than in the certain time of the time interval, not to be had
Interrupt signal is received, though then determine that ear speaker device has been extracted or has been inserted into terminal device and do not used;
S24: mobile terminal receives ear speaker device and determines that earphone has been inserted into the feedback information in mobile terminal, then enters
It is subsequent to shake hands and normal interworking;It is mobile it is non-shake hands and normal interworking outside, draw high or drag down at certain intervals or/
With right channel pin to generate interrupt signal, when there is normal communication, the pause in action.
Further, step S22, which is further comprised the steps of:, is inserted into ear speaker device in mobile terminal, and ear speaker device is waken up.
Further, interrupt signal described in step S22 is the letter drawing high or dragging down left or/and right channel pin and generate
Number.
The beneficial effects of the present invention are, a kind of plug detection method of ear speaker device is provided, it can be by monitoring earphone
Left or/and right channel interruption situation, rapidly and accurately realizes the detection to headset plugging state.
Detailed description of the invention
Fig. 1 is the flow diagram of the plug detection method of ear speaker device of the present invention;
Fig. 2 is the structural representation of the ear speaker device of the plug detection device of the ear speaker device of the invention with plug detection device
Figure;
Fig. 3 is the ear speaker device plug detection method flow diagram on mobile terminal of the present invention;
Fig. 4 is the flow diagram of the insertion detection of the ear speaker device insertion headphone terminal with plug detection device;
Fig. 5 is the flow diagram of the extraction detection of the ear speaker device insertion headphone terminal with plug detection device.
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 only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Figure 1, the present invention provides a kind of plug detection method of ear speaker device, it the following steps are included:
S11: it sets a left side for ear speaker device or/and right channel to interrupt monitoring pin.It is set as interrupting detection pin
Left or/and right channel also has equipment wake-up, the functions such as data receiver.
S12: ear speaker device counts interrupt signal number.If terminal device is in insertion ear speaker device before insertion
Suspend mode state is then waken up ear speaker device by the interruption that terminal device is sent.
S13: if the interrupt signal number counted on is more than threshold value, determine that ear speaker device has been inserted into terminal device;
If being generated in certain time without interrupt signal, though determine that ear speaker device has been extracted or has been inserted into terminal device and do not used.
Though then ear speaker device enters low-power consumption or sleep mould if it is determined that ear speaker device has been extracted or has been inserted into terminal device but do not used
Formula.
Fig. 2 is referred to, a kind of ear speaker device with plug detection device, ear speaker device is in addition to common loudspeaker, earphone
It further include plug detection device outside the common parts such as line.The plug detection device includes:
Headset plug 1 is configured to can receive interrupt signal for being inserted into terminal device;
The microprocessor 2 being connected with the headset plug;
The microprocessor 2 includes counter 3, is configured to the detection of interrupt signal number received to headset plug;
And the microprocessor 2 includes timer 4, timing being configured to after interrupt signal generates;With
Power supply 5;
Wherein, the microprocessor 2 counts on interrupt signal number more than threshold value, then determines that ear speaker device has been inserted into end
In end equipment;If being generated in certain time without interrupt signal, though determine that terminal device has been extracted or be inserted into ear speaker device
Do not use.
Wherein, the headset plug can be four-section type headset plug, can accomplish to connect with terminal devices such as mobile terminals
The judgement and matching of European standard and Unite States Standard are carried out when connecing.The microprocessor 2 has the basic training such as headset mode judgement
Energy.
The timer 3 realizes that ear speaker device is inserted into terminal by the detection to left (or right) sound channel interrupt signal number
The detection of equipment.It is known that being not that one to have interrupt signal be exactly that ear speaker device has been inserted into mobile terminal.Because being set in earphone
Also interrupt signal can be generated during standby insertion terminal device, counting can effectively prevent earphone not insert in steady situation just judging ear
Whether machine equipment has been inserted into the problem of terminal device leads to judgement failure or fault.
The timer 4 is used for the detection that ear speaker device is extracted from terminal.Since interrupt signal generation after timing, be more than
Think after a certain period of time ear speaker device extracted or terminal device in related application have dropped out, be then shut off ear speaker device to save
About energy consumption.If judging whether ear speaker device has been extracted using the detection of Mike's voltage to ear speaker device, only earphone is set
The standby true Shi Caineng that extracts is detected, cannot accomplish the saving of power consumption in time.
Fig. 3 is referred to, the present invention also provides the ear speaker device plug detection methods on a kind of mobile terminal, including following step
It is rapid:
S21: related application APP, and the broadcast message of real-time reception earphone plug are opened in mobile terminal.If in insertion ear
Mobile terminal is in economize on electricity or sleep pattern before machine equipment, then wakes up mobile device after being inserted into ear speaker device.
S22: after mobile terminal receives the information of earphone insertion, at a time interval to the left or/and right channel draws
Human hair combing waste send interrupt signal.The interrupt signal, which can be, draws high or drags down the interrupt signal that left or/and right channel pin generates,
It can be data packet, the data packet can be the data of fixed format, such as 0xff.
S23: ear speaker device counts on interrupt signal number more than threshold value, then determines that ear speaker device has been inserted into mobile terminal
In simultaneously think mobile terminal issue decision-feedback information;It is not received if time span is longer than in the certain time of the time interval
To interrupt signal, though then determine that ear speaker device has been extracted or has been inserted into terminal device and do not used;
S24: mobile terminal receives ear speaker device and determines that earphone has been inserted into the feedback information in mobile terminal, then enters
It is subsequent to shake hands and normal interworking;Related application is also being run after mobile terminal receives the detection information of earphone extraction
When, then stop the interactive action with ear speaker device.
Below by with plug detection device ear speaker device be inserted into mobile phone terminal for, description ear speaker device into and out
The detection process of mobile terminal.
Fig. 4 is referred to, the flow diagram of the insertion detection of the ear speaker device insertion mobile phone terminal with plug detection device.
In step S301, set a left side for ear speaker device or/and right channel pin to interrupt monitoring pin, and wake up earphone
Equipment.When ear speaker device is in sleep or low-power consumption mode, which can wake up ear speaker device;Work as ear speaker device
When normal work, data can be received according to the height variation for detecting the interrupt signal level.At this point, the APP on mobile phone terminal
Interrupt signal can be sent every certain time interval.
In step S302, ear speaker device opens counter after waking up, and carries out to left or/and right channel interrupt signal number
Statistics.
In step 303, when the interrupt signal number counted on is more than threshold value, then it is assumed that ear speaker device has been inserted into mobile phone
In terminal, counter is closed.
In step S304, to the mode of the ear speaker device of insertion mobile phone terminal, (European standard or Unite States Standard are other
Standard) judged, and Mike's pin is switched according to judging result.
In step S305, pin feedback information is monitored to mobile phone terminal by the interruption.Purpose is to inform that mobile phone etc. moves
Dynamic terminal ear speaker device has been successively inserted into, and can carry out subsequent shake hands or normal communication function.
Fig. 5 is referred to, Fig. 5 is that the process of the extraction detection of the ear speaker device insertion mobile phone terminal with plug detection device is shown
It is intended to.
In step S401, after when ear speaker device end, judgement has been inserted into mobile phone terminal, can normally with the mobile phone of insertion
Terminal communicate.At this point, opening the timer of ear speaker device, start after left or/and right channel interrupt signal arrives
Reclocking.
In step S402, when timing be more than the time interval set in step S301 period in left or/and right channel
There is no interrupt signal generation, then it is assumed that ear speaker device has been extracted or the related application APP of mobile phone terminal has dropped out.
In step 403, ear speaker device enters low-power consumption or sleep pattern, to achieve the purpose that reduce power consumption in time.More than
Described is the preferred embodiment of the present invention, it is noted that for those skilled in the art, is not being departed from
Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention
Range.
Claims (8)
1. a kind of plug detection method of ear speaker device, which comprises the following steps:
S11: it sets a left side for ear speaker device or/and right channel to interrupt monitoring pin;
S12: the microprocessor of ear speaker device counts interrupt signal number;
S13: if counting on terminal device to the interrupt signal number for interrupting monitoring pin transmission is more than threshold value, determine ear
Machine equipment has been inserted into terminal device;If in certain time without interrupt signal generate, determine ear speaker device extracted or
Though being inserted into terminal device but not using.
2. the plug detection method of ear speaker device according to claim 1, which is characterized in that also wrapped before the step S12
It includes step: ear speaker device is inserted into terminal device, after having interrupt signal generation, ear speaker device is waken up.
3. the plug detection method of ear speaker device according to claim 1, which is characterized in that also wrapped after the step S13
Include step: though if it is determined that terminal device has been extracted or be inserted into ear speaker device does not use, then ear speaker device enter low-power consumption or
Sleep pattern.
4. a kind of ear speaker device with plug detection device, which is characterized in that including plug detection device, the plug detection dress
It sets and includes:
Headset plug is configured to can receive interrupt signal for being inserted into terminal device;
The microprocessor being connected with the headset plug;The microprocessor includes counter, is configured to receive headset plug
The detection of the interrupt signal number arrived;And the microprocessor further includes timer, is configured to since after interrupt signal generation
Timing;With
Power supply;
Wherein, the microprocessor counts on terminal device to the interrupt signal number for interrupting monitoring pin transmission more than threshold
Value, then determine that ear speaker device has been inserted into terminal device;If generating in certain time without interrupt signal, determine that earphone is set
Though standby extracted or be inserted into terminal device but do not used.
5. the ear speaker device according to claim 4 with plug detection device, which is characterized in that the headset plug is four
Segmentation headset plug.
6. the ear speaker device plug detection method on a kind of mobile terminal, which comprises the following steps:
S21: related application, and the broadcast message of real-time reception earphone plug are opened in mobile terminal;
S22: mobile terminal when receive earphone insertion information after, at a time interval to the left or/and right channel pin hair
Send interrupt signal;
S23: ear speaker device counts on interrupt signal number more than threshold value, then determines that ear speaker device has been inserted into mobile terminal,
Decision-feedback information is issued to mobile terminal simultaneously;It is not received if time span is longer than in the certain time of the time interval
Interrupt signal, though then determine that ear speaker device has been extracted or has been inserted into terminal device and do not used;
S24: mobile terminal receives ear speaker device and determines that earphone has been inserted into the feedback information in mobile terminal, then enters subsequent
Shake hands and normal interworking;When mobile terminal receive earphone extraction detection information after related application also at runtime,
Then stop the interactive action with ear speaker device.
7. the ear speaker device plug detection method on mobile terminal according to claim 6, which is characterized in that step S22
It further comprises the steps of: and ear speaker device is inserted into mobile terminal, terminal device is waken up.
8. the ear speaker device plug detection method on mobile terminal according to claim 6, which is characterized in that step S22
Described in interrupt signal be the signal drawing high or dragging down left or/and right channel pin and generate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510999814.5A CN105407442B (en) | 2015-12-24 | 2015-12-24 | A kind of the plug detection method and its device of ear speaker device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510999814.5A CN105407442B (en) | 2015-12-24 | 2015-12-24 | A kind of the plug detection method and its device of ear speaker device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105407442A CN105407442A (en) | 2016-03-16 |
CN105407442B true CN105407442B (en) | 2019-03-19 |
Family
ID=55472639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510999814.5A Active CN105407442B (en) | 2015-12-24 | 2015-12-24 | A kind of the plug detection method and its device of ear speaker device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105407442B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107092545B (en) * | 2017-03-27 | 2020-09-04 | 武汉斗鱼网络科技有限公司 | Method and system for detecting earphone plugging state by client |
CN108289219B (en) * | 2017-12-29 | 2021-03-09 | 晶晨半导体(上海)股份有限公司 | Plug-pull detection method of AV signal input interface and terminal equipment |
CN111586549B (en) * | 2020-05-14 | 2022-03-15 | 昆明闻泰通讯有限公司 | Earphone insertion detection circuit |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101917659A (en) * | 2010-07-23 | 2010-12-15 | 惠州Tcl移动通信有限公司 | Detection device, method and mobile terminal of earphone circuit |
CN201733438U (en) * | 2010-07-15 | 2011-02-02 | 广东欧珀移动通信有限公司 | Earphone plugging and pulling detection circuit |
CN102158779A (en) * | 2011-03-31 | 2011-08-17 | 惠州Tcl移动通信有限公司 | Earphone socket and realization method thereof |
CN102752681A (en) * | 2012-06-18 | 2012-10-24 | 歌尔声学股份有限公司 | NFC (near field communication)-based Bluetooth headset and NFC-based Bluetooth communication method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102147913B1 (en) * | 2014-03-14 | 2020-08-25 | 삼성전자주식회사 | Electronic device having function for removing noise |
-
2015
- 2015-12-24 CN CN201510999814.5A patent/CN105407442B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201733438U (en) * | 2010-07-15 | 2011-02-02 | 广东欧珀移动通信有限公司 | Earphone plugging and pulling detection circuit |
CN101917659A (en) * | 2010-07-23 | 2010-12-15 | 惠州Tcl移动通信有限公司 | Detection device, method and mobile terminal of earphone circuit |
CN102158779A (en) * | 2011-03-31 | 2011-08-17 | 惠州Tcl移动通信有限公司 | Earphone socket and realization method thereof |
CN102752681A (en) * | 2012-06-18 | 2012-10-24 | 歌尔声学股份有限公司 | NFC (near field communication)-based Bluetooth headset and NFC-based Bluetooth communication method |
Also Published As
Publication number | Publication date |
---|---|
CN105407442A (en) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102096649B (en) | UART-based sleep wakeup method and device | |
CN105407442B (en) | A kind of the plug detection method and its device of ear speaker device | |
CN102915751A (en) | Method for automatically regulating sound volume and terminal equipment thereof | |
CN203366017U (en) | Building talk-back intelligent terminal and crash restart system for same | |
WO2014121681A1 (en) | Method for card reader to communicate with upper computer | |
US11425520B2 (en) | Method for detecting blocking of microphone and related products | |
CN101977115B (en) | Method and device for realizing power control over Ethernet | |
CN103051997A (en) | Earphone, and terminal equipment and method for controlling audio presentation through earphone | |
RU2008146196A (en) | METHOD FOR REGULATING THE ACTIVATION FREQUENCY IN A WIRELESS COMMUNICATION SYSTEM | |
CN108156651B (en) | Switching control method and system between radio silent state and transmission state | |
CN103209257B (en) | Method for controlling voice assistant through earphone | |
CN109121048A (en) | True wireless stereo headset and its standby management method and device | |
CN103581853A (en) | Method and device for voice broadcast of text message on mobile phone | |
CN106371938B (en) | Smart delays auto shutdown system and its method | |
CN104410751A (en) | Method and system for power saving of mobile phone based on Bluetooth peripheral | |
CN100442893C (en) | Method for preventing mobile terminal earphone keystroke mis-operation and mobile terminal | |
CN216086972U (en) | Power control circuit, earphone charging box and TWS earphone | |
CN105070022A (en) | Meter end device and wireless meter reading system and method | |
CN106131722A (en) | A kind of bluetooth earphone control method | |
CN104821981B (en) | A kind of detection method of earphone operation | |
CN101860983B (en) | Method, system and mobile terminal for entering power saving mode under long connection mode | |
CN112118470A (en) | Awakening method, device and system of set top box and electronic equipment | |
CN106598199A (en) | Mobile terminal, and power-saving control method and system for proximity sensor of mobile terminal | |
CN105407221A (en) | Method and system for palm rejection when using self timer | |
CN102325228B (en) | Method for reducing energy consumption of headset of mobile phone |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |