Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp602590ybm; Thu, 28 May 2020 10:26:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRgHs0EldRbrZghzhBL7tEw91R1Uh2XdAGvORUHwm0fNvPe09h1MIzmCQaslWXBUKk4yl1 X-Received: by 2002:a05:6402:b06:: with SMTP id bm6mr4456791edb.17.1590686788403; Thu, 28 May 2020 10:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590686788; cv=none; d=google.com; s=arc-20160816; b=hRqIgSq63ktH4svvkSu6cGHP+/6u6I+gNmPhnRStGoFRm+O6R1akASwAksnJBaZZw3 m+Dvz11L/pt6emk4LOzDBsZM7JevFHq2nzqr6u+a8HpRlmea5Z8fTK0AqF08mvs0CxVk IXBPGjN66AceAjp4MgVxDVJ4b8TllP7G11Cp9InpioGZmZ2kwVLVhAl+AdwgIwtG+mQS iTwG8csRiKIVqbdYgr0pfTxT/HA9rof9BSKZZgSXPDZnsYSmFEeyGk3Q67unk26kpamX MvOTVhQTh8h4CCjRvtvO4hTEru2kjKaEyfpgTvcigMvXPYeYBwITmKxAadDWG2n0gbR1 2jzQ== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8rzfdUrlc7E6TiIkd8wKl+Q/Lnr2dT152h0Jn7EafjI=; b=J12APG8yAgJm117XZpOQXvwsdpbzIzChRNfwLRQqTesStqoB786rD21JUKNp5Z9T2j 9IYnPYuuAPCeqOAzyZ5xDKLuAZXVqtDIlJHJw7hRfNbncswCBMYlSfKRePdMlRz2WSJJ KTjxePUcFanN9buc7NDQ4sSLGkxSxVscZwy/G32eB8f6M0nkRxEujrBHEm9/fHsrCN0k Ypbk9welVNnkMyr5nVVxxyTlasV5cc66t9HSLa+GdM2AahwFVTTzo8WEIV/FOPwtdaeK gqXzgtvDLwZSYjAMNkWr8rqqTHLw5Vx0xWKugpJUko5pT05u9Fq0gAJL+dIiGbpJzzq1 Yrwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=px9pL7Rq; 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 63si1134608edn.276.2020.05.28.10.26.02; Thu, 28 May 2020 10:26:28 -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=px9pL7Rq; 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 S2405539AbgE1RZb (ORCPT + 99 others); Thu, 28 May 2020 13:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405540AbgE1RZ3 (ORCPT ); Thu, 28 May 2020 13:25:29 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829D2C08C5C7 for ; Thu, 28 May 2020 10:25:29 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id n18so13918523pfa.2 for ; Thu, 28 May 2020 10:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=8rzfdUrlc7E6TiIkd8wKl+Q/Lnr2dT152h0Jn7EafjI=; b=px9pL7RqOohNMUTQg9f/XPQesRK7f5KacRP3kF2z5urKa6v1nhzGvfVjGblqQhQDh0 wlEWgkagN/EI5WsiWWh4LjIefEipKMmG5kbVXnYLEro6tYwQj4iJv3NR0CkEGSUWD1hQ QhRSh1gAFO6ZeCMN8SBD4Pybj/eqStQQZ6hM8C/9DQ+D52OXX5GiLS08qb0ZJPOWDS// 4lzNpN2cnyF8vlkt4XRI3VgT4ZbRgRV3oGnk4QPePSIl4QbgJ/wEOMe1h+RhnDTeX8MD fnBaiCsQkprWgLUJbts17+zaSNnGbBpKLB4q2fgor73glzKRnp9zNONz5FNVPS2bIlEb HCUg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8rzfdUrlc7E6TiIkd8wKl+Q/Lnr2dT152h0Jn7EafjI=; b=rg4iCo1qVPu3tYqPdgJy50jznCtw5NQo3bm/0t1/rh8bVSB7QfZA3qGSQ5wqGU7gtr XkZ6hUd/zcpbq6d66LCWhZLiw/Rmf0QMqqGBjVBYiPaHeFyCyyFyyoN+6yIxKmzsSjGX lqJg7O2uKy7zCikl4H8lXpQkQl32cFQgvHWZpylOn2GV+b8Vkqr4NA+UJYAQ1cHaJE1M kV5dKchWYESocP2Mmpcx7LiYwWN6iyOOttCghUazhSQNRtjNRHb5lgcFs8AKK3AhY8BF mkJ427X/MJAbvCVidX85B7r12FY1j7kacFPh2PMnTORzQL982/DiizppBURYOaTYroOA Lq9w== X-Gm-Message-State: AOAM531EAeAlQSKWwuKtuGUKFH9Mj/hCNdxKRIQrCHc/8Le5t6+Sz34b Ib/1moGzE8yk76lKPR8/6lshNz0o X-Received: by 2002:a65:4107:: with SMTP id w7mr3980997pgp.226.1590686728742; Thu, 28 May 2020 10:25:28 -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 n5sm4481503pfa.168.2020.05.28.10.25.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 10:25:27 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 2/2] avrcp: Don't attempt to load settings if on volume changed is supported Date: Thu, 28 May 2020 10:25:25 -0700 Message-Id: <20200528172525.216354-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200528172525.216354-1-luiz.dentz@gmail.com> References: <20200528172525.216354-1-luiz.dentz@gmail.com> 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 If only volume changed is supported that means the player cannot really indicate track/metadata changes so don't attempt to read them. --- profiles/audio/avrcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 75811bf98..d46ac0ab7 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3814,6 +3814,10 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn, uint8_t code, if (!session->controller || !session->controller->player) return FALSE; + /* Skip if player status/metadata if only volume changes is supported */ + if (events == AVRCP_EVENT_VOLUME_CHANGED) + return FALSE; + if ((session->controller->features & AVRCP_FEATURE_PLAYER_SETTINGS) && !(events & (1 << AVRCP_EVENT_SETTINGS_CHANGED))) avrcp_list_player_attributes(session); -- 2.25.3