mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 21:24:16 +08:00
avrcp: handle InformDisplayableCharacterSet pdu
This commit is contained in:
parent
3e5bde2244
commit
bb8e4d6a12
@ -119,6 +119,7 @@
|
||||
#define AVRCP_SET_PLAYER_VALUE 0x14
|
||||
#define AVRCP_GET_PLAYER_ATTRIBUTE_TEXT 0x15
|
||||
#define AVRCP_GET_PLAYER_VALUE_TEXT 0x16
|
||||
#define AVRCP_DISPLAYABLE_CHARSET 0x17
|
||||
|
||||
/* Capabilities for AVRCP_GET_CAPABILITIES pdu */
|
||||
#define CAP_COMPANY_ID 0x02
|
||||
@ -1043,6 +1044,26 @@ static int handle_vendordep_pdu(struct control *control,
|
||||
*/
|
||||
pdu->params[0] = E_INVALID_PARAM;
|
||||
goto err_metadata;
|
||||
case AVRCP_DISPLAYABLE_CHARSET:
|
||||
if (avrcp->code != CTYPE_STATUS) {
|
||||
pdu->params[0] = E_INVALID_COMMAND;
|
||||
goto err_metadata;
|
||||
}
|
||||
|
||||
if (pdu->params[0] < 3) {
|
||||
pdu->params[0] = E_INVALID_PARAM;
|
||||
goto err_metadata;
|
||||
}
|
||||
|
||||
/*
|
||||
* We acknowledge the commands, but we always use UTF-8 for
|
||||
* encoding since CT is obliged to support it.
|
||||
*/
|
||||
pdu->params_len = 0;
|
||||
avrcp->code = CTYPE_STABLE;
|
||||
len = 0;
|
||||
|
||||
break;
|
||||
default:
|
||||
/* Invalid pdu_id */
|
||||
pdu->params[0] = E_INVALID_COMMAND;
|
||||
|
Loading…
Reference in New Issue
Block a user