Message ID | 20200528215300.225894-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luiz Von Dentz |
Headers | show |
Series | [v3,1/2] avrcp: Fix always requesting player settings for category 1 | expand |
Hi, On Thu, May 28, 2020 at 2:53 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 > Applied.
On 2020-05-29 23:29, Luiz Augusto von Dentz wrote: > Hi, > > On Thu, May 28, 2020 at 2:53 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 >> > > Applied. > Thanks. You may want to close https://bugzilla.kernel.org/show_bug.cgi?id=207625.
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)))
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(-)