高通平台adsp sensor的驱动log需要使用QXDM抓取,sensor init是sensor初始化的log信息,这时候QXDM还没有识别到diag口,无法直接获取。
高通支持如下两种获取adsp侧sensor init log的方式。
第一种方式是:通过adb名利重启sensors
a. adb shell stop sensors
b. adb shell “echo ‘related’ > /sys/bus/msm_subsys/devices/subsys1/restart_level”
c. adb shell “echo ‘restart’ >
/sys/kernel/debug/msm_subsys/adsp”
d. adb shell start sensors
PS : 这边有两个注意事项:
1.需要确认好 /sys/bus/msm_subsys/devices/subsys1 是指向 adsp还是其他,具体方法如下cat /sys/bus/msm_subsys/devices/subsys1/name 返回值是否为adsp,如果不是请cat其他subsys*
2.请检查/sys/kernel/debug/msm_subsys/adsp是否存在。高通最近在subsystem_restart.c中将msm_subsys/adsp节点取消了,为了解决该问题,需要导入如下所示的path。

diff --git a/drivers/soc/qcom/subsystem_restart.c b/drivers/soc/qcom/subsystem_restart.c
old mode 100644
new mode 100755
index ea94456..27eb26e
--- a/drivers/soc/qcom/subsystem_restart.c
+++ b/drivers/soc/qcom/subsystem_restart.c
@@ -36,7 +36,7 @@#include <soc/qcom/subsystem_notif.h>#include <soc/qcom/sysmon.h>#include <trace/events/trace_msm_pil_event.h>
-
+#include <linux/debugfs.h>#include <asm/current.h>#include "peripheral-loader.h"
@@ -178,6 +178,10 @@ struct subsys_device {enum crash_status crashed;int notif_state;struct list_head list;
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *dentry;
+#endif
+ };static struct subsys_device *to_subsys(struct device *d)
@@ -356,11 +360,11 @@ static struct device_attribute subsys_attrs[] = {__ATTR_NULL,};-struct bus_type subsys_bus_type = {
+static struct bus_type subsys_bus_type = {.name  = "msm_subsys",.dev_attrs = subsys_attrs,};
-EXPORT_SYMBOL(subsys_bus_type);
+static DEFINE_IDA(subsys_ida);@@ -1229,6 +1233,87 @@ void notify_proxy_unvote(struct device *device)notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_UNVOTE, NULL);}+#ifdef CONFIG_DEBUG_FS
+static ssize_t subsys_debugfs_read(struct file *filp, char __user *ubuf,
+  size_t cnt, loff_t *ppos)
+{
+ int r;
+ char buf[40];
+ struct subsys_device *subsys = filp->private_data;
+
+ r = snprintf(buf, sizeof(buf), "%d\n", subsys->count);
+ return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
+}
+
+static ssize_t subsys_debugfs_write(struct file *filp,
+  const char __user *ubuf, size_t cnt, loff_t *ppos)
+{
+ struct subsys_device *subsys = filp->private_data;
+ char buf[10];
+ char *cmp;
+
+ cnt = min(cnt, sizeof(buf) - 1);
+ if (copy_from_user(&buf, ubuf, cnt))
+  return -EFAULT;
+ buf[cnt] = '\0';
+ cmp = strstrip(buf);
+
+ if (!strcmp(cmp, "restart")) {
+  if (subsystem_restart_dev(subsys))
+   return -EIO;
+ } else if (!strcmp(cmp, "get")) {
+  if (subsystem_get(subsys->desc->name))
+   return -EIO;
+ } else if (!strcmp(cmp, "put")) {
+  subsystem_put(subsys);
+ } else {
+  return -EINVAL;
+ }
+
+ return cnt;
+}
+
+static const struct file_operations subsys_debugfs_fops = {
+ .open = simple_open,
+ .read = subsys_debugfs_read,
+ .write = subsys_debugfs_write,
+};
+
+static struct dentry *subsys_base_dir;
+
+static int __init subsys_debugfs_init(void)
+{
+ subsys_base_dir = debugfs_create_dir("msm_subsys", NULL);
+ return !subsys_base_dir ? -ENOMEM : 0;
+}
+
+static void subsys_debugfs_exit(void)
+{
+ debugfs_remove_recursive(subsys_base_dir);
+}
+
+static int subsys_debugfs_add(struct subsys_device *subsys)
+{
+ if (!subsys_base_dir)
+  return -ENOMEM;
+
+ subsys->dentry = debugfs_create_file(subsys->desc->name,
+    S_IRUGO | S_IWUSR, subsys_base_dir,
+    subsys, &subsys_debugfs_fops);
+ return !subsys->dentry ? -ENOMEM : 0;
+}
+
+static void subsys_debugfs_remove(struct subsys_device *subsys)
+{
+ debugfs_remove(subsys->dentry);
+}
+#else
+static int __init subsys_debugfs_init(void) { return 0; };
+static void subsys_debugfs_exit(void) { }
+static int subsys_debugfs_add(struct subsys_device *subsys) { return 0; }
+static void subsys_debugfs_remove(struct subsys_device *subsys) { }
+#endif
+static int subsys_device_open(struct inode *inode, struct file *file){struct subsys_device *device, *subsys_dev = 0;
@@ -1668,8 +1753,18 @@ struct subsys_device *subsys_register(struct subsys_desc *desc)mutex_init(&subsys->track.lock);+ ret = subsys_debugfs_add(subsys);
+ if (ret) {
+  ida_simple_remove(&subsys_ida, subsys->id);
+  wakeup_source_trash(&subsys->ssr_wlock);
+  kfree(subsys);
+  return ERR_PTR(ret);
+ }
+
+ret = device_register(&subsys->dev);if (ret) {
+  subsys_debugfs_remove(subsys);put_device(&subsys->dev);return ERR_PTR(ret);}
@@ -1731,6 +1826,7 @@ err_setup_irqs:if (ofnode)subsys_remove_restart_order(ofnode);err_register:
+subsys_debugfs_remove(subsys);device_unregister(&subsys->dev);return ERR_PTR(ret);}
@@ -1759,6 +1855,7 @@ void subsys_unregister(struct subsys_device *subsys)WARN_ON(subsys->count);device_unregister(&subsys->dev);mutex_unlock(&subsys->track.lock);
+  subsys_debugfs_remove(subsys);subsys_char_device_remove(subsys);sysmon_notifier_unregister(subsys->desc);if (subsys->desc->edge)
@@ -1799,6 +1896,10 @@ static int __init subsys_restart_init(void)if (ret)goto err_bus;+ ret = subsys_debugfs_init();
+ if (ret)
+  goto err_debugfs;
+char_class = class_create(THIS_MODULE, "subsys");if (IS_ERR(char_class)) {ret = -ENOMEM;
@@ -1816,6 +1917,8 @@ static int __init subsys_restart_init(void)err_soc:class_destroy(char_class);err_class:
+ subsys_debugfs_exit();
+err_debugfs:bus_unregister(&subsys_bus_type);err_bus:destroy_workqueue(ssr_wq);
diff --git a/include/soc/qcom/subsystem_restart.h b/include/soc/qcom/subsystem_restart.h
old mode 100644
new mode 100755
index 9a4d013..da258d2
--- a/include/soc/qcom/subsystem_restart.h
+++ b/include/soc/qcom/subsystem_restart.h
@@ -18,7 +18,7 @@#include <linux/interrupt.h>struct subsys_device;
-extern struct bus_type subsys_bus_type;
+//extern struct bus_type subsys_bus_type;enum {RESET_SOC = 0,

第二种方式是:在adsp侧sensor init时添加delay,加大SMGR_DELAY_US延时,从而实现等到QXDM 识别到diag口后才执行sensor init 操作。

If ADSP SSR can
not work, you can add delay in the sensor init code (it is just for debug ADSP
init issue, need remove it after finish debug);
sns_smgr_main.c
void sns_smgr_task(void* p_arg)
{smgr_init();sns_smgr_sensor_init();sns_init_done();sns_smgr_mr_init(sns_smgr.sig_grp);**SMGR_DELAY_US(6000000);**    // 这边是延时6s,按照需要修改这边延时抓取log。

高通ADSP抓取sensor init log相关推荐

  1. 高通QXDM抓取log

    https://blog.csdn.net/u010164190/article/details/79913808

  2. 开箱即用的高匿代理抓取工具

    golang-proxy v3.0 golang-proxy是一个开箱即用的高匿代理抓取工具, 它是语言无关的 项目地址: https://github.com/storyicon/golang-pr ...

  3. 开发一款抓取Android系统Log的APP(logcat, kernel, Memory, cpu)

    近期项目需要一款抓取系统log的实用工具,具体的内容包括kernel中的log, cpu中的log,  memory 中的log, 以及system中的log,在Android4.1之后 认为应用读取 ...

  4. 华为抓取错误日志在哪里_抓取android手机log的介绍

    本篇文章只是本人的工作经验总结,如有错误,欢迎指正!未经许可,不得转载. 首选需要有debug版本的android手机哈,否则是没有root权限的~ 1.抓取AP log的命令: adb logcat ...

  5. android adb命令 抓取系统各种 log

    android adb命令 抓取系统各种 log getLog.bat: adb root adb remount adb wait-for-device adb logcat -v time > ...

  6. 瞄准高消费人群抓取消费数据

    瞄准高消费人群抓取消费数据 不太爱喝饮料 偶尔喝也会选择元气森林 和小店老板聊天 夸了一句小店的饮料品种很多 老板反手询问 我是不是很少喝饮料 因为喜欢喝的人蛮多都说他的品种还不够多 为什么会出现这个 ...

  7. 高通HAL层之Sensor HAL

    高通的HAL层其实分为两种,一种是直接从kernel这边报数据上来的,由sensor HAL层来监听,另一种是走ADSP的模式,HAL层是通过qmi的形式进行监听的: 走ADSP架构的可以看下面的博客 ...

  8. 高通平台 input类 sensor驱动分析 : 光感/距感 stk3x1x driver分析

    stk3x1x driver分析 1:注册驱动 定义 i2c_driver static struct i2c_driver stk_ps_driver = {.driver = {.name = D ...

  9. adb logcat 抓取日志_手机抓取崩溃的log日志(安卓/ios)

    android闪退获取日志方法: 1下载adb工具包 (工具包自己找,adb原理https://zhuanlan.zhihu.com/p/96468249) 2.注意事项 请确保电脑上只连接了一台手机 ...

最新文章

  1. android 多个dialog 交替显示,Android如何在一个AlertDialog中一个接一个地显示两个ListViews...
  2. Android Usb的研究
  3. python中的Xpath方法总结
  4. SAP MES接收生产订单及工艺路线
  5. [html] 写H5和小程序有什么相同及不同的地方吗?
  6. 【HDU - 6231】K-th Number(二分,思维)
  7. win32开发(自定义消息)
  8. PowerDesigner16工具学习笔记-建立CDM
  9. 服务器的hosts文件位置,Hosts文件位置和书写规范
  10. 人人都是产品经理(互联网产品经理的第一本书,马云力荐!)
  11. 冒死揭开饭圈遮羞布,明星僵尸粉盘点
  12. 【Java】蓝桥杯历届试题PREV(一)
  13. 小刘的BUG(sql注入)
  14. 小程序瀑布流-是真的流啊
  15. 牛客小白月赛1 F.三视图
  16. php outexcel,PHP Spreadsheet_Excel_Writer setStrikeOut()用法及代码示例
  17. PDF怎么转图片?快把这些方法收好
  18. 亚商投资顾问 早餐FM/0411中证金融下调证券公司保证金比例
  19. 通话质量好的蓝牙耳机有哪些?通话质量好的蓝牙耳机盘点
  20. 【GraphVisual】画节点与线以及移动节点线随着移动

热门文章

  1. 【线性代数】3-2:零空间(Nullspace)
  2. idea中的编码设置
  3. 网络安全——HTTP头部注入
  4. UWP平台和PC平台有什么区别
  5. 【转】Cocos 网络编程之hettp
  6. i386、amd64、i686...
  7. Python:恶搞,将你朋友照片做成熊猫人表情包
  8. 高斯回归进行数据预测
  9. AR项目总结之ER图
  10. 多视角-3-多视角数据聚类研究