【Audio】耳机错误/频繁插入造成的无法识别

【Audio】耳机错误/频繁插入造成的无法识别

现象:

用4段耳机,在第3段和第4段之间,快速频繁的插拔耳机,会造成偶尔手机无法识别到耳机的现象

原因:

首先确定,这是一个不正常的错误操作
由于耳机最后两段分别是GND和MIC,这样长期的插拔会造成间歇性的短接,以至于平台接受到的电流和电压发生异常,导致无法识别

解决方法:

平台中对电流和电压的识别是有时间的,可以微调该时间,延长判断时间(Qcom平台默认是0.25s,我一般调到1-2s,太长会导致耳机插入后识别较慢)
该问题之前有写过英文汇报给国外,直接copy到下面,保留着log分析原因等
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Description

Defect Description:

Plugging the headphone automatically triggered the volume and the emergence of searchGoogle and other interfaces.

Expected Behavior:

Nointerface had been triggered when the headphone plugging. It can be normally used

Glossary:
3 sections of the earphone —— headphone
4 sections of the earphone —— handset

Analysis

The original in the logs:

……

01-01 08:53:47.936 1911  1911 V WiredAccessoryManager: headsetName: connected

01-01 08:53:47.937 1911  1911 V WiredAccessoryManager: headsetName: disconnected

……

01-01 08:53:48.147 1911  1911 V WiredAccessoryManager: headsetName: disconnected

……

01-01 08:53:49.067 1911  1911 V WiredAccessoryManager: headsetName: connected

……

01-01 08:53:50.880 1911  1911 V WiredAccessoryManager: headsetName: connected

01-01 08:53:50.882 1911  1911 V WiredAccessoryManager: headsetName: disconnected

Fromthe log, there were 8 times plug-pulling events in 3 seconds. It’s notartificial processing.

From the log, the handset hasbeen identified, but it has been led into the thread of events: found, plugged, pulled out, plugged, pulled out and so on.

It’s very low probability of issue recurrence with the right headphone following with the local feedback. Combined with the hardware test, when the headphone had been in non-complete plugging and swaying the jack, the issue appears and log is beencaught.

It has been frequentlyreported the events of earphone plugging in a shorttime, andbe similar to the log from the local feedback by analyzing therepetition appearance.

As the similar issue to otherdevices with similar hardware, when the handset plugging the front threesection and the last one with frequently plug-pull, the Google search pop-upsautomatically.

Root Cause

This is because of the handset of OMTP and CTIA, the third or fourth section in jack and socket is GND. If repeated this plugging, it will causefrequent short circuit in hardwarein short time, to be the abnormal voltage andcurrent.

Be identified as Google searchbutton to report, the headphone , the last section is GND, so repeatedly plugging, then it may causesuch issue. Of course, poor contact or jack does not match theheadset may also cause a similar situation.

Because this issue belongs to short circuit in the hardware, can not be avoided and eliminated. Software can do the corresponding processing and optimization to reduce the recurrence probability.

Conclusion

The optimization schemeis as follows:

Increase the reporteddetection time of earphone plugging event, from 0.25s to 2s. And when it hasbeen set to 2s, if the voltage is notstable, then the event will beignored and do not report.

For non-supported handset (OMTP), the direct feedback show fail, no longer continuouslydetect in the code.





  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值