Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1078364ybm; Wed, 27 May 2020 15:47:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmmmfVm1gvemFDdLS3CdJMOGArjFVVUj7AS/O8V20mlQM6+3YOGTW6WKc7jlEnmSJxUCQN X-Received: by 2002:a17:906:f53:: with SMTP id h19mr466515ejj.343.1590619674649; Wed, 27 May 2020 15:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590619674; cv=none; d=google.com; s=arc-20160816; b=I2jdsJU9gtc5DLzANA/nmDvPTX/ij51j2iAG6/uTlcsWPIMIBM6EmTBsWq1lvmCbyf bRgxIEIAN9JitlPv1VrB7wIB1kYxE2jxAxAjoXx7JahUCt3uS5kaPltFsRUK9ye/1x9J qD+AKe9LEbwKt+p6WxxgOIngrSTsV2AnICfclpT3q6vSTQoCnOKTP0zx+gaxP8VxAxOJ SB6x5TAOgM78PHPqOodyJPOOyXYCh4AgVnuhUAs81o3MehiEBN6/JQtf3hjInHQnWRkj ELMNWuqXu8XY2aPLj4XkN3P/Vt4IWVLGBZPw/+T3n3S4T4zCZMRReacpo/iUCb4FEzXz t7Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rILXpdjeVnudyMp2rje2mFX4vwduI4W4avBjyCDktm8=; b=Z5Id2Qt9vDcWCv08j3JC5tdpBxvwm4dZURR7ug4Ke0VKL5VhXmOAiAn1f8uQq9Gdqq lIAHCo5Vzt/3ntBJSeker+6sH4wraJYr9BWGrTNwuE1aXo+nP6tUXQjCIaiJCHfe5mWa sbaT1KYadGXd3x0qmzPfb169YhHQE3i4iKXRQuYQMEcn3vEDjLD/GLN/6ClRq72PiPtD ItZcnnsoNs9nnNeSnfj+sPh6SNvW3hWP3GYmTxRZFWthF2gWELzeVrd+WzdDhXsFiDjD 2Gb/BKJwVvoibi8bgSsoFOgqAXOktZLy8tfyT+Mka0zKEPpNbqL/n8NjTiC49ZCw6fBl PPrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jY12Z7/u"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp1si3888036ejc.505.2020.05.27.15.47.26; Wed, 27 May 2020 15:47:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jY12Z7/u"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgE0WrK (ORCPT + 99 others); Wed, 27 May 2020 18:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbgE0WrK (ORCPT ); Wed, 27 May 2020 18:47:10 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D14C05BD1E for ; Wed, 27 May 2020 15:47:08 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id m67so12881886oif.4 for ; Wed, 27 May 2020 15:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rILXpdjeVnudyMp2rje2mFX4vwduI4W4avBjyCDktm8=; b=jY12Z7/ur70KGr+3RbZu/qNTjQprU75Z7AhhTTRrr00YjgtQbJDzytWCBOMcZ7ydUa z0QhbwSu17KyXIvn/5yMOT5C4Dbs4sbDe/rg8C7mc7q0VNxyT0dF4kZVv6GJ01aBwRni D98sa7WouF+jZHLaXKgYdC+GOj5JTsrtdZfJR2ECfBRbBEzQvuiuT25eFrYcYc2mBPyi mMW0iSEGvRI47P/Ug1O9vJxsfbIDBCGH9qaST5nWnzcyajzSIOXALnXq5jdqvIAq1GcY YzEFPyNfQNdd5rQjtqgiLQD11s/n6eGYm65Xc0R5hna3yU4byvnETVsa1M+Hj2N2tvjg xRKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rILXpdjeVnudyMp2rje2mFX4vwduI4W4avBjyCDktm8=; b=f8t8WW329Eonf6YzqnwCApEOgR6yAJKigR+LuePpkJ0NYstsu+Q1QGGcuqcuwRTzqp xLGoEwt5i28gLdXQ0Y8jR/UNQTQaW7ea10xGMwhae5pfE7oy5wMdN/xJb2Z/tUlKj12s 0jO1Cq5E+FbPIjKwupuj2pir4DZnbAZXJt/RMABHgerReQA1twtTtxatiouGUX71+uuF moW2lT22Hf67E1dn8oWdiNCTqS7KX4HBaJO6v6HTRn0SbLsht5XReizf50Hr32+Ol6vu bl7t0RxbFxPoE/Ab3xiPpvMM8NE6ptHi3L1kRANWGP46IIKW55WEg1YyTRfu44Ttn4El pd4Q== X-Gm-Message-State: AOAM5321GOrtJetXOYdzweQfED1Kl8eZKT0ttCoWjfkbMBBgdM2/Sfo4 Te2wS+RujzAk1cvk9HFHgrfokOeS2jdWGgAiQdLnXA== X-Received: by 2002:aca:550e:: with SMTP id j14mr329171oib.82.1590619627550; Wed, 27 May 2020 15:47:07 -0700 (PDT) MIME-Version: 1.0 References: <20200527224343.182610-1-luiz.dentz@gmail.com> In-Reply-To: <20200527224343.182610-1-luiz.dentz@gmail.com> From: Luiz Augusto von Dentz Date: Wed, 27 May 2020 15:46:56 -0700 Message-ID: Subject: Re: [PATCH BlueZ] avrcp: Fix always requesting player settings for category 1 To: "linux-bluetooth@vger.kernel.org" Cc: Rinaldo Bergamini , Andrey Semashev Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wed, May 27, 2020 at 3:43 PM Luiz Augusto von Dentz wrote: > > From: Luiz Augusto von Dentz > > 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