Lines Matching full:p_result
42 static tAVRC_STS avrc_ctrl_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_result)
47 p_result->pdu = *p++;
48 AVRC_TRACE_DEBUG("%s pdu:0x%x", __func__, p_result->pdu);
49 if (!AVRC_IsValidAvcType (p_result->pdu, p_msg->hdr.ctype))
66 switch (p_result->pdu)
74 BE_STREAM_TO_UINT8 (p_result->volume.volume, p);
75 p_result->volume.volume = AVRC_MAX_VOLUME & p_result->volume.volume;
80 BE_STREAM_TO_UINT8 (p_result->reg_notif.event_id, p);
81 BE_STREAM_TO_UINT32 (p_result->reg_notif.param, p);
102 static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_result,
122 p_result->pdu = *p++;
123 AVRC_TRACE_DEBUG("%s pdu:0x%x", __func__, p_result->pdu);
124 if (!AVRC_IsValidAvcType (p_result->pdu, p_msg->hdr.ctype))
140 switch (p_result->pdu)
143 p_result->get_caps.capability_id = *p++;
144 if (!AVRC_IS_VALID_CAP_ID(p_result->get_caps.capability_id))
157 p_result->list_app_values.attr_id = *p++;
158 if (!AVRC_IS_VALID_ATTRIBUTE(p_result->list_app_values.attr_id))
166 BE_STREAM_TO_UINT8 (p_result->get_cur_app_val.num_attr, p);
167 if (len != (p_result->get_cur_app_val.num_attr+1))
172 p_u8 = p_result->get_cur_app_val.attrs;
173 for (xx=0, yy=0; xx< p_result->get_cur_app_val.num_attr; xx++)
180 p_result->get_cur_app_val.num_attr = yy;
188 BE_STREAM_TO_UINT8 (p_result->set_app_val.num_val, p);
190 if (p_buf && (len == ((p_result->set_app_val.num_val<<1) + 1)))
192 p_result->set_app_val.p_vals = (tAVRC_APP_SETTING *)p_buf;
193 p_app_set = p_result->set_app_val.p_vals;
194 for (xx=0; ((xx< p_result->set_app_val.num_val) && (buf_len > size_needed)); xx++)
201 if (xx != p_result->set_app_val.num_val)
205 __func__, xx, p_result->set_app_val.num_val);
206 p_result->set_app_val.num_val = xx;
222 BE_STREAM_TO_UINT8 (p_result->get_app_val_txt.attr_id, p);
223 if (!AVRC_IS_VALID_ATTRIBUTE(p_result->get_app_val_txt.attr_id))
227 BE_STREAM_TO_UINT8 (p_result->get_app_val_txt.num_val, p);
228 if ( (len - 2/* attr_id & num_val */) != p_result->get_app_val_txt.num_val)
232 p_u8 = p_result->get_app_val_txt.vals;
233 for (xx=0; xx< p_result->get_app_val_txt.num_val; xx++)
236 if (!avrc_is_valid_player_attrib_value(p_result->get_app_val_txt.attr_id,
253 BE_STREAM_TO_UINT8 (p_result->inform_charset.num_id, p);
254 if ( (len - 1/* num_id */) != p_result->inform_charset.num_id * 2)
258 p_u16 = p_result->inform_charset.charsets;
259 if (p_result->inform_charset.num_id > AVRC_MAX_CHARSET_SIZE)
260 p_result->inform_charset.num_id = AVRC_MAX_CHARSET_SIZE;
261 for (xx=0; xx< p_result->inform_charset.num_id; xx++)
274 p_result->inform_battery_status.battery_status = *p++;
275 if (!AVRC_IS_VALID_BATTERY_STATUS(p_result->inform_battery_status.battery_status))
289 BE_STREAM_TO_UINT8 (p_result->get_elem_attrs.num_attr, p);
290 if ( (len - 9/* UID/8 and num_attr/1 */) != (p_result->get_elem_attrs.num_attr * 4))
294 p_u32 = p_result->get_elem_attrs.attrs;
295 if (p_result->get_elem_attrs.num_attr > AVRC_MAX_ELEM_ATTR_SIZE)
296 p_result->get_elem_attrs.num_attr = AVRC_MAX_ELEM_ATTR_SIZE;
297 for (xx=0; xx< p_result->get_elem_attrs.num_attr; xx++)
319 BE_STREAM_TO_UINT8 (p_result->reg_notif.event_id, p);
320 BE_STREAM_TO_UINT32 (p_result->reg_notif.param, p);
354 tAVRC_STS AVRC_Ctrl_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result)
358 if (p_msg && p_result)
363 status = avrc_ctrl_pars_vendor_cmd(&p_msg->vendor, p_result);
370 p_result->cmd.opcode = p_msg->hdr.opcode;
371 p_result->cmd.status = status;
388 tAVRC_STS AVRC_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result, UINT8 *p_buf, UINT16 buf_len)
393 if (p_msg && p_result)
398 status = avrc_pars_vendor_cmd(&p_msg->vendor, p_result, p_buf, buf_len);
405 p_result->pdu = (UINT8)id;
413 p_result->cmd.opcode = p_msg->hdr.opcode;
414 p_result->cmd.status = status;