CN105407442A - Plugging detection method and device for earphone apparatus - Google Patents

Plugging detection method and device for earphone apparatus Download PDF

Info

Publication number
CN105407442A
CN105407442A CN201510999814.5A CN201510999814A CN105407442A CN 105407442 A CN105407442 A CN 105407442A CN 201510999814 A CN201510999814 A CN 201510999814A CN 105407442 A CN105407442 A CN 105407442A
Authority
CN
China
Prior art keywords
speaker device
ear speaker
mobile terminal
plug
earphone
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.)
Granted
Application number
CN201510999814.5A
Other languages
Chinese (zh)
Other versions
CN105407442B (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.)
Guangzhou Xthinking Electronic Technology Co Ltd
Original Assignee
Guangzhou Xthinking Electronic Technology 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 Guangzhou Xthinking Electronic Technology Co Ltd filed Critical Guangzhou Xthinking Electronic Technology Co Ltd
Priority to CN201510999814.5A priority Critical patent/CN105407442B/en
Publication of CN105407442A publication Critical patent/CN105407442A/en
Application granted granted Critical
Publication of CN105407442B publication Critical patent/CN105407442B/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
    • H04R29/00Monitoring arrangements; Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/05Detection 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)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a plugging detection method and device for an earphone apparatus. The plugging detection method for the earphone apparatus comprises the following steps: setting a left or/and right channel of the earphone apparatus to be an interruption monitoring pin; counting the times of interruption by the earphone apparatus; if the counted times of interruption exceeds a threshold, judging that the earphone apparatus is plugged in a terminal apparatus; if no interruption occurs in a certain period of time, judging that the earphone apparatus is plugged out or plugged in without being in use. According to the plugging detection method and device for the earphone apparatus, detection on a plugging state of an earphone can be quickly and accurately achieved by monitoring interruption of the left or/and right channel of the earphone.

Description

A kind of plug detection method of ear speaker device and device thereof
Technical field
The present invention relates to terminal communication field, particularly relate to a kind of plug detection method of ear speaker device.
Background technology
Day by day universal along with smart mobile phone, the derivative equipment relevant to smart mobile phone also further intimately gets up.Meanwhile, along with the maturation of the earphone communication technology, headphone terminal equipment is constantly had to go on the market, as earphone line control self-shooting bar, 360 hot keys etc.Have plenty of and powered by earphone MIC, have be then carry battery powered.For carrying battery powered ear speaker device, except the plug that the mobile terminals such as mobile phone want Test earphone equipment, whether ear speaker device itself also will detect and be inserted on the mobile terminal devices such as mobile phone.
Plug for ear speaker device itself detects, and prior art is all whether the voltage held by Test earphone Mike exceedes threshold value to judge, this mode exists 2 deficiencies: one, the impact judged by headset mode.First ear speaker device will judge that the mobile terminals such as mobile phone are European standard or Unite States Standard, and then judge state that is that mobile phone is extracted or that insert according to the voltage condition of the Mike's pin determined, if headset mode judges unsuccessfully, then to the detection mistake of Mike's voltage, the detection so plugged ear speaker device is exactly inaccurate; Two, this mode needs ear speaker device to adopt the mode of poll to realize, and is a kind of burden for the headphone terminal equipment that processor performance is on the low side.
Summary of the invention
The present invention, for overcoming the deficiencies in the prior art, provides a kind of plug detection method of ear speaker device, for left or/and the interruption situation of R channel by monitoring earphone, realizes the detection to headset plugging state.
The invention provides a kind of plug detection method of ear speaker device, comprise the following steps:
S11: by a left side for ear speaker device or/and R channel is set to interrupt monitoring pin;
S12: ear speaker device is added up interrupt number;
S13: if the interrupt number counted on exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.
Further, also step is comprised before described step S11: be inserted into by ear speaker device in terminal equipment, ear speaker device is waken up.
Further, after described step S13, also comprise step: if though judge that ear speaker device has been extracted or insertion equipment does not use, then ear speaker device enters low-power consumption or sleep pattern.
The present invention also provides a kind of ear speaker device with plug detection device, it is characterized in that, comprises plug detection device, and described plug detection device comprises:
Headset plug, for being inserted into terminal equipment, being configured to can receive interruption signal;
The microprocessor be connected with described headset plug; Described microprocessor comprises counter, is configured to the detection to the interrupt signal number that headset plug receives; And described microprocessor also comprises timer, after being configured to therefrom stopping pregnancy life, start timing; With
Power supply;
Wherein, described microprocessor counts on interrupt number and exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.
Further, described headset plug is four-section type headset plug.
The present invention also provides the detection method of the ear speaker device plug on a kind of mobile mobile terminal, it is characterized in that, comprises the following steps:
S21: open related application at mobile mobile terminal, and the broadcast of real-time reception earphone plug;
S22: mobile terminal when receive earphone insert information after, with certain hour interval left or/and R channel pin send interrupt signal;
S23: ear speaker device counts on interrupt signal number and exceedes threshold value, then judge that ear speaker device has been inserted in mobile terminal, sends decision-feedback information to mobile terminal simultaneously; If do not receive interrupt signal in the certain hour that time span is longer than the described time interval, though then judge that ear speaker device has been extracted or insertion equipment does not use;
S24: mobile terminal receives ear speaker device and judges that earphone has been inserted into the feedback information in mobile terminal, then enter follow-up shaking hands and normal interworking; Move and shake hands non-and outside normal interworking, draw high at certain intervals and drag down or/and R channel pin is to produce interrupt signal, when there being proper communication, this pause in action.
Further, step S22 also comprises step: be inserted into by ear speaker device in mobile terminal, and mobile earphone equipment is waken up.
Further, interrupt signal described in step S22 is draw high to drag down a left side or/and the signal of R channel pin generation.
Beneficial effect of the present invention is, provides a kind of plug detection method of ear speaker device, left or/and the interruption situation of R channel by monitoring earphone, realizes the detection to headset plugging state rapidly and accurately.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet 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 checkout gear of the ear speaker device of band plug detection device of the present invention;
Fig. 3 is the ear speaker device plug detection method schematic flow sheet on mobile terminal of the present invention;
Fig. 4 is the schematic flow sheet that the insertion of the ear speaker device plugged earphone terminal of band plug detection device detects;
Fig. 5 is the schematic flow sheet extracting detection of the ear speaker device plugged earphone terminal of band plug detection device.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, the invention provides a kind of plug detection method of ear speaker device, it comprises the following steps:
S11: by a left side for ear speaker device or/and R channel is set to interrupt monitoring pin.The left side being set to interrupt detecting pin or/and R channel also has equipment wakes up, the functions such as data receiver.
S12: ear speaker device is added up interrupt number.If plugged earphone equipment before insertion terminal equipment is in park mode state, then ear speaker device is waken up by the interruption sent by terminal equipment.
S13: if the interrupt number counted on exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.If judge, though ear speaker device has been extracted or insertion equipment but not do not use, then ear speaker device enters low-power consumption or sleep pattern.
Refer to Fig. 2, a kind of ear speaker device with plug detection device, ear speaker device, except the common part such as common loud speaker, earphone cord, also comprises plug detection device.Described plug detection device comprises:
Headset plug 1, for being inserted into terminal equipment, being configured to can receive interruption signal;
The microprocessor 2 be connected with described headset plug;
Described microprocessor 2 comprises counter 3, is configured to the detection to the interrupt signal number that headset plug receives; And described microprocessor 2 comprises timer 4, after being configured to therefrom stopping pregnancy life, start timing; With power supply 5;
Wherein, described microprocessor 2 counts on interrupt number and exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.
Wherein, described headset plug can be four-section type headset plug, can accomplish judgement and the coupling of carrying out European standard and Unite States Standard when being connected with terminal equipments such as mobile terminals.Described microprocessor 2 has the basic functions such as headset mode judgement.
Described timer 3, by the detection to left (or right) sound channel interrupt number, realizes the detection that ear speaker device inserts terminal equipment.We know, being not one has interruption to be exactly that ear speaker device inserts mobile terminal.Also can produce interruption because insert at ear speaker device in the process of terminal equipment, under counting can effectively prevent earphone from not plugging steady situation, just judge the problem whether ear speaker device has inserted terminal equipment and cause judging unsuccessfully or slipping up.
The detection that described timer 4 is extracted from terminal for ear speaker device.Timing from after interrupt signal produces, thinks after exceeding certain hour that ear speaker device has been extracted or related application in terminal equipment exits, then closes ear speaker device with energy efficient.If adopt and judge whether ear speaker device is extracted to the detection of Mike's voltage of ear speaker device, only have ear speaker device really to extract Shi Caineng and detect, the saving of power consumption can not be accomplished in time.
Refer to Fig. 3, the present invention also provides the detection method of the ear speaker device plug on a kind of mobile terminal, comprises the following steps:
S21: open related application APP at mobile terminal, and the broadcast of real-time reception earphone plug.If mobile end is in economize on electricity or sleep pattern before plugged earphone equipment, then wake mobile device up after plugged earphone equipment.
S22: after mobile terminal receives the information of earphone insertion, with certain hour interval left or/and R channel pin sends interrupt signal.Described interrupt signal can be draw high to drag down a left side or/and the interrupt signal of R channel pin generation, and also can be packet, described packet can be the data of set form, as 0xff.
S23: ear speaker device counts on interrupt signal number and exceedes threshold value, then judge that ear speaker device has been inserted in mobile terminal and think that mobile terminal sends decision-feedback information simultaneously; If do not receive interrupt signal in the certain hour that time span is longer than the described time interval, though then judge that ear speaker device has been extracted or insertion equipment does not use;
S24: mobile terminal receives ear speaker device and judges that earphone has been inserted into the feedback information in mobile terminal, then enter follow-up shaking hands and normal interworking; After mobile terminal receives the Detection Information that earphone extracts, related application also operationally, then stop the interactive action with ear speaker device.
Below to be with the ear speaker device of plug detection device to insert mobile phone terminal, the testing process that ear speaker device inserts and extracts mobile terminal is described.
Refer to Fig. 4, the ear speaker device of band plug detection device inserts the schematic flow sheet of the insertion detection of mobile phone terminal.
In step S301, by a left side for ear speaker device or/and R channel pin is set to interrupt monitoring pin, and wake ear speaker device up.When ear speaker device is in sleep or low-power consumption mode, this pin interrupts waking ear speaker device up; When ear speaker device normally works, data can be received according to the height change detecting this interrupt level.Now, the APP on mobile phone terminal can send interrupt signal every certain time interval.
In step S302, ear speaker device wakes rear unlatching counter up, to left or/and the interrupt signal number of R channel is added up.
In step 303, when the interrupt number counted on exceedes threshold value, then think that ear speaker device has been inserted on mobile phone terminal, close counter.
In step S304, the pattern (European standard or Unite States Standard or other standard) of the ear speaker device inserting mobile phone terminal is judged, and switches Mike's pin according to judged result.
In step S305, by described interruption monitoring pin feedback information to mobile phone terminal.Object informs that this ear speaker device of the mobile terminals such as mobile phone successfully inserts, and can carry out follow-up shaking hands or proper communication function.
Refer to Fig. 5, Fig. 5 is the schematic flow sheet extracting detection of the ear speaker device insertion mobile phone terminal of band plug detection device.
In step S401, after ear speaker device end judges to be inserted into mobile phone terminal, just can normally carry out having communicated with the mobile phone terminal inserted.Now, open the timer of ear speaker device, left or/and the interrupt signal of R channel starts reclocking after arriving.
In step S402, when left in the time period that timing exceedes the time interval set in step S301 or/and R channel does not interrupt producing, then think that ear speaker device has been extracted or the related application APP of mobile phone terminal exits.
In step 403, ear speaker device enters low-power consumption or sleep pattern, to reach the object reducing power consumption in time.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.

Claims (8)

1. a plug detection method for ear speaker device, is characterized in that, comprise the following steps:
S11: by a left side for ear speaker device or/and R channel is set to interrupt monitoring pin;
S12: ear speaker device is added up interrupt number;
S13: if the interrupt number counted on exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.
2. the plug detection method of ear speaker device according to claim 1, is characterized in that, also comprises step before described step S12: be inserted into by ear speaker device in terminal equipment, and after having interruption to produce, ear speaker device is waken up.
3. the plug detection method of ear speaker device according to claim 1, is characterized in that, also comprises step after described step S13: if though judge that ear speaker device has been extracted or insertion equipment does not use, then ear speaker device enters low-power consumption or sleep pattern.
4. the ear speaker device with plug detection device, is characterized in that, comprises plug detection device, and described plug detection device comprises:
Headset plug, for being inserted into terminal equipment, being configured to can receive interruption signal;
The microprocessor be connected with described headset plug; Described microprocessor comprises counter, is configured to the detection to the interrupt signal number that headset plug receives; And described microprocessor also comprises timer, after being configured to therefrom stopping pregnancy life, start timing; With
Power supply;
Wherein, described microprocessor counts on interrupt number and exceedes threshold value, then judge that ear speaker device has been inserted in terminal equipment; Produce if do not interrupt in certain hour, though then judge that ear speaker device has been extracted or insertion equipment does not use.
5. the ear speaker device of headset plugging checkout gear according to claim 4, is characterized in that, described headset plug is four-section type headset plug.
6. the ear speaker device plug detection method on mobile mobile terminal, is characterized in that, comprise the following steps:
S21: open related application at mobile mobile terminal, and the broadcast of real-time reception earphone plug;
S22: mobile terminal when receive earphone insert information after, with certain hour interval left or/and R channel pin send interrupt signal;
S23: ear speaker device counts on interrupt signal number and exceedes threshold value, then judge that ear speaker device has been inserted in mobile terminal, sends decision-feedback information to mobile terminal simultaneously; If do not receive interrupt signal in the certain hour that time span is longer than the described time interval, though then judge that ear speaker device has been extracted or insertion equipment does not use;
S24: mobile terminal receives ear speaker device and judges that earphone has been inserted into the feedback information in mobile terminal, then enter follow-up shaking hands and normal interworking; After mobile terminal receives the Detection Information that earphone extracts, related application also operationally, then stop the interactive action with ear speaker device.
7. the ear speaker device plug detection method on mobile terminal according to claim 6, it is characterized in that, step S22 also comprises step: be inserted into by ear speaker device in mobile terminal, and mobile earphone equipment is waken up.
8. the ear speaker device plug detection method on mobile terminal according to claim 6, is characterized in that, interrupt signal described in step S22 is draw high to drag down a left side or/and the signal of R channel pin generation.
CN201510999814.5A 2015-12-24 2015-12-24 A kind of the plug detection method and its device of ear speaker device Active CN105407442B (en)

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 true CN105407442A (en) 2016-03-16
CN105407442B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092545A (en) * 2017-03-27 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of client test earphone plug state
CN108289219A (en) * 2017-12-29 2018-07-17 晶晨半导体(上海)股份有限公司 A kind of the plug detection method and terminal device of AV signal input interfaces
CN111586549A (en) * 2020-05-14 2020-08-25 西安闻泰电子科技有限公司 Earphone insertion detection circuit

Citations (5)

* Cited by examiner, † Cited by third party
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
US20150264479A1 (en) * 2014-03-14 2015-09-17 Samsung Electronics Co., Ltd. Electronic device having noise removal function

Patent Citations (5)

* Cited by examiner, † Cited by third party
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
US20150264479A1 (en) * 2014-03-14 2015-09-17 Samsung Electronics Co., Ltd. Electronic device having noise removal function

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092545A (en) * 2017-03-27 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of client test earphone plug state
CN107092545B (en) * 2017-03-27 2020-09-04 武汉斗鱼网络科技有限公司 Method and system for detecting earphone plugging state by client
CN108289219A (en) * 2017-12-29 2018-07-17 晶晨半导体(上海)股份有限公司 A kind of the plug detection method and terminal device of AV signal input interfaces
CN108289219B (en) * 2017-12-29 2021-03-09 晶晨半导体(上海)股份有限公司 Plug-pull detection method of AV signal input interface and terminal equipment
CN111586549A (en) * 2020-05-14 2020-08-25 西安闻泰电子科技有限公司 Earphone insertion detection circuit
CN111586549B (en) * 2020-05-14 2022-03-15 昆明闻泰通讯有限公司 Earphone insertion detection circuit

Also Published As

Publication number Publication date
CN105407442B (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CA2625685A1 (en) System and method for managing battery slump
CN102915751A (en) Method for automatically regulating sound volume and terminal equipment thereof
CN104272217B (en) Principal and subordinate interface
CN105407442A (en) Plugging detection method and device for earphone apparatus
CN203366017U (en) Building talk-back intelligent terminal and crash restart system for same
EP2182709A3 (en) Apparatus and method for controlling USB switching circuit in portable terminal
WO2014121681A1 (en) Method for card reader to communicate with upper computer
WO2012106973A1 (en) Uart-based wake-up from sleep method and device
CN105426338A (en) I2C wake-up MCU circuit and wake-up method
CN106060693A (en) Bluetooth headset with audio plug and control method thereof
CN205726256U (en) A kind of bluetooth earphone
CN106451812A (en) Awakening and sleeping control methods for wireless power transmission system
WO2008142588A9 (en) Power save protocol interoperability detection
CN103118421A (en) Method and device for reducing power consumption of terminal
CN102929737A (en) Method and system for automatically restarting wireless network card
CN103200498A (en) Music playing method and music playing system of mobile terminal
CN102736995B (en) Electronic equipment and control method for USB communication module of electronics equipment
CN104577544A (en) Multifunctional intelligent socket based on remote network control system and control method
CN106131722A (en) A kind of bluetooth earphone control method
CN102131304B (en) A kind of method for connecting network and communicating terminal
WO2008084541A1 (en) Receiver and control method for strting of the same
CN203535935U (en) Control circuit and control system of liquid crystal display module
WO2012100687A1 (en) Xdigital subscriber line office equipment and energy-saving method thereof
CN103165313A (en) Method, system and device of adjusting sensitivity of vibration switch
CN101860983B (en) Method, system and mobile terminal for entering power saving mode under long connection mode

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