From: <joohi.rastogi@stericsson.com>
To: User Name <linux-bluetooth@vger.kernel.org>
Cc: User Name2 <joohi.rastogi@stericsson.com>
Subject: [PATCH 1/2] AVRCP: Refactor the code using constants
Date: Thu, 10 May 2012 11:56:44 +0530 [thread overview]
Message-ID: <1336631204-25794-1-git-send-email-joohi.rastogi@stericsson.com> (raw)
From: Joohi Rastogi <joohi.rastogi@stericsson.com>
Adds macros for category features
---
audio/avrcp.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/audio/avrcp.c b/audio/avrcp.c
index df39d04..1b35c3f 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -89,6 +89,11 @@
#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
+
enum battery_status {
BATTERY_STATUS_NORMAL = 0,
BATTERY_STATUS_WARNING = 1,
@@ -174,7 +179,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 +245,9 @@ 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);
record = sdp_record_alloc();
if (!record)
--
1.7.5.4
next reply other threads:[~2012-05-10 6:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 6:26 joohi.rastogi [this message]
2012-05-10 15:40 ` [PATCH 1/2] AVRCP: Refactor the code using constants Lucas De Marchi
-- strict thread matches above, loose matches on Subject: below --
2012-05-18 5:13 joohi.rastogi
2012-05-18 5:25 joohi.rastogi
2012-05-18 17:52 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336631204-25794-1-git-send-email-joohi.rastogi@stericsson.com \
--to=joohi.rastogi@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).