Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1076686ybm; Wed, 27 May 2020 15:44:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzudDDl+xGyYIlCBPWjyOB+YRzFzV1WqOKF7prnN6Px2R/8bfFmHpN+Jhu9jMd6BZwQxo3C X-Received: by 2002:a50:f052:: with SMTP id u18mr360937edl.16.1590619470983; Wed, 27 May 2020 15:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590619470; cv=none; d=google.com; s=arc-20160816; b=FGjLBPWEjwowli0lz4nZPptiOg8V5LQg/EeQ3KfU+P6Y8Xi8a7N/igvmsZdL8a05pZ mvWtv8dJZfR+wESwj6uoqmdZ6Nm9aXKefPkTkFrfwCPc/4K/k1GBrocGi20k+HRhO4aG MvagknT3nknukbk4Y7+6mtok4iEsgITEhJ31eb+YVTCAbYISnrstMaxITFO5/bFPGwug Hqp8+Zmh6d5FNB+je8pMJjlHrLRTvfxr9ro8v/uitTdFLhHdqMWIpEHNlg4IeC7Et7xR A+yG5k9Y5vEg0yXHFumL5CHQ+sTQZQXYgAH0q42fxvf5cBZ7NsQL3KEn7392xTeT1NYc 3jTg== 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=WlHKP5pQyrH0a1lctig8YL7sUiu36ggCt4DY29LdBZL35IThovs7nSzV1kKP1t/qUR M8redhP2fjPWsZVMyhlY+xqGb9QHk6XY/L6JXfac/9wY+Ffbse1RznD1G6INxH6Lu+P6 bv+jPAscLfTBatYlOg7McMERDiuO52yX1RUU4eBdrqWZ2+FcwEmt3T8UwkORoBfa9O3C lFeFKNFTm5vbg+AhMzHqwaq7EoVDRwkbRlOKC1F4Lk5SI+irIN7ITq+3k6QB/kdkgHiL LIrz1+RlZedg/Bu8+d08oHTSJFDY1x+PnqTzh1V6BkFHSSzoq+/wrI3ABXpkkdO8tDOb El7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HFwyPhrU; 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 b6si1554240eds.471.2020.05.27.15.43.48; Wed, 27 May 2020 15:44:30 -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=HFwyPhrU; 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 S1725747AbgE0Wnq (ORCPT + 99 others); Wed, 27 May 2020 18:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgE0Wnp (ORCPT ); Wed, 27 May 2020 18:43:45 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6615C05BD1E for ; Wed, 27 May 2020 15:43:45 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 124so6280596pgi.9 for ; Wed, 27 May 2020 15:43:45 -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=HFwyPhrUCvfqrkpQHrZaDVJKKYz4eUwOiXb7qOkozL+pxN53YD/flmYYos/GXdidND 8H3rSJbXTLs/wbJgXoV6YAGeu+Nx/vvRnth/bSeaaBLElCP0rPhoEKrJK3um6OJHoNRT 0ZL5K/yJRSUctVqZSJjYJqx8i5a6zc3RFNjEKT6N6FfXCOXYVjO+quw3HRii6eh76jIp sD7A/49ipOXA0fSsWlLGf77D8Ze7gDnKkOMyT6+s3BFiTNSjujvBmKAHBpuJeqOy3+IN lKmt0uhtaGofDpMNdt+qB5/ffOPvrECB3bVPmUVvYpZZ8wbxwPRmlNCh1tlN4UqbtPQY 6Vaw== 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=DeDKUc1nk/Zc6N+8vRnxoGlmQGxSOdJwMjmiw6hGBMWPofI8W/qCrx5whW8i6DKah0 DYYE7VunhRs+kDj5RNRbACdV5em/WxJWx3xxz78RVgcl7sgYflY5WWkvwQkgw3ah/PYX cgdzOQRY02bKlFrB15rmjxgBawJ46bCOpI7mtsXEB27ssIYx1TnpJArweA9/EtsPK1pr qDutVuOAU+uKXNmMjM79/kimMkR8c4QeueJ+DXQT8ymO1NotkFy81KCjknVHUDxFDnTE yMF0Jfrw1OukX90/UM9aC2jkOLx9YqzAnfUCOyvxlzgubcJlL4Gz25OL631f+CIh8SrH pLpg== X-Gm-Message-State: AOAM532m8aAIOig0qARUj/wTePP6FUPjN5/bELs+TljqFpvcuryml87A 4plT2+EgzXGxkxfWr8YPuZodoOXr X-Received: by 2002:a63:fc0e:: with SMTP id j14mr28410pgi.264.1590619424944; Wed, 27 May 2020 15:43:44 -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 r31sm3308304pjg.2.2020.05.27.15.43.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 15:43:44 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] avrcp: Fix always requesting player settings for category 1 Date: Wed, 27 May 2020 15:43:43 -0700 Message-Id: <20200527224343.182610-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