Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp14677ybm; Thu, 28 May 2020 14:54:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgW+bSSwsieR40+wV2v52D+7ptOmoVKmQPigor7Zzc9jmFnXl8DT2lbYjmOaVUhpJXyM26 X-Received: by 2002:a05:6402:128d:: with SMTP id w13mr5521719edv.0.1590702846967; Thu, 28 May 2020 14:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590702846; cv=none; d=google.com; s=arc-20160816; b=fvKMe1ucnXkgO8U9Vgn7tNugc/JxpqbrNmFuA5h3/s8b9CML3Fk40mLWwk9NImV4gx YAD3By7AHiFg50V5gL6aCiB/8V4P5VDqEvhlERGiNbilyAyhYuOAHtpCxvCKZX/2d66X 9u02lUecSsvr1qbU6zhIRXOkZtWC0milvX5Gc4LK2jvktyrXzLRD9zmlbx2Rtqsg2+eR xwhhYGBc5d2VaffWe5Cc3UP/+4oi2k4wyhR+ZWoxjLa+4bxLUwyaysCze9Q/VMcrnD6c Nw7P5oOKkNDrZMFhwl4DCkkOzVLIeMXOBZkKrOm6QLjRhkfThuCTfpltxfsGhAg8JFmR /46Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=CRNf3g0aaybUiuE5w1c4KF1fNLd5dCJGW6FPC9eQZFg=; b=h0fp0PSzAT4O92dW0Vd59Zt9WkzNtYH+Gl46bUJyC9XbE3LuHA3QCVp8a/adzHW1D5 pzM8HMaHUfC0mOe3eX/kA1ttyQcsRq0yABiVarJ8lNyS0wU0udS2W0inJJtmJz4cHfyi 6pXMTMfOxtZik3OM+WJZnD6c3vBwflazjAC0kXWT23xcsshbgZhf73QjWRfLjShVSX6Z /8BvPl+dqRj7GsZ0jk4RctjqE/IbGUn/b4brf2LnTNn6wMmd2P8ViVX/MYbSFhgdO4zv NyozPF/4FS1N4s90Hh3EYWyYTh8qFNP5JZ11zMJnmhMrkx7grZhvqRPY6/H9YObJ6vjA wjnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VPb3DhGa; 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 i24si4079560edq.251.2020.05.28.14.53.15; Thu, 28 May 2020 14:54:06 -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=VPb3DhGa; 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 S2436629AbgE1VxE (ORCPT + 99 others); Thu, 28 May 2020 17:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436611AbgE1VxD (ORCPT ); Thu, 28 May 2020 17:53:03 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9059C08C5C6 for ; Thu, 28 May 2020 14:53:03 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id bh7so116389plb.11 for ; Thu, 28 May 2020 14:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CRNf3g0aaybUiuE5w1c4KF1fNLd5dCJGW6FPC9eQZFg=; b=VPb3DhGadUSP1BGeqFQqps+s3nQPPWMANvCC14lri5kn2kIObVSyt8Xf2h0Pdes4EG yhHFcjE6R/BuhZhA4eTbQALi77K6iKRqYjLkK7tguDEBzdfjcES1IlU1GsglKKFKzTwn ubqsn/tQ/RnbiFJOuEe8xbaNX9XOXIQT2aqPS7/IQ6AbynaGTdmeUKTJbasMbkNH2XxR QtWYa2bURi+g4GnBdjJwgK4gbpG5Groie3G6qXpnMtvDp1kZs4uPFS6EPipOJRaMri0l v/2V5pHLp4570iIEYdaYOiDE0cP1GPm3ZGwyIRFnPjcRRZHfUMfAQ+vvSMR9vDym2pPA e+Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CRNf3g0aaybUiuE5w1c4KF1fNLd5dCJGW6FPC9eQZFg=; b=NpHt16KAVZpDPBDVADZ5aqeFmDx1YcDQLS3g+xm2yD5s+Wir3md1g+8mC2KUr6cGea 4g9BkVBA8GQfI9ro1Pq/VAyeYbwJW3VzQ7pcO+9yMMOlyqFybBf54cC/vHFsWJS56z/c ltOEztJSRBY3jMYHAIybyydxOTgixl6H3fmTtRBOu0l5juaGwbh3h5pTVPCt08qbH6/3 5IUUXKqMMJ3wdxOVZX3ETDvoh+zaGURqfpxtfb/ZZp7crTVPksn9QST5JnA7LvDeq/JX 7wLSvPj5IGUV+xcilyE23LP0r3QE7Xup5z5Rb8VEsTIdZOuF5bIyz3NQ0zAOyBprEqGC MNcg== X-Gm-Message-State: AOAM531g0n/RvJlJ5Hv0mFsz91+Jxg0ue+ZYKAsf72+VrK0GsxOuFu0z E/6oe1xNywlE0P+ETAji6Jgg+RSM X-Received: by 2002:a17:90b:1882:: with SMTP id mn2mr5964080pjb.139.1590702782771; Thu, 28 May 2020 14:53:02 -0700 (PDT) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id l4sm5126170pgo.92.2020.05.28.14.53.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 14:53:01 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v3 1/2] avrcp: Fix always requesting player settings for category 1 Date: Thu, 28 May 2020 14:52:59 -0700 Message-Id: <20200528215300.225894-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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