All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Stockwell <dstockwell@frequency-one.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.dentz@gmail.com, lucas.demarchi@profusion.mobi,
	david_stockwell@att.net
Subject: [PATCH 1/5] Added more complete set of AVCTP/AVRCP defines
Date: Thu, 11 Aug 2011 09:12:01 -0500	[thread overview]
Message-ID: <201108110912.02268.dstockwell@frequency-one.com> (raw)

Added more complete set of AVCTP/AVRCP defines:
  command type/response codes
  passthrough key operation codes (CT->TG)
  vendor-dependent message opcode (TG->CT)
  AVRCP 1.3+ Protocol Definition Unit codes
  AVRCP 1.3+ Event-IDs
  Bluetooth SIG Company ID
  1394 Trade Association AVC MTU for Control channel

Based on Release 4.96

---
 audio/control.c |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 115 insertions(+), 5 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index c3ef737..188297a 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -67,28 +67,66 @@
 
 /* Packet types */
 #define AVCTP_PACKET_SINGLE	0
-#define AVCTP_PACKET_START	1
+#define AVCTP_PACKET_FIRST	1
 #define AVCTP_PACKET_CONTINUE	2
 #define AVCTP_PACKET_END	3
 
 /* ctype entries */
 #define CTYPE_CONTROL		0x0
 #define CTYPE_STATUS		0x1
+#define CTYPE_SPEC_INQUIRY	0x2
+#define CTYPE_NOTIFY		0x3
+#define CTYPE_GEN_INQUIRY	0x4
+
+/* ctype responses */
 #define CTYPE_NOT_IMPLEMENTED	0x8
 #define CTYPE_ACCEPTED		0x9
 #define CTYPE_REJECTED		0xA
+#define CTYPE_IN_TRANSITION	0xB
 #define CTYPE_STABLE		0xC
+#define CTYPE_CHANGED		0xD
+#define CTYPE_INTERIM		0xF
 
 /* opcodes */
 #define OP_VENDORDEP		0x00
 #define OP_UNITINFO		0x30
 #define OP_SUBUNITINFO		0x31
-#define OP_PASSTHROUGH		0x7c
+#define OP_PASSTHROUGH		0x7C
+#define OP_VENDOR_DEPENDENT	0x00
 
 /* subunits of interest */
 #define SUBUNIT_PANEL		0x09
 
 /* operands in passthrough commands */
+#define SELECT_OP		0x00
+#define UP_OP			0x01
+#define DOWN_OP			0x02
+#define LEFT_OP			0x03
+#define RIGHT_OP		0x04
+#define RIGHT_UP_OP		0x05
+#define RIGHT_DOWN_OP		0x06
+#define LEFT_UP_OP		0x07
+#define LEFT_DOWN_OP		0x08
+#define ROOT_MENU_OP		0x09
+#define SETUP_MENU_OP		0x0A
+#define CONTENTS_OP		0x0B
+#define FAVORITES_OP		0x0C
+
+#define NUMBER_0_OP		0x20
+#define NUMBER_1_OP		0x21
+#define NUMBER_2_OP		0x22
+#define NUMBER_3_OP		0x23
+#define NUMBER_4_OP		0x24
+#define NUMBER_5_OP		0x25
+#define NUMBER_6_OP		0x26
+#define NUMBER_7_OP		0x27
+#define NUMBER_8_OP		0x28
+#define NUMBER_9_OP		0x29
+#define DOT_OP			0x2A
+#define ENTER_OP		0x2B
+#define CLEAR_OP		0x2C
+
+#define POWER_OP		0x40
 #define VOL_UP_OP		0x41
 #define VOL_DOWN_OP		0x42
 #define MUTE_OP			0x43
@@ -98,9 +136,81 @@
 #define RECORD_OP		0x47
 #define REWIND_OP		0x48
 #define FAST_FORWARD_OP		0x49
-#define EJECT_OP		0x4a
-#define FORWARD_OP		0x4b
-#define BACKWARD_OP		0x4c
+#define EJECT_OP		0x4A
+#define FORWARD_OP		0x4B
+#define BACKWARD_OP		0x4C
+
+#define ANGLE_OP		0x50
+#define SUBPICTURE_OP		0x51
+
+#define F1_OP			0x71
+#define F2_OP			0x72
+#define F3_OP			0x73
+#define F4_OP			0x74
+#define F5_OP			0x75
+
+#define VENDOR_UNIQUE_OP	0x7E
+
+/* AVRCP 1.3 (and later) Protocol Definition Units (PDUs) */
+#define PDU_GET_CAPABILITIES			0x10
+
+#define	PDU_LIST_PLAYER_APP_SETTING_ATTRS	0x11
+#define	PDU_LIST_PLAYER_APP_SETTING_VALS	0x12
+#define	PDU_GET_CURR_PLAYER_APP_SETTING_VALUE	0x13
+#define	PDU_SET_PLAYER_APP_SETTING_VALUE	0x14
+#define	PDU_GET_PLAYER_APP_SETTING_ATTR_TEXT	0x15
+#define	PDU_GET_PLAYER_APP_SETTING_VALUE_TEXT	0x16
+
+#define	PDU_INFORM_DISPLAYABLE_CHAR_SET		0x17
+#define	PDU_INFORM_CT_BATTERY_STAT		0x18
+
+#define	PDU_GET_ELEMENT_ATTRS			0x20
+
+#define	PDU_GET_PLAY_STATUS			0x30
+#define	PDU_REGISTER_NOTIFICATION		0x31
+
+#define	PDU_REGISTER_CONTINUING_RESPONSE	0x40
+#define	PDU_ABORT_CONTINUING_RESPONSE		0x41
+
+/* AVRCP 1.4 Protocol Definition Units (PDUs) */
+#define	PDU_SET_ABSOLUTE_VOLUME			0x50
+
+#define	PDU_SET_ADDRESSED_PLAYER		0x60
+
+#define	PDU_SET_BROWSED_PLAYER			0x70
+#define	PDU_GET_FOLDER_ITEMS			0x71
+#define	PDU_CHANGE_PATH				0x72
+#define	PDU_GET_ITEM_ATTRS			0x73
+#define	PDU_PLAY_ITEM				0x74
+
+#define	PDU_SEARCH				0x80
+
+#define	PDU_ADD_TO_NOW_PLAYING			0x90
+
+#define	PDU_GENERAL_REJECT			0xA0
+
+/* AVRCP 1.3 (and later) Event-IDs */
+#define	EVENT_PLAYBACK_STATUS_CHANGED		0x01
+#define	EVENT_TRACK_CHANGED			0x02
+#define	EVENT_TRACK_REACHED_END			0x03
+#define	EVENT_TRACK_REACHED_START		0x04
+#define	EVENT_PLAYBACK_POS_CHANGED		0x05
+#define	EVENT_BATT_STATUS_CHANGED		0x06
+#define	EVENT_SYSTEM_STATUS_CHANGED		0x07
+#define	EVENT_PLAYER_APP_SETTING_CHANGED	0x08
+
+/* AVRCP 1.4 Event-IDs */
+#define	EVENT_NOW_PLAYING_CONTENT_CHANGED	0x09
+#define	EVENT_NOTIFY_AVBL_PLAYERS_CHANGED	0x0A
+#define	EVENT_ADDRESSED_PLAYER_CHANGED		0x0B
+#define	EVENT_UIDS_CHANGED			0x0C
+#define	EVENT_VOLUME_CHANGED			0x0D
+
+/* BT-SIG defined Company ID for Metadata */
+#define BTSIG_COMPANY_ID	0x001958
+
+/* 1394 Trade Association-defined AV/C MTU for Control channel */
+#define AVC_MTU			512
 
 #define QUIRK_NO_RELEASE	1 << 0
 
-- 
1.7.4.4


             reply	other threads:[~2011-08-11 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 14:12 David Stockwell [this message]
2011-08-12  8:36 ` [PATCH 1/5] Added more complete set of AVCTP/AVRCP defines 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=201108110912.02268.dstockwell@frequency-one.com \
    --to=dstockwell@frequency-one.com \
    --cc=david_stockwell@att.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=luiz.dentz@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.