All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Cc: Rinaldo Bergamini <rbergami@redhat.com>,
	Andrey Semashev <andrey.semashev@gmail.com>
Subject: Re: [PATCH BlueZ] avrcp: Fix always requesting player settings for category 1
Date: Wed, 27 May 2020 15:46:56 -0700	[thread overview]
Message-ID: <CABBYNZ+yYU=FOq8-xTVzv+jLufkOFgs_0UmJZnhW8XkvFCU3TA@mail.gmail.com> (raw)
In-Reply-To: <20200527224343.182610-1-luiz.dentz@gmail.com>

On Wed, May 27, 2020 at 3:43 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> Player Application settings is not mandatory for category 1 so instead
> of always listing the settings the code now checks if
> AVRCP_FEATURE_PLAYER_SETTINGS is enabled.
> ---
>  profiles/audio/avrcp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 773ccdb60..75811bf98 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -3814,7 +3814,8 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn, uint8_t code,
>         if (!session->controller || !session->controller->player)
>                 return FALSE;
>
> -       if (!(events & (1 << AVRCP_EVENT_SETTINGS_CHANGED)))
> +       if ((session->controller->features & AVRCP_FEATURE_PLAYER_SETTINGS) &&
> +                       !(events & (1 << AVRCP_EVENT_SETTINGS_CHANGED)))
>                 avrcp_list_player_attributes(session);
>
>         if (!(events & (1 << AVRCP_EVENT_STATUS_CHANGED)))
> --
> 2.25.3

Please let me know if you are able to test the above patch, it should
fix the problem with Senheisers headsets if the are not setting the
Player Settings bits this would prevent the command to be send so it
doesn't crash.

-- 
Luiz Augusto von Dentz

  reply	other threads:[~2020-05-27 22:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 22:43 [PATCH BlueZ] avrcp: Fix always requesting player settings for category 1 Luiz Augusto von Dentz
2020-05-27 22:46 ` Luiz Augusto von Dentz [this message]
2020-05-28  0:23   ` Andrey Semashev
2020-05-28 14:31     ` Andrey Semashev
2020-05-28  0:23   ` Andrey Semashev

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='CABBYNZ+yYU=FOq8-xTVzv+jLufkOFgs_0UmJZnhW8XkvFCU3TA@mail.gmail.com' \
    --to=luiz.dentz@gmail.com \
    --cc=andrey.semashev@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=rbergami@redhat.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.