2012-05-09 10:45:27

by Joohi RASTOGI

[permalink] [raw]
Subject: [PATCH] AVRCP: Add missing Player Setting feature in TG record

From: Joohi Rastogi <[email protected]>

---
audio/avrcp.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/audio/avrcp.c b/audio/avrcp.c
index df39d04..22cc933 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -89,6 +89,12 @@
#define CAP_COMPANY_ID 0x02
#define CAP_EVENTS_SUPPORTED 0x03

+#define AVRCP_FEATURE_CATEGORY_1 0x0001
+#define AVRCP_FEATURE_CATEGORY_2 0x0002
+#define AVRCP_FEATURE_CATEGORY_3 0x0004
+#define AVRCP_FEATURE_CATEGORY_4 0x0008
+#define AVRCP_FEATURE_PLAYER_SETTINGS 0x0010
+
enum battery_status {
BATTERY_STATUS_NORMAL = 0,
BATTERY_STATUS_WARNING = 1,
@@ -174,7 +180,9 @@ static sdp_record_t *avrcp_ct_record(void)
sdp_record_t *record;
sdp_data_t *psm, *version, *features;
uint16_t lp = AVCTP_PSM;
- uint16_t avrcp_ver = 0x0100, avctp_ver = 0x0103, feat = 0x000f;
+ uint16_t avrcp_ver = 0x0100, avctp_ver = 0x0103;
+ uint16_t feat = (AVRCP_FEATURE_CATEGORY_1 | AVRCP_FEATURE_CATEGORY_2
+ | AVRCP_FEATURE_CATEGORY_3 | AVRCP_FEATURE_CATEGORY_4);

record = sdp_record_alloc();
if (!record)
@@ -238,7 +246,10 @@ static sdp_record_t *avrcp_tg_record(void)
sdp_record_t *record;
sdp_data_t *psm, *version, *features;
uint16_t lp = AVCTP_PSM;
- uint16_t avrcp_ver = 0x0103, avctp_ver = 0x0103, feat = 0x000f;
+ uint16_t avrcp_ver = 0x0103, avctp_ver = 0x0103;
+ uint16_t feat = (AVRCP_FEATURE_CATEGORY_1 | AVRCP_FEATURE_CATEGORY_2
+ | AVRCP_FEATURE_CATEGORY_3 | AVRCP_FEATURE_CATEGORY_4
+ | AVRCP_FEATURE_PLAYER_SETTINGS);

record = sdp_record_alloc();
if (!record)
--
1.7.5.4



2012-05-09 17:04:28

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] AVRCP: Add missing Player Setting feature in TG record

Hi,

On Wed, May 9, 2012 at 3:45 AM, <[email protected]> wrote:
> From: Joohi Rastogi <[email protected]>
>
> ---
> ?audio/avrcp.c | ? 15 +++++++++++++--
> ?1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/audio/avrcp.c b/audio/avrcp.c
> index df39d04..22cc933 100644
> --- a/audio/avrcp.c
> +++ b/audio/avrcp.c
> @@ -89,6 +89,12 @@
> ?#define CAP_COMPANY_ID ? ? ? ? 0x02
> ?#define CAP_EVENTS_SUPPORTED ? 0x03
>
> +#define AVRCP_FEATURE_CATEGORY_1 ? ? ? ? ? ? ? 0x0001
> +#define AVRCP_FEATURE_CATEGORY_2 ? ? ? ? ? ? ? 0x0002
> +#define AVRCP_FEATURE_CATEGORY_3 ? ? ? ? ? ? ? 0x0004
> +#define AVRCP_FEATURE_CATEGORY_4 ? ? ? ? ? ? ? 0x0008
> +#define AVRCP_FEATURE_PLAYER_SETTINGS ? ? ? ? ?0x0010
> +

There seems to be 2 different things, first it adds defines to
category features and second it adds player settings feature support,
can you split them?


--
Luiz Augusto von Dentz