linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] android/ipc: Add AVRCP HAL message definitions
@ 2014-01-22 16:06 Andrei Emeltchenko
  2014-02-11 16:59 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2014-01-22 16:06 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 android/hal-msg.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/android/hal-msg.h b/android/hal-msg.h
index d46b428..3937f07 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -338,6 +338,77 @@ struct hal_cmd_a2dp_disconnect {
 	uint8_t bdaddr[6];
 } __attribute__((packed));
 
+/* AVRCP HAL API */
+
+#define HAL_OP_AVRCP_GET_PLAY_STATUS_RSP		0x01
+struct hal_cmd_avrcp_get_play_status_rsp {
+	uint8_t  status;
+	uint32_t len;
+	uint32_t pos;
+} __attribute__((packed));
+
+#define HAL_OP_AVRCP_LIST_PLAYER_APP_ATTR_RSP		0x02
+struct hal_cmd_avrcp_list_player_app_attr_rsp {
+	uint16_t len;
+	uint8_t  data[0];
+} __attribute__((packed));
+
+#define HAL_OP_AVRCP_LIST_PLAYER_APP_VAL_RSP		0x03
+struct hal_cmd_avrcp_list_player_app_val_rsp {
+	uint16_t len;
+	uint8_t  data[0];
+} __attribute__((packed));
+
+#define MAX_APP_SETTINGS 8
+struct player_setting {
+	uint8_t num_attr;
+	uint8_t attr_ids[MAX_APP_SETTINGS];
+	uint8_t attr_vals[MAX_APP_SETTINGS];
+} __attribute__((packed));
+
+#define HAL_OP_AVRCP_GET_PLAYER_APP_VAL_RSP		0x04
+struct hal_cmd_avrcp_get_player_app_val_rsp {
+	struct player_setting settings;
+} __attribute__((packed));
+
+#define MAX_ATTR_STR_LEN 255
+struct player_text {
+	uint32_t id;
+	uint8_t text[MAX_ATTR_STR_LEN];
+}  __attribute__((packed));
+
+#define HAL_OP_AVRCP_GET_PLAYER_APP_ATTR_TEXT_RSP	0x05
+#define HAL_OP_AVRCP_GET_PLAYER_APP_VAL_TEXT_RSP	0x06
+#define HAL_OP_AVRCP_GET_ELEMENT_ATTR_RSP		0x07
+struct hal_cmd_avrcp_get_text_rsp {
+	uint16_t len;
+	struct player_text data[0];
+} __attribute__((packed));
+
+#define HAL_OP_AVRCP_SET_PLAYER_APP_VAL_RSP		0x08
+struct hal_cmd_avrcp_set_player_app_val_rsp {
+	uint8_t status;
+} __attribute__((packed));
+
+union notification {
+	uint8_t  status;
+	uint8_t  uid[8];
+	uint32_t pos;
+	struct player_setting player_settings;
+} __attribute__((packed));
+
+#define HAL_OP_AVRCP_REGISTER_NOTIFICATION_RSP		0x09
+struct hal_cmd_avrcp_register_notification_rsp {
+	uint8_t id;
+	uint8_t type;
+	union notification param;
+}  __attribute__((packed));
+
+#define HAL_OP_AVRCP_SET_VOLUME				0x0a
+struct hal_cmd_avrcp_set_volume {
+	uint8_t volume;
+}  __attribute__((packed));
+
 /* PAN HAL API */
 
 /* PAN Roles */
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] android/ipc: Add AVRCP HAL message definitions
  2014-01-22 16:06 [RFC] android/ipc: Add AVRCP HAL message definitions Andrei Emeltchenko
@ 2014-02-11 16:59 ` Szymon Janc
  0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2014-02-11 16:59 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Wednesday 22 of January 2014 18:06:28 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> ---
>  android/hal-msg.h | 71
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71
> insertions(+)
> 
> diff --git a/android/hal-msg.h b/android/hal-msg.h
> index d46b428..3937f07 100644
> --- a/android/hal-msg.h
> +++ b/android/hal-msg.h
> @@ -338,6 +338,77 @@ struct hal_cmd_a2dp_disconnect {
>  	uint8_t bdaddr[6];
>  } __attribute__((packed));
> 
> +/* AVRCP HAL API */
> +
> +#define HAL_OP_AVRCP_GET_PLAY_STATUS_RSP		0x01
> +struct hal_cmd_avrcp_get_play_status_rsp {
> +	uint8_t  status;

defines for enums should be added as well (this goes for all enums)

> +	uint32_t len;
> +	uint32_t pos;
> +} __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_LIST_PLAYER_APP_ATTR_RSP		0x02
> +struct hal_cmd_avrcp_list_player_app_attr_rsp {
> +	uint16_t len;
> +	uint8_t  data[0];
> +} __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_LIST_PLAYER_APP_VAL_RSP		0x03
> +struct hal_cmd_avrcp_list_player_app_val_rsp {
> +	uint16_t len;
> +	uint8_t  data[0];
> +} __attribute__((packed));
> +
> +#define MAX_APP_SETTINGS 8
> +struct player_setting {
> +	uint8_t num_attr;
> +	uint8_t attr_ids[MAX_APP_SETTINGS];
> +	uint8_t attr_vals[MAX_APP_SETTINGS];
> +} __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_GET_PLAYER_APP_VAL_RSP		0x04
> +struct hal_cmd_avrcp_get_player_app_val_rsp {
> +	struct player_setting settings;
> +} __attribute__((packed));
> +
> +#define MAX_ATTR_STR_LEN 255
> +struct player_text {
> +	uint32_t id;
> +	uint8_t text[MAX_ATTR_STR_LEN];
> +}  __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_GET_PLAYER_APP_ATTR_TEXT_RSP	0x05
> +#define HAL_OP_AVRCP_GET_PLAYER_APP_VAL_TEXT_RSP	0x06
> +#define HAL_OP_AVRCP_GET_ELEMENT_ATTR_RSP		0x07
> +struct hal_cmd_avrcp_get_text_rsp {
> +	uint16_t len;
> +	struct player_text data[0];
> +} __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_SET_PLAYER_APP_VAL_RSP		0x08
> +struct hal_cmd_avrcp_set_player_app_val_rsp {
> +	uint8_t status;
> +} __attribute__((packed));
> +
> +union notification {
> +	uint8_t  status;
> +	uint8_t  uid[8];
> +	uint32_t pos;
> +	struct player_setting player_settings;
> +} __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_REGISTER_NOTIFICATION_RSP		0x09
> +struct hal_cmd_avrcp_register_notification_rsp {
> +	uint8_t id;
> +	uint8_t type;
> +	union notification param;
> +}  __attribute__((packed));
> +
> +#define HAL_OP_AVRCP_SET_VOLUME				0x0a
> +struct hal_cmd_avrcp_set_volume {
> +	uint8_t volume;
> +}  __attribute__((packed));
> +
>  /* PAN HAL API */
> 
>  /* PAN Roles */

Please add structures for notifications. Also hal-ipc-api.txt needs to be 
updated before this can go in.

-- 
BR
Szymon Janc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-11 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 16:06 [RFC] android/ipc: Add AVRCP HAL message definitions Andrei Emeltchenko
2014-02-11 16:59 ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).