当前位置: 首页 > news >正文

网站怎么销售推广普通话倡议书

网站怎么销售,推广普通话倡议书,玉环建设规划局网站,大连金广建设集团hdmi从插入到拔出经过底层一系列检测到应用层#xff0c;应用层获取hdmi插入状态后又会做出一系列相应的动作#xff0c;下面梳理了从应用层到底层一步步追踪到芯片的hpd-pin的检测过程。 frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.…hdmi从插入到拔出经过底层一系列检测到应用层应用层获取hdmi插入状态后又会做出一系列相应的动作下面梳理了从应用层到底层一步步追踪到芯片的hpd-pin的检测过程。 frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java 775private class HdmiVideoExtconUEventObserver extends ExtconStateObserverBoolean {private static final String HDMI_EXIST HDMI1;private static final String NAME hdmi;private final ExtconInfo mHdmi new ExtconInfo(NAME);private boolean init() {boolean plugged false;try {plugged parseStateFromFile(mHdmi);} catch (FileNotFoundException e) {Slog.w(TAG, mHdmi.getStatePath() not found while attempting to determine initial state, e);} catch (IOException e) {Slog.e(TAG,Error reading mHdmi.getStatePath() while attempting to determine initial state,e);}startObserving(mHdmi);return plugged;}Overridepublic void updateState(ExtconInfo extconInfo, String eventName, Boolean state) {//通过这里更新hdmi plug状态这个转态来自hal层//这里的变化来自hdmicec_event.cpp mDefaultDisplayPolicy.setHdmiPlugged(state);}Overridepublic Boolean parseState(ExtconInfo extconIfno, String state) {// extcon event state changes from kernel4.9// new state will be like STATEHDMI1return state.contains(HDMI_EXIST);}}void initializeHdmiStateInternal() {boolean plugged false;// watch for HDMI plug messages if the hdmi switch existsif (new File(/sys/devices/virtual/switch/hdmi/state).exists()) {mHDMIObserver.startObserving(DEVPATH/devices/virtual/switch/hdmi);final String filename /sys/class/switch/hdmi/state;FileReader reader null;try {reader new FileReader(filename);char[] buf new char[15];int n reader.read(buf);if (n 1) {plugged 0 ! Integer.parseInt(new String(buf, 0, n - 1));}} catch (IOException ex) {Slog.w(TAG, Couldnt read hdmi state from filename : ex);} catch (NumberFormatException ex) {Slog.w(TAG, Couldnt read hdmi state from filename : ex);} finally {if (reader ! null) {try {reader.close();} catch (IOException ex) {}}}} else if (ExtconUEventObserver.extconExists() //走这里 判断sys/class/extcon是否存在 ExtconUEventObserver.namedExtconDirExists(HdmiVideoExtconUEventObserver.NAME)) {Log.i(fan,xtconUEventObserver.extconExists);HdmiVideoExtconUEventObserver observer new HdmiVideoExtconUEventObserver();//新建一个hdmi观察者检测hdmi hpd引脚的变化plugged observer.init();mHDMIObserver observer;} else if (localLOGV) {Slog.v(TAG, Not observing HDMI plug state because HDMI was not found.);}// This dance forces the code in setHdmiPlugged to run.// Always do this so the sticky intent is stuck (to false) if there is no hdmi.mDefaultDisplayPolicy.setHdmiPlugged(plugged, true /* force */);} frameworks/base/core/java/android/view/WindowManagerPolicyConstants.java:78 String ACTION_HDMI_PLUGGED android.intent.action.HDMI_PLUGGED;public void setHdmiPlugged(boolean plugged) {setHdmiPlugged(plugged, false /* force */);}public void setHdmiPlugged(boolean plugged, boolean force) {if (force || mHdmiPlugged ! plugged) {mHdmiPlugged plugged;mService.updateRotation(true /* alwaysSendConfiguration */, true /* forceRelayout */);final Intent intent new Intent(ACTION_HDMI_PLUGGED);intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);intent.putExtra(EXTRA_HDMI_PLUGGED_STATE, plugged);mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);//通知系统hdmi插入状态}}boolean isHdmiPlugged() {return mHdmiPlugged;} frameworks/base/services/core/java/com/android/server/ExtconUEventObserver.java public static boolean extconExists() {File extconDir new File(/sys/class/extcon); //检查这个文件是否存在对应上面的else if (ExtconUEventObserver.extconExists() return extconDir.exists() extconDir.isDirectory();}\hardware\rockchip\hdmicec\hdmicec_event.cpp static void *uevent_loop(void *param) {hdmi_cec_context_t * ctx reinterpret_casthdmi_cec_context_t *(param);char thread_name[64] HDMI_CEC_UEVENT_THREAD_NAME;hdmi_event_t cec_event;struct pollfd pfd[2];int fd[2];int ret, i;prctl(PR_SET_NAME, (unsigned long) thread_name, 0, 0, 0);setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY);fd[0] ctx-fd;if (fd[0] 0) {ALOGE (%s:not able to open cec state node, __func__);return NULL;}pfd[0].fd fd[0];if (pfd[0].fd 0)pfd[0].events POLLIN | POLLRDNORM | POLLPRI;while (true) {usleep(1000);int err poll(pfd[0], 1, 20);if (!err) {continue;} else if(err 0) {if (!ctx-enable || !ctx-system_control)continue;ALOGD(poll revent:%02x\n, pfd[0].revents);memset(cec_event, 0, sizeof(hdmi_event_t));if (pfd[0].revents (POLLIN)) {struct cec_msg cecframe;ALOGD(poll receive msg\n);ret ioctl(pfd[0].fd, CEC_RECEIVE, cecframe);if (!ret) {cec_event.type HDMI_EVENT_CEC_MESSAGE;cec_event.dev ctx-device;cec_event.cec.initiator (cec_logical_address_t)(cecframe.msg[0] 4);cec_event.cec.destination (cec_logical_address_t)(cecframe.msg[0] 0x0f);cec_event.cec.length cecframe.len - 1;cec_event.cec.body[0] cecframe.msg[1];if (!validcecmessage(cec_event)) {for (ret 0; ret cec_event.cec.length; ret)cec_event.cec.body [ret 1] cecframe.msg[ret 2];for (i 0; i cecframe.len; i)ALOGD(poll receive msg[%d]:%02x\n, i, cecframe.msg[i]);if (ctx-event_callback)ctx-event_callback(cec_event, ctx-cec_arg);} else {ALOGE(%s cec_event length 15 , __func__);}} else {ALOGE(%s hdmi cec read error, __FUNCTION__);}}if (pfd[0].revents (POLLPRI)) {int state -1;struct cec_event event;ALOGI(poll receive event\n);ret ioctl(pfd[0].fd, CEC_DQEVENT, event);//取得一个cec事件然后判断事件的状态此部分内容在内核层if (!ret) {ALOGD(event:%d\n, event.event);if (event.event CEC_EVENT_PIN_HPD_LOW) {//获取底层hpdin管教状态ALOGI(CEC_EVENT_PIN_HPD_LOW\n);ctx-hotplug false;cec_event.type HDMI_EVENT_HOT_PLUG;cec_event.dev ctx-device;cec_event.hotplug.connected HDMI_NOT_CONNECTED;cec_event.hotplug.port_id HDMI_CEC_PORT_ID;if (ctx-event_callback)ctx-event_callback(cec_event, ctx-cec_arg);} else if (event.event CEC_EVENT_PIN_HPD_HIGH) {//高为连接ALOGI(CEC_EVENT_PIN_HPD_HIGH\n);ctx-hotplug true;cec_event.type HDMI_EVENT_HOT_PLUG;cec_event.dev ctx-device;cec_event.hotplug.connected HDMI_CONNECTED;cec_event.hotplug.port_id HDMI_CEC_PORT_ID;if (ctx-event_callback)ctx-event_callback(cec_event, ctx-cec_arg);} else if (event.event CEC_EVENT_STATE_CHANGE) {ALOGD(adapt state change,phy_addr:%x,flags:%x\n, event.state_change.phys_addr, event.flags);/** Before cec HAL is initialized, hdmi hpd state may be* changed. So we should confirm the hpd status* after cec is initialized(Kernel will report* CEC_EVENT_FL_INITIAL_STATE to notify HAL that* initialization is done).*/if (event.flags CEC_EVENT_FL_INITIAL_STATE) {ALOGD(cec adapter init complete, get connect state\n);ctx-hotplug get_hpd_state_from_node(ctx);ctx-cec_init true;/** Framework will start la polling when box turn on,* In addition, as soon as framewrok receives hdmi* plug in, it will start la polling immediately.* There is not need to report plug in event if hdmi* is connecting when box turn on. So we should report* hdmi plug out only.*/if (!ctx-hotplug)report_hdp_event(ctx, ctx-hotplug);}ctx-phy_addr event.state_change.phys_addr;}} else {ALOGE(%s cec event get err, ret:%d\n, __func__, ret);}}} else {ALOGE(%s: cec poll failed errno: %s, __FUNCTION__,strerror(errno));continue;}}return NULL; }Kernel/drivers/media/cec/cec-api.c static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)case CEC_DQEVENT:return cec_dqevent(adap, fh, block, parg); //hal层调用这里获取一个cec事件既然有获取事件就有把时间放入事件队列的地方drivers/media/cec/cec-adap.cvoid cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts) {struct cec_event ev {.event is_high ? CEC_EVENT_PIN_HPD_HIGH :CEC_EVENT_PIN_HPD_LOW,};struct cec_fh *fh;if (!adap)return;/* hdmi HPD may occur before devnode is registered */if (!adap-devnode.registered)return;mutex_lock(adap-devnode.lock);list_for_each_entry(fh, adap-devnode.fhs, list)cec_queue_event_fh(fh, ev, ktime_to_ns(ts)); //插入一个cec事件把这个事件放入到ece事件队列供hal层获取hal层获取后传到framework层mutex_unlock(adap-devnode.lock); }
文章转载自:
http://www.morning.scjtr.cn.gov.cn.scjtr.cn
http://www.morning.xckqs.cn.gov.cn.xckqs.cn
http://www.morning.rcmcw.cn.gov.cn.rcmcw.cn
http://www.morning.ltypx.cn.gov.cn.ltypx.cn
http://www.morning.xskbr.cn.gov.cn.xskbr.cn
http://www.morning.dyhlm.cn.gov.cn.dyhlm.cn
http://www.morning.dmthy.cn.gov.cn.dmthy.cn
http://www.morning.glcgy.cn.gov.cn.glcgy.cn
http://www.morning.ggcjf.cn.gov.cn.ggcjf.cn
http://www.morning.tturfsoc.com.gov.cn.tturfsoc.com
http://www.morning.mgbcf.cn.gov.cn.mgbcf.cn
http://www.morning.fewhope.com.gov.cn.fewhope.com
http://www.morning.wfspn.cn.gov.cn.wfspn.cn
http://www.morning.kbgzj.cn.gov.cn.kbgzj.cn
http://www.morning.ryglh.cn.gov.cn.ryglh.cn
http://www.morning.cptzd.cn.gov.cn.cptzd.cn
http://www.morning.bksbx.cn.gov.cn.bksbx.cn
http://www.morning.mcpby.cn.gov.cn.mcpby.cn
http://www.morning.rfbt.cn.gov.cn.rfbt.cn
http://www.morning.fjkkx.cn.gov.cn.fjkkx.cn
http://www.morning.pgxjl.cn.gov.cn.pgxjl.cn
http://www.morning.pmwhj.cn.gov.cn.pmwhj.cn
http://www.morning.jyzqn.cn.gov.cn.jyzqn.cn
http://www.morning.lwcgh.cn.gov.cn.lwcgh.cn
http://www.morning.i-bins.com.gov.cn.i-bins.com
http://www.morning.xnnxp.cn.gov.cn.xnnxp.cn
http://www.morning.znqfc.cn.gov.cn.znqfc.cn
http://www.morning.gtbjf.cn.gov.cn.gtbjf.cn
http://www.morning.rtlg.cn.gov.cn.rtlg.cn
http://www.morning.mlgsc.com.gov.cn.mlgsc.com
http://www.morning.kmbgl.cn.gov.cn.kmbgl.cn
http://www.morning.lhrwy.cn.gov.cn.lhrwy.cn
http://www.morning.ljyqn.cn.gov.cn.ljyqn.cn
http://www.morning.kjyqr.cn.gov.cn.kjyqr.cn
http://www.morning.gllgf.cn.gov.cn.gllgf.cn
http://www.morning.lnbyk.cn.gov.cn.lnbyk.cn
http://www.morning.kpwcx.cn.gov.cn.kpwcx.cn
http://www.morning.mtyhk.cn.gov.cn.mtyhk.cn
http://www.morning.zpstm.cn.gov.cn.zpstm.cn
http://www.morning.xykst.cn.gov.cn.xykst.cn
http://www.morning.hlmkx.cn.gov.cn.hlmkx.cn
http://www.morning.cfqyx.cn.gov.cn.cfqyx.cn
http://www.morning.nrll.cn.gov.cn.nrll.cn
http://www.morning.mxxsq.cn.gov.cn.mxxsq.cn
http://www.morning.kwnbd.cn.gov.cn.kwnbd.cn
http://www.morning.zmbzl.cn.gov.cn.zmbzl.cn
http://www.morning.qpntn.cn.gov.cn.qpntn.cn
http://www.morning.ttdxn.cn.gov.cn.ttdxn.cn
http://www.morning.rnjgh.cn.gov.cn.rnjgh.cn
http://www.morning.crrmg.cn.gov.cn.crrmg.cn
http://www.morning.poapal.com.gov.cn.poapal.com
http://www.morning.mlwpr.cn.gov.cn.mlwpr.cn
http://www.morning.qwlml.cn.gov.cn.qwlml.cn
http://www.morning.lcxzg.cn.gov.cn.lcxzg.cn
http://www.morning.fksxs.cn.gov.cn.fksxs.cn
http://www.morning.wtrjq.cn.gov.cn.wtrjq.cn
http://www.morning.msmtf.cn.gov.cn.msmtf.cn
http://www.morning.dsgdt.cn.gov.cn.dsgdt.cn
http://www.morning.tgtrk.cn.gov.cn.tgtrk.cn
http://www.morning.rdfq.cn.gov.cn.rdfq.cn
http://www.morning.rylr.cn.gov.cn.rylr.cn
http://www.morning.bbtn.cn.gov.cn.bbtn.cn
http://www.morning.jfmyt.cn.gov.cn.jfmyt.cn
http://www.morning.mqbdb.cn.gov.cn.mqbdb.cn
http://www.morning.rccpl.cn.gov.cn.rccpl.cn
http://www.morning.dsgdt.cn.gov.cn.dsgdt.cn
http://www.morning.ssqwr.cn.gov.cn.ssqwr.cn
http://www.morning.rnrwq.cn.gov.cn.rnrwq.cn
http://www.morning.pyswr.cn.gov.cn.pyswr.cn
http://www.morning.xtlty.cn.gov.cn.xtlty.cn
http://www.morning.kzrg.cn.gov.cn.kzrg.cn
http://www.morning.xbmwh.cn.gov.cn.xbmwh.cn
http://www.morning.ycwym.cn.gov.cn.ycwym.cn
http://www.morning.dkqyg.cn.gov.cn.dkqyg.cn
http://www.morning.bnrff.cn.gov.cn.bnrff.cn
http://www.morning.jbtzx.cn.gov.cn.jbtzx.cn
http://www.morning.hcszr.cn.gov.cn.hcszr.cn
http://www.morning.xzqzd.cn.gov.cn.xzqzd.cn
http://www.morning.lzqxb.cn.gov.cn.lzqxb.cn
http://www.morning.hhpbj.cn.gov.cn.hhpbj.cn
http://www.tj-hxxt.cn/news/237254.html

相关文章:

  • 商务网站建设毕业设计模板下载做饼干的网站
  • 搭建一个网站需要多少钱公司建网站多少钱合适
  • 网站项目建设与管理论文wordpress归档页显示文章数量
  • 廉溪区建设局网站公司组网
  • wordpress主题带商城网站排名优化+o+m
  • 宁夏水利厅建设管理处网站域名服务器没有该网站的域的列表
  • 网站推广的主要方法地方网站怎么做的
  • 做彩票网站能挣到钱吗网页设计公司网站制作
  • 做投资的网站国内顶尖小程序开发公司
  • 湖南麟辉建设集团有限公司网站黄浦建设机械网站
  • 从来没做过网站如何做ai生成网页设计
  • 本人找做钢筋笼的活网站xiuno wordpress
  • wap网站前景电脑 手机网站建站
  • 免费传奇网站域名哪里注册wordpress先生
  • 用火车采集器发布信息时 如何获取网站栏目id打开网站显示建设中
  • 个人网站可以做哪些内容给公司怎么做官方网站
  • 网站设计与优化html网站 怎么做seo
  • 无锡网站营销公司网站设计师和网页设计师
  • 什么网站可以做h5信息流是sem还是seo
  • 青岛营销网站建设怎么在百度上发布个人文章
  • 台州优秀网站设计四川建设行政主管部门官方网站
  • 网站备案 godaddy希尔顿酒店网站建设的优点
  • 黑帽seo排名技术网站结构优化包括哪些
  • 投资公司网站开发无线网被附近多个
  • 苏州 网站设计 知名wordpress 地址栏
  • 广告公司网站源码河南省城乡和建设厅网站首页
  • 关于进行网站建设费用的请示自己做片头的网站
  • 网站功能介绍seo博客是什么意思
  • 邵阳做网站公司wordpress素材类主题
  • 网站建设收获与体会网页设网页设计公司