找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

查看: 3287|回复: 13

[QCC3系列] qcc3040 earbud工程如何单耳使用?

[复制链接]
连续签到天数:1天
签到总天数:195天
签到总奖励:5454金币
发表于 2022-1-28 12:56:38 | 显示全部楼层 |阅读模式
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
连续签到天数:1天
签到总天数:327天
签到总奖励:5620金币
发表于 2022-1-31 00:47:14 来自手机 | 显示全部楼层
同问
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:195天
签到总奖励:5454金币
 楼主| 发表于 2022-2-4 01:18:58 | 显示全部楼层

有研究出来吗?
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:3天
签到总天数:1110天
签到总奖励:32664金币
发表于 2022-2-10 16:38:05 | 显示全部楼层
单耳可以使用3040来做
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:195天
签到总奖励:5454金币
 楼主| 发表于 2022-2-10 23:34:37 | 显示全部楼层
再坛友的帮助下已解决,感谢坛友帮助。
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:4天
签到总天数:850天
签到总奖励:18013金币
发表于 2022-2-26 13:01:13 | 显示全部楼层
同问,怎么解决的?
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:25天
签到总奖励:147金币
发表于 2022-5-23 23:44:50 来自手机 | 显示全部楼层
我用的是standard-oem-earbud工程,修改代码参考如下void TwsTopology_Start(Task requesting_task) {     twsTopologyTaskData *twst = TwsTopologyGetTaskData();      twst->start_cfm_needed = TRUE;      if (!twst->started)     {         DEBUG_LOG("TwsTopology_Start (normal start)");         twst->started = TRUE;          twst->app_task = requesting_task;          twst->pairing_notification_task.handler = twsTopology_HandlePairingActivityNotification;          Pairing_ActivityClientRegister(&twst->pairing_notification_task);         #if 0         MessageSend(TwsTopologyGetTask(), TWSTOP_INTERNAL_START, NULL);         #else       //// new code for headset device,gaillysu added 2021.10.29        peer_find_role_completed(PEER_FIND_ROLE_PRIMARY);       //// peer_find_role_completed(PEER_FIND_ROLE_PRIMARY) will send PEER_FIND_ROLE_PRIMARY to tws_topology  handler message right now       //// see to twsTopology_HandlePeerFindRolePrimary(), this function will do two things       //// 1:  start pairing with headset (this device is primary role)       //// 2:  start connecting peer earbud (secondary role)             #endif         }     else if (   twst->role == tws_topology_role_primary              || twst->role == tws_topology_role_secondary)     {         DEBUG_LOG("TwsTopology_Start, sending immediate success");         TwsTopology_SendStartCfm(tws_topology_status_success, twst->role);     }     else     {         DEBUG_LOG("TwsTopology_Start called again. Response waiting for a role");     } }
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:256天
签到总奖励:6406金币
发表于 2022-5-24 01:40:58 | 显示全部楼层
gaillysu 发表于 2022-5-23 23:44
我用的是standard-oem-earbud工程,修改代码参考如下void TwsTopology_Start(Task requesting_task) {      ...

代码有点乱,是这样?

  1. void TwsTopology_Start(Task requesting_task)
  2. {
  3.     twsTopologyTaskData *twst = TwsTopologyGetTaskData();
  4.     twst->start_cfm_needed = TRUE;
  5.     if (!twst->started)
  6.     {
  7.         DEBUG_LOG("TwsTopology_Start (normal start)");
  8.         twst->started = TRUE;
  9.         twst->app_task = requesting_task;
  10.         twst->pairing_notification_task.handler = twsTopology_HandlePairingActivityNotification;
  11.         Pairing_ActivityClientRegister(&twst->pairing_notification_task);
  12. #if 0
  13. MessageSend(TwsTopologyGetTask(), TWSTOP_INTERNAL_START, NULL);
  14. #else
  15. //// new code for headset device,gaillysu added 2021.10.29
  16.         peer_find_role_completed(PEER_FIND_ROLE_PRIMARY);
  17. //// peer_find_role_completed(PEER_FIND_ROLE_PRIMARY) will send PEER_FIND_ROLE_PRIMARY to tws_topology  handler message right now
  18. //// see to twsTopology_HandlePeerFindRolePrimary(), this function will do two things
  19. //// 1:  start pairing with headset (this device is primary role)
  20. //// 2:  start connecting peer earbud (secondary role)
  21. #endif
  22.     }
  23.     else if (twst->role == tws_topology_role_primary || twst->role == tws_topology_role_secondary)
  24.     {
  25.         DEBUG_LOG("TwsTopology_Start, sending immediate success");
  26.         TwsTopology_SendStartCfm(tws_topology_status_success, twst->role);
  27.     }
  28.     else
  29.     {
  30.         DEBUG_LOG("TwsTopology_Start called again. Response waiting for a role");
  31.     }
  32. }
复制代码


积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:25天
签到总奖励:147金币
发表于 2022-6-9 15:06:58 | 显示全部楼层
本帖最后由 gaillysu 于 2022-6-9 15:09 编辑
jjr 发表于 2022-5-24 01:40
代码有点乱,是这样?

谢谢你的整理代码, 该代码只针对 qcc514x-qcc304x-src-1-0_qtil_standard_oem_earbud 有用, 对于高版本的 earbud-ADK-21.1-CS2-MR1-r00289.1不适用,   北纬@ allinsimple 微信号
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:3天
签到总奖励:17金币
发表于 2022-9-15 20:32:08 | 显示全部楼层
怎么解决的,大佬,你是移植的3044的headset还是修改了3040的earbud
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2024-3-29 09:40 , Processed in 0.263069 second(s), 23 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表