CN102075845A - Method for identifying earphone types - Google Patents

Method for identifying earphone types Download PDF

Info

Publication number
CN102075845A
CN102075845A CN2010106131094A CN201010613109A CN102075845A CN 102075845 A CN102075845 A CN 102075845A CN 2010106131094 A CN2010106131094 A CN 2010106131094A CN 201010613109 A CN201010613109 A CN 201010613109A CN 102075845 A CN102075845 A CN 102075845A
Authority
CN
China
Prior art keywords
earphone
current
headset
method
access
Prior art date
Application number
CN2010106131094A
Other languages
Chinese (zh)
Inventor
赵赓
Original Assignee
上海华勤通讯技术有限公司
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 上海华勤通讯技术有限公司 filed Critical 上海华勤通讯技术有限公司
Priority to CN2010106131094A priority Critical patent/CN102075845A/en
Publication of CN102075845A publication Critical patent/CN102075845A/en

Links

Abstract

The invention provides a method for identifying earphone types, which is used for devices which can access to 3pin earphones and 4pin earphones. In the method, firstly when an earphone is inserted into an earphone interface of the device, first preset time is delayed and then a hook key current sampler is started; secondarily, hook key current sampled by the hook key current sampler are read for times, and the mean value of the read hook key current for times is calculated; and finally, the mean value is judged whether to exceed a preset value; if the mean value exceeds the preset value, the earphone inserting into the earphone interface is determined to be the 3pin earphone primarily; otherwise, the earphone inserting into the earphone interface is determined to be the 4pin earphone. Thus, the earphone types can be effectively identified. For the purpose of avoiding erroneous judgment, after the earphone is determined to be the 3pin earphone primarily, the hook key current is subjected to sampling after certain time, thus the mean value of the sampled hook key current are judged whether to exceed the preset value.

Description

识别耳机类型的方法 A method for recognizing an earphone type

技术领域 FIELD

[0001] 本发明涉及一种电子领域,尤其涉及一种识别耳机类型的方法。 [0001] The present invention relates to the field of electronics, in particular, it relates to a method for recognizing an earphone type. 背景技术 Background technique

[0002] 现有高通QSC60x0平台,只能提供对4pin话务型耳机的支持,其通过耳机键电流来判断用户是否触发了4pin话务型耳机功能;而如果用户在耳机接口接入的是3pin音乐耳机,则该平台会认为耳机键一直处于触发状态,则会带来很多意外的事件,比如自动接听电话,自动挂断电话等,严重影响用户体验度。 [0002] The conventional high-pass QSC60x0 platform, to provide support only for 4pin traffic type headset, the headset by the user to determine whether the current key triggers 4pin traffic earphone function; and if the user access to the headphone jack is 3pin Music headphones, the platform would think headset key has been in a state trigger, it will bring a lot of unexpected events, such as auto-answer calls, hang up automatically, etc., seriously affecting the user experience.

[0003] 因此,对于诸多采用该平台的设备,如何改进该平台的这一缺陷,实已成为本领域技术人员需要解决的问题。 [0003] Therefore, for many devices using the platform, how to improve this defect of the platform has become a real person skilled in the problem to be solved.

发明内容 SUMMARY

[0004] 本发明的目的在于提供一种简单易施的识别耳机类型的方法。 [0004] The object of the present invention is to provide a simple and easy application of the method for recognizing an earphone type.

[0005] 为达上述目的及其他目的,本发明提供的识别耳机类型的方法,用于具有能接入3pin耳机和4pin耳机的设备中,其包括步骤:1)当所述设备的耳机接口接入耳机时,延迟第一预设时间后,启动hook键电流采样器;幻多次读取所述hook键电流采样器所采样的hook键电流;幻计算所述多次读取的hook键电流的平均值,并判断所述平均值是否超过预设值,如果是,则初次确定所接入的耳机为3pin型耳机,否则,确定所接入的耳机为4pin型耳机。 [0005] To achieve the above objects and other objects, a method for recognizing an earphone type provided by the invention, can have access to 3pin 4pin headset and headset device, comprising the steps of: 1) when the device is connected to the headphone jack when the headset, a first predetermined time delay after the start button hook current sampler; magic reading the current key hook key hook current sampler sampled a plurality of times; magic calculating the current read-many key hook the average value, and determines whether the average value exceeds a preset value, if yes, determining the access of the first headset 3pin headphones, otherwise, determining that the access is 4pin headset earphone.

[0006] 作为一种优选方式,所述识别耳机类型的方法还可包括步骤:在确定所接入的耳机为3pin型耳机后,等待第二预设时间后,再次读取所述hook键电流采样器当前采样的电流,并判断当前采样的电流是否仍超过预设值,如是,则再次确定所接入的耳机为3pin型耳机,同时控制所述hook键电流采样器不再进行电流采样。 [0006] As a preferred embodiment, the method for recognizing an earphone type may further comprise the steps of: determining the access type of earphone headset 3pin after waiting a second predetermined time, the read current is again hook key current sampler current sample, and determines whether the current sampling current still exceeds a preset value, if yes, determining the access again the headset 3pin headphones, while controlling the current sampler hook key no longer current sampling.

[0007] 较佳的,所述第二预设时间可为2s ;所述第一预设时间可为100ms。 [0007] Preferably, the second predetermined time may be a 2S; the first predetermined time may be 100ms.

[0008] 此外,所述hook键电流采样器可以为模数转换电路;所述设备可以为采用高通QSC60x0平台的设备等。 [0008] In addition, the hook key can convert current sampling circuit module; the device may be a device using a high-pass QSC60x0 platform like.

[0009] 综上所述,本发明的识别耳机类型的方法通过对多次采样hook键电流进行分析, 即可有效识别所接入的耳机类型,进而可针对不同耳机执行不同处理方式。 [0009] In summary, the identification of the headset type by methods of the invention multiple samples are analyzed hook current key, the headset can effectively identify the type of access, and further processing may be performed in different ways for different headphones.

[0010] 本发明的其他方面由于本文的公开内容,对本领域技术人员而言是显而易见的。 [0010] Other aspects of the present invention, since the disclosure herein, to those of ordinary skill in the art will be apparent.

[0011] 以下结合附图对本实用新型/发明进行详细说明。 [0011] Hereinafter, the present invention / the invention described in detail in conjunction with the accompanying drawings.

附图说明 BRIEF DESCRIPTION

[0012] 图1为本发明的识别耳机类型的方法流程图。 [0012] FIG earphone type identification method of the present invention. FIG. 具体实施方式 Detailed ways

[0013] 以下将结合附图对本发明进行详细描述。 [0013] Hereinafter the present invention in conjunction with the accompanying drawings be described in detail.

3[0014] 请参见图1,本发明的识别耳机类型的方法可应用于具有能接入3pin耳机和4pin 耳机的设备中,例如,采用高通Qsceoxo平台的设备等。 3 [0014] Referring to FIG. 1, a method for recognizing an earphone type may be applied to the present invention can have access 3pin 4pin headset and headset devices, e.g., devices using high-pass Qsceoxo platform like. 所述方法包括如下步骤: Said method comprising the steps of:

[0015] 首先,当所述设备启动并进入待机状态。 [0015] First, when the apparatus is started and enters a standby state.

[0016] 接着,所述设备判断其耳机接口是否接入耳机,如否,则返回待机状态,如是,则所述设备在延迟第一预设时间,例如,IOOms后,启动hook键电流采样器。 [0016] Next, the device determines whether the earphone headphone jack access, if not, returns to the standby state, and if so, the device is in a first predetermined time delay, e.g., after IOOms, start key hook current sampler . 在本实施例中,所述hook键电流采样器为模数转换电路(ADC)。 In the present embodiment, the hook key to the sampler current analog to digital converter (ADC).

[0017] 接着,所述hook键电流采样器多次采样hook键电流。 [0017] Next, the current sampler hook key hook key current sampling times. 例如,ADC采样10次hook 键电流,例如分别为:150、151、150、152、151、152、150、150、150、151。 For example, the ADC 10 samples the current hook key, for example, are as follows: 150,151,150,152,151,152,150,150,150,151.

[0018] 接着,计算所述hook键电流采样器多次采样的电流的平均值。 [0018] Next, calculating an average of the current sampler hook key multiple sampling current. 例如,计算的平均值为:(150+151+150+152+151+152+150+150+150+151)/10 = 150.7。 For example, the calculated average is: (150 + 151 + 150 + 152 + 151 + 152 + 150 + 150 + 150 + 151) / 10 = 150.7.

[0019] 接着,判断所述平均值是否超过预设值,如果是,则初次确定所接入的耳机为3pin 型耳机,否则,确定所接入的耳机为4pin型耳机。 [0019] Next, it is determined whether the average value exceeds a preset value, if yes, determining the access of the first headset 3pin headphones, otherwise, determining that the access is 4pin headset earphone. 其中,所述预设值可设置为140等。 Wherein, the preset value may be set to 140 and the like. 例如, 对于计算出的平均值150. 7,由于150. 7大于140,故设备初次确定所接入的耳机为3pin型耳机。 For example, the calculated average 150.7, 150.7 since greater than 140, it is determined that the device initially accesses 3pin headset earphone.

[0020] 此外,需要说明的是,本领域技术人员应该理解,预设值并非以140为限,该值可根据设备在接入3pin型耳机和4pin型耳机时的hook键电流值来确定。 [0020] Further, it is noted that those skilled in the art will appreciate, the preset value is not limited to 140, the value may be determined according to the current value of the device hook key when accessing 3pin 4pin type earphone and earphone. 例如,设备在接入3pin型耳机时,hook键电流值通常为100左右,而在接入4pin型耳机时,hook键电流值通常为50左右,如此,则可将预设值设置在80。 For example, when the access device 3pin headphones, Hook bond current value is usually about 100, and in the access 4pin headphones, Hook bond current value is usually about 50, so, the preset value may be set to 80.

[0021] 接着,在等待第二预设时间,例如,2s,后,再次读取所述hook键电流采样器所多次采样的hook键电流。 [0021] Next, wait a second predetermined time, e.g., 2S, after reading the hook key to the current key hook current sampler is again sampled a plurality of times. 例如,再次读取10次所采样的hook键电流,并计算出这10次hook 键电流的平均值。 For example, the current key hook 10 again reads the sampled times, and calculates the average of these 10 keys hook current.

[0022] 接着,再次判断所计算出平均值是否超过预设值,如果是,则再次确定所接入的耳机为3pin型耳机,随即关闭hook键电流采样器;如否,则判断接入的耳机为4pin型耳机。 [0022] Next, again determines whether the calculated average value exceeds a preset value, if yes, determining the access again the headset 3pin headphones, closes the current sampler hook key; if not, it is determined that the access of 4pin headset headphones.

[0023] 综上所述,本发明的识别耳机类型的方法通过对耳机接入时的hook键电流的采样进行分析,可对插入的耳机类型进行判断,从而可实现对不同的耳机类型有不同的处理程序。 [0023] In summary, the method for recognizing an earphone type of the present invention were analyzed by sampling the current headset hook key access, may judge the type of the earphone, thereby to realize different for different types of headphones handler. 例如,如果接入的是3pin型音乐耳机,就屏蔽耳机键的功能,避免干扰用户的正常通话等功能;如果接入的是4pin型话务型耳机,就转到4pin耳机的处理模块,即:正常上报耳机键,可以保证用户接通,挂断电话等一些特殊操作,方便用户在听音乐时可以选用自己喜欢的耳机而不用担心来电的影响。 For example, if the access type is music 3pin headset, the headset function key on the shield, to avoid interference with the normal calls and other functions of the user; if the access type is 4pin traffic headphones, earphone 4pin passes to a processing module, i.e., : normal reporting headset button, you can ensure that users connect, hang up the telephone and other special operations, user-friendly while listening to music can choose their own favorite headphones without worrying about the impact of an incoming call.

[0024] 在本发明提及的所有文献都在本申请中引用作为参考,就如同每一篇文献被单独引用作为参考那样。 [0024] The present application are incorporated in all documents mentioned herein incorporated by reference, as if each reference were individually incorporated by reference above. 此外应理解,在阅读了本发明的上述讲授内容之后,本领域技术人员可以对本发明作各种改动或修改,这些等价形式同样落于本申请所附权利要求书所限定的范围。 Furthermore, it should be understood that, after reading the above teachings of the present invention, those skilled in the art that various changes or modifications may be made to the present invention, and these equivalents also fall within the present application as defined in the appended claims scope.

Claims (6)

1. 一种识别耳机类型的方法,用于具有能接入3pin耳机和4pin耳机的设备中,其特征在于包括步骤:1)当所述设备的耳机接口接入耳机时,延迟第一预设时间后,启动hook键电流采样器;2)多次读取所述hook键电流采样器所采样的hook键电流;3)计算所述多次读取的hook键电流的平均值,并判断所述平均值是否超过预设值,如果是,则初次确定所接入的耳机为3pin型耳机,否则,确定所接入的耳机为4pin型耳机。 1. A method of identifying an earphone type, for having access can 3pin 4pin headset and headset device, comprising the steps of: 1) when the headphone jack access to the headphone apparatus, the first preset delay after time, starting current sampler hook key; 2) a plurality of times to read the current key hook hook key sampler the sampled current; 3) calculating an average current through the hook key to read a plurality of times, and determines whether the said average value exceeds a preset value, if yes, determining the access of the first headset 3pin headphones, otherwise, determining that the access is 4pin headset earphone.
2.如权利要求1所述的识别耳机类型的方法,其特征在于步骤幻还包括步骤:在确定所接入的耳机为3pin型耳机后,等待第二预设时间后,再次读取所述hook键电流采样器当前采样的电流,并判断当前采样的电流是否仍超过预设值,如是,则再次确定所接入的耳机为3pin型耳机,同时控制所述hook键电流采样器不再进行电流采样。 2. The method for recognizing an earphone type according to claim 1, wherein the step further comprises the step of magic: After determining that the access type of earphone headset 3pin, after waiting a second predetermined time, read again the current key hook current sampler current sample, and determines whether the current sampling current still exceeds a preset value, if yes, determining the access again the headset 3pin headphones, while controlling the hook key no longer current sampler current sampling.
3.如权利要求2所述的识别耳机类型的方法,其特征在于:所述第二预设时间为2s。 The method of identifying the type of headset as claimed in claim 2, wherein: said second predetermined time is 2s.
4.如权利要求1所述的识别耳机类型的方法,其特征在于:所述第一预设时间为100ms。 4. The method for recognizing an earphone type according to claim 1, wherein: said first predetermined time is 100ms.
5.如权利要求1所述的识别耳机类型的方法,其特征在于:所述hook键电流采样器为模数转换电路。 5. The method for recognizing an earphone type according to claim 1, wherein: said current sampler hook key to analog to digital converter.
6.如权利要求1所述的识别耳机类型的方法,其特征在于:所述设备为采用高通QSC60x0平台的设备。 6. The method for recognizing an earphone type according to claim 1, wherein: said device is a device using a high-pass QSC60x0 platform.
CN2010106131094A 2010-12-29 2010-12-29 Method for identifying earphone types CN102075845A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106131094A CN102075845A (en) 2010-12-29 2010-12-29 Method for identifying earphone types

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106131094A CN102075845A (en) 2010-12-29 2010-12-29 Method for identifying earphone types

Publications (1)

Publication Number Publication Date
CN102075845A true CN102075845A (en) 2011-05-25

Family

ID=44034160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106131094A CN102075845A (en) 2010-12-29 2010-12-29 Method for identifying earphone types

Country Status (1)

Country Link
CN (1) CN102075845A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510550A (en) * 2011-11-15 2012-06-20 深圳市中兴移动通信有限公司 Method for distinguishing three-segment earphone and four-segment earphone on wireless terminal
CN102769697A (en) * 2012-07-02 2012-11-07 惠州Tcl移动通信有限公司 Method and system for preventing false key-pressing caused by earphone inserted into terminal device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201204638Y (en) * 2007-01-05 2009-03-04 苹果公司 System and single-pin plug
CN101431708A (en) * 2008-12-10 2009-05-13 深圳华为通信技术有限公司 Terminal and method for recognizing headphone type

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201204638Y (en) * 2007-01-05 2009-03-04 苹果公司 System and single-pin plug
CN101431708A (en) * 2008-12-10 2009-05-13 深圳华为通信技术有限公司 Terminal and method for recognizing headphone type

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱勇: "《单片机原理与应用技术》", 31 January 2006 *
苏小林: "《计算机控制技术》", 31 August 2004 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510550A (en) * 2011-11-15 2012-06-20 深圳市中兴移动通信有限公司 Method for distinguishing three-segment earphone and four-segment earphone on wireless terminal
CN102769697A (en) * 2012-07-02 2012-11-07 惠州Tcl移动通信有限公司 Method and system for preventing false key-pressing caused by earphone inserted into terminal device
CN102769697B (en) * 2012-07-02 2015-03-25 惠州Tcl移动通信有限公司 Method and system for preventing false key-pressing caused by earphone inserted into terminal device

Similar Documents

Publication Publication Date Title
TW201316704A (en) Global mobile communications system to detect and filter noise
WO2008085929A3 (en) Audio i/o headset plug and plug detection circuitry
US20140050327A1 (en) Audio signal processing apparatus, audio signal processing method, and program
US20080158000A1 (en) Autodetect of user presence using a sensor
CN102760434A (en) Method for updating voiceprint feature model and terminal
CN102149033A (en) Earphone processing method and user equipment
CN104238759A (en) Method and device for controlling terminal through physical keys
WO2006075275A1 (en) Audio entertainment system, method, computer program product
US20140233741A1 (en) System and method of detecting a plug-in type based on impedance comparison
US20120166184A1 (en) Selective Transmission of Voice Data
CN102143262B (en) Electronic device and method for switching audio input channel thereof
CN101493728B (en) Line control push-button detecting and recognizing device and method capable of identifying combined key
US20130345842A1 (en) Earphone removal detection
WO2012089049A1 (en) Method and cell phone for capturing audio file or video file
CN101626106A (en) Switching method of built-in antenna and exposed antenna of FM receiver as well as terminal thereof
CN101924971B (en) Apparatus and method for outputting audio signal in portable terminal
CN102833505A (en) Automatic regulation method and system for television volume, television and television remote control device
CN101216731A (en) Portable electronic apparatus and its line traffic control accomplishing method
CN102685305A (en) Contextual mode switching method of mobile terminal and mobile terminal
US9841452B2 (en) Earphone connection interface and method of operating earphone, and terminal for supporting the same
CN102238453B (en) Headset system of the mobile device and a method of operating the earphone system
CN103167379B (en) The audio playback device
CN101471994B (en) Method for receiving talking of mobile communication equipment and apparatus applying the same
CN102611961B (en) Method and device for switching multi-channel audios of terminal
CN105068692B (en) The method of adjusting a loudness and a user terminal

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C12 Rejection of a patent application after its publication