summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bta/av/bta_av_act.c12
-rwxr-xr-x[-rw-r--r--]bta/dm/bta_dm_pm.c1
-rw-r--r--btif/src/btif_media_task.c6
-rw-r--r--stack/include/avrc_defs.h2
4 files changed, 14 insertions, 7 deletions
diff --git a/bta/av/bta_av_act.c b/bta/av/bta_av_act.c
index 8181e57..4693a6e 100644
--- a/bta/av/bta_av_act.c
+++ b/bta/av/bta_av_act.c
@@ -887,9 +887,15 @@ void bta_av_rc_msg(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
else if (!(p_cb->features & BTA_AV_FEAT_VENDOR) &&
p_data->rc_msg.msg.hdr.ctype <= AVRC_CMD_GEN_INQ)
{
- /* reject it */
- p_data->rc_msg.msg.hdr.ctype = BTA_AV_RSP_NOT_IMPL;
- AVRC_VendorRsp(p_data->rc_msg.handle, p_data->rc_msg.label, &p_data->rc_msg.msg.vendor);
+ if(p_data->rc_msg.msg.vendor.p_vendor_data[0] == AVRC_PDU_INVALID)
+ {
+ /* reject it */
+ p_data->rc_msg.msg.hdr.ctype = BTA_AV_RSP_REJ;
+ p_data->rc_msg.msg.vendor.p_vendor_data[4] = AVRC_STS_BAD_CMD;
+ }
+ else
+ p_data->rc_msg.msg.hdr.ctype = BTA_AV_RSP_NOT_IMPL;
+ AVRC_VendorRsp(p_data->rc_msg.handle, p_data->rc_msg.label, &p_data->rc_msg.msg.vendor);
}
}
diff --git a/bta/dm/bta_dm_pm.c b/bta/dm/bta_dm_pm.c
index eb0dfe4..1b75b11 100644..100755
--- a/bta/dm/bta_dm_pm.c
+++ b/bta/dm/bta_dm_pm.c
@@ -82,6 +82,7 @@ void bta_dm_disable_pm(void)
{
UINT8 i;
+ bta_sys_pm_register(NULL);
BTM_PmRegister( BTM_PM_DEREG, &bta_dm_cb.pm_id, NULL);
/* Need to stop all active timers. */
diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c
index 9de74d5..d7e372d 100644
--- a/btif/src/btif_media_task.c
+++ b/btif/src/btif_media_task.c
@@ -107,7 +107,7 @@
#define BTIF_MEDIA_TASK_CMD TASK_MBOX_0_EVT_MASK
#define BTIF_MEDIA_TASK_DATA TASK_MBOX_1_EVT_MASK
-#define BTIF_MEDIA_TASK_KILL TASK_MBOX_3_EVT_MASK
+#define BTIF_MEDIA_TASK_KILL EVENT_MASK(GKI_SHUTDOWN_EVT)
#define BTIF_MEDIA_AA_TASK_TIMER_ID TIMER_0
#define BTIF_MEDIA_AV_TASK_TIMER_ID TIMER_1
@@ -573,7 +573,7 @@ static void btif_a2dp_ctrl_cb(tUIPC_CH_ID ch_id, tUIPC_EVENT event)
case UIPC_CLOSE_EVT:
/* restart ctrl server unless we are shutting down */
- if (media_task_running != MEDIA_TASK_STATE_SHUTTING_DOWN)
+ if (media_task_running == MEDIA_TASK_STATE_ON)
UIPC_Open(UIPC_CH_ID_AV_CTRL , btif_a2dp_ctrl_cb);
break;
@@ -765,7 +765,7 @@ int btif_a2dp_start_media_task(void)
void btif_a2dp_stop_media_task(void)
{
APPL_TRACE_EVENT0("## A2DP STOP MEDIA TASK ##");
- GKI_send_event(BT_MEDIA_TASK, BTIF_MEDIA_TASK_KILL);
+ GKI_destroy_task(BT_MEDIA_TASK);
}
/*****************************************************************************
diff --git a/stack/include/avrc_defs.h b/stack/include/avrc_defs.h
index b902bff..3f82948 100644
--- a/stack/include/avrc_defs.h
+++ b/stack/include/avrc_defs.h
@@ -208,7 +208,7 @@
* The len for vendor unique data is 5 */
#define AVRC_PASS_THRU_GROUP_LEN 5
-
+#define AVRC_PDU_INVALID 0xff
/* 6.15.3 error status code for general reject */
#define AVRC_STS_BAD_CMD 0x00 /* Invalid command, sent if TG received a PDU that it did not understand. */
#define AVRC_STS_BAD_PARAM 0x01 /* Invalid parameter, sent if the TG received a PDU with a parameter ID that it did not understand. Sent if there is only one parameter ID in the PDU. */