微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > 如何配置耳机ACCDET的MICBIAS输出波形

如何配置耳机ACCDET的MICBIAS输出波形

时间:10-02 整理:3721RD 点击:
[Description]:
如何配置耳机ACCDET的MICBIAS输出波形
[Solution]:
以MT6589为例:
在alps/mediatek/custom/<your project>/kernel/heADSet/accdet/accdet_custom.h 文件中,
有结构体
struct headset_mode_settings{
int pwm_width;//pwm frequence
int pwm_thresh;//pwm duty
int fall_delay;//falling stable time
int rise_delay;//rising stable time
int debounce0;//hook switch or double check debounce
int debounce1;//mic bias debounce
int debounce3;//plug out debounce
};
struct headset_mode_settings cust_headset_settings = {
0x1900, 0x140, 1, 0x12c, 0X3000, 0x3000, 0x400
};
其前两项是设置耳机PWM输出波形的,依次为 pwm_width 和PWM_THRESH
设置公式如下:
PWM OUTPUT whole time =(pwm_width+1) /32768 sec //周期时间
PWM OUTPUT high time =(PWM_THRESH+1)/32768 sec //高电平时间 可以自行调整耳机检测时间
其他参数同样是以32K时钟作为时间计数

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top