高通QCC-- chain修改指引

如果要改某个状态下的音频链路,那就需要先找出默认的链路是怎么样的,这个可以从log和qact看得到,例如在usb dongle中找到通话的链路。我们在qact看是这样的

static void dfu_MessageHandler(Task task, MessageId id, Message message)
{
 
    UNUSED(task);
    UNUSED(message);
 
    DEBUG_LOG("dfu_MessageHandler. MESSAGE:dfu_internal_messages_t:0x%X", id);
 
    switch (id)
    {
 
#ifdef INCLUDE_DFU_PEER
        case PEER_SIG_MARSHALLED_MSG_CHANNEL_RX_IND:
            dfu_HandlePeerSigMarshalledMsgChannelRxInd((PEER_SIG_MARSHALLED_MSG_CHANNEL_RX_IND_T *)message);
            break;
 
        case PEER_SIG_MARSHALLED_MSG_CHANNEL_TX_CFM:
            dfu_HandlePeerSigMarshalledMsgChannelTxCfm((PEER_SIG_MARSHALLED_MSG_CHANNEL_TX_CFM_T *)message);
            break;
 
        case CON_MANAGER_CONNECTION_IND:
            dfu_HandleConManagerConnectionInd((CON_MANAGER_CONNECTION_IND_T*)message);
            break;
 
        case PEER_SIG_CONNECTION_IND:
            dfu_HandlePeerSigConnectInd((const PEER_SIG_CONNECTION_IND_T *)message);
            break;
 
        /* MIRROR PROFILE MESSAGES */
        case MIRROR_PROFILE_CONNECT_IND:
            {
 
                dfu_task_data_t *the_dfu = Dfu_GetTaskData();
                bool is_primary = BtDevice_IsMyAddressPrimary();
 
                if (is_primary)
                {
 
                    the_dfu->peerProfilesToConnect &= ~DEVICE_PROFILE_MIRROR;
                    DEBUG_LOG("dfu_MessageHandler (profiles:x%x) pending to connect", the_dfu->peerProfilesToConnect);
                }
            }
            break;
 
        case HANDOVER_PROFILE_CONNECTION_IND:
            {
 
                dfu_task_data_t *the_dfu = Dfu_GetTaskData();
                bool is_primary = BtDevice_IsMyAddressPrimary();
 
                if (is_primary)
                {
 
                    the_dfu->peerProfilesToConnect &= ~DEVICE_PROFILE_HANDOVER;
                    DEBUG_LOG("dfu_MessageHandler (profiles:x%x) pending to connect", the_dfu->peerProfilesToConnect);
                }
            }
            break;
#endif
 
        case CON_MANAGER_CLOSE_ALL_CFM:
            {
 
                if(Dfu_GetTaskData()->dfu_reboot_pending_on_acl_close)
                {
 
                    DEBUG_LOG_INFO("dfu_MessageHandler. CON_MANAGER_CLOSE_ALL_CFM Call UpgradeImageSwap()");
                    Dfu_GetTaskData()->dfu_reboot_pending_on_acl_close = FALSE;
                    UpgradeImageSwap();
                }
            }
            break;
 
            /* Message sent in response to UpgradeInit().
             * In this case we need to forward to the app to unblock initialisation.
             */
        case UPGRADE_INIT_CFM:
            {
 
                const UPGRADE_INIT_CFM_T *init_cfm = (const UPGRADE_INIT_CFM_T *)message;
 
                DEBUG_LOG("dfu_MessageHandler. UPGRADE_INIT_CFM %d (sts)",init_cfm->status);
 
                dfu_ForwardInitCfm(init_cfm);
            }
            break;
 
            /* Message sent during initialisation of the upgrade library
                to let the VM application know that a restart has occurred
                and reconnection to a host may be required. */
        case UPGRADE_RESTARTED_IND:
            dfu_HandleRestartedInd((UPGRADE_RESTARTED_IND_T*)message);
            break;
 
            /* Message sent to application to request applying a downloaded upgrade.
                Note this may include a warm reboot of the device.
                Application must respond with UpgradeApplyResponse() */
        case UPGRADE_APPLY_IND:
            {
 
#ifdef INCLUDE_DFU_PEER
                bool isPrimary = BtDevice_IsMyAddressPrimary();
                dfu_task_data_t *the_dfu = Dfu_GetTaskData();
 
                DEBUG_LOG("dfu_MessageHandler UPGRADE_APPLY_IND, isPrimary:%d", isPrimary);
#ifndef HOSTED_TEST_ENVIRONMENT
                if (isPrimary)
                {
 
                    /*
                     * As per the legacy scheme, Primary reboots post Secondary
                     * having rebooted. And as part of Secondary reboot, the
                     * peer links (including DFU L2CAP channel) are
                     * re-established. Wait for the connections of these other
                     * peer profiles to complete before Primary reboot, in order
                     * to avoid und
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值