diff mbox series

[Bluez,v2] audio/avrcp: Fix media player passthrough bitmask

Message ID 20200528144605.Bluez.v2.1.Idd38f20f6ff4fc0b295a0a4a8655079373216933@changeid (mailing list archive)
State Accepted
Delegated to: Luiz Von Dentz
Headers show
Series [Bluez,v2] audio/avrcp: Fix media player passthrough bitmask | expand

Commit Message

Archie Pusaka May 28, 2020, 6:46 a.m. UTC
From: Archie Pusaka <apusaka@chromium.org>

Adjust the values of the passthrough bitmask with the declared
keys in avctp.c:key_map, according to section 6.10.2.1 of the
AVRCP specification.
---

Changes in v2:
- Fix the mix-up between the first 4 and the last 4 bits of each
octet

 profiles/audio/avrcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Luiz Augusto von Dentz May 28, 2020, 4:03 p.m. UTC | #1
Hi Archie,

On Wed, May 27, 2020 at 11:46 PM Archie Pusaka <apusaka@google.com> wrote:
>
> From: Archie Pusaka <apusaka@chromium.org>
>
> Adjust the values of the passthrough bitmask with the declared
> keys in avctp.c:key_map, according to section 6.10.2.1 of the
> AVRCP specification.
> ---
>
> Changes in v2:
> - Fix the mix-up between the first 4 and the last 4 bits of each
> octet
>
>  profiles/audio/avrcp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 773ccdb60..6c529bf0c 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -298,8 +298,8 @@ static unsigned int avctp_id = 0;
>
>  /* Default feature bit mask for media player as per avctp.c:key_map */
>  static const uint8_t features[16] = {
> -                               0xF8, 0xBF, 0xFF, 0xBF, 0x1F,
> -                               0xFB, 0x3F, 0x60, 0x00, 0x00,
> +                               0x1F, 0xFA, 0xFF, 0xBB, 0xF3,
> +                               0xBF, 0xF9, 0x06, 0x00, 0x00,
>                                 0x00, 0x00, 0x00, 0x00, 0x00,
>                                 0x00 };
>
> --
> 2.27.0.rc2.251.g90737beb825-goog

Perhaps we should add a translation table so when we update the
key_map we automatically update the features as well otherwise we
always risk having these out of sync.
diff mbox series

Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 773ccdb60..6c529bf0c 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -298,8 +298,8 @@  static unsigned int avctp_id = 0;
 
 /* Default feature bit mask for media player as per avctp.c:key_map */
 static const uint8_t features[16] = {
-				0xF8, 0xBF, 0xFF, 0xBF, 0x1F,
-				0xFB, 0x3F, 0x60, 0x00, 0x00,
+				0x1F, 0xFA, 0xFF, 0xBB, 0xF3,
+				0xBF, 0xF9, 0x06, 0x00, 0x00,
 				0x00, 0x00, 0x00, 0x00, 0x00,
 				0x00 };