Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp14676ybm; Thu, 28 May 2020 14:54:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDVLWty8SfVrDWjtPm9DstAWBN/oT6OHzyYC4/aYJ98zQ3FbQP58p8OHCjQmtFWrgAlqz+ X-Received: by 2002:a05:6402:8d1:: with SMTP id d17mr5138709edz.38.1590702846963; 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=MfNjSSgxPX/yQpK6W0iSiWhtkdXiio5HhG4bXR+N3nyaEH+48dZhnCXOjxH+FUpmm1 Ol+jBPumLs8m/owJt8U1BMw9SYcy0XTL/fs9h3hzrOrSX3wTK3OQ2eLIE6TKXmX5XEj9 XLSqCJorooDKNaXwRE/LfHmXhuDztQSDcmp8D/b6bZ2mw2ncTDkeTbjSE8kxCdQt3cL1 UKF+sEoT1X6OaosQ5PFO90EuNmHsvDGTjPMeid4Tc5i187C4xovRGzVsLPEOgt+koeUx hQ+P768cd5En9aOLToKH/cRFLYuKtuXqRW/sedt0xVytz/CYTdDzWhYaknc+joXyFkHw fUCw== 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=iflpTdnrlYYAFeQ7PdOyqCC9+nfFboZmwKA70zJrtMc=; b=gC0dOmzY8V4AMqz4dojX+3frqiDmna08HxVDmVhJzCTyHERaMdcPVvVIWDoN+ws3yb 7ZLJcOnAFN+JGwQs+/3NfPMEAbN7+vEj0wieUglo3wz2V04vML00TkdzMQ/qL7lpNf+F 6MMdq8ZSZQ1p+c3gJtrB6qLfJfDKfs2EMclKKMYf5b7P/O7WGjU9TLfRjxA3UIJUA5Tr RnbdJlfHwjlHeDcgISAJIVp1workaX0wnCNczGjrBYhDGEoyuGgIM3ghAn27k/00eUhr YBxtw5vCswIuswvOnSo0cpNxvBiTmSSoxlbwE80UYMZlGwyLcmHNV+GCV5/5CPnLbqnN lHFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PKL1AJxs; 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 oe20si4601498ejb.135.2020.05.28.14.53.14; 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=PKL1AJxs; 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 S2436611AbgE1VxG (ORCPT + 99 others); Thu, 28 May 2020 17:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436703AbgE1VxF (ORCPT ); Thu, 28 May 2020 17:53:05 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED3C9C08C5C6 for ; Thu, 28 May 2020 14:53:04 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id v2so91268pfv.7 for ; Thu, 28 May 2020 14:53:04 -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=iflpTdnrlYYAFeQ7PdOyqCC9+nfFboZmwKA70zJrtMc=; b=PKL1AJxsDXo6MXMh7MiYWujPpYbbx1WToTZHTcsVnJfIENE1Mw/ZtwZRPmATwaHFNq oEWTB8hVplDipNxwL5i+QvHsgfgqZ1TkVm7y96mfVTY4CvEX5d21pvyVwxL17pSrcMwN or/yiSUWWgZZCgTT9pWxVRWui8/qVMSe5f73EvmELKOid7NRDk/MKsS0m2DWeol1I9na XRrjtpBYADVd2c3sng/8y/Lj5rNgZwKpGn1pl+mBuzNEhV+ygrlJAGrLE8DwmgFca4qe KbcOD4WA0NMdvfAFIMddt0pn7PYvQkWpoNmWWi+O5u3uPa66A+4DPrm5lkgqoBfgJkB2 qzCQ== 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=iflpTdnrlYYAFeQ7PdOyqCC9+nfFboZmwKA70zJrtMc=; b=SYRWRss0bcpW+/wyXHTliH26MUorifAithDwojWuncX0lFYiPHCB/jYlYIfcwftWTy ESesiLvINpm+cd+Jq+Mf3PtMndGS12L1BzwMUbkMeBakmxFETyq5BFRAyLh8cDYadehA NSvCunPw/FC8+bzbigXvJTu5ZxWD9923QOoBd6RujcYkSgRbABa8yaqbMYCz8s/ryHeG dfsvo+lUVrQWqyI6C2teDO1J0+Z4GXTxt/ltIPpoJw6FfqnSWPALEL1AJnziHDZWoQnk lpySS5mxN6LNdKSUZ/47rrRbPWh55YZJ4awltZCE4nj3wc0kaZCako4ojltURgR5fA/c v0tA== X-Gm-Message-State: AOAM532inD4HorIGtHJhlxeATFS0D0KsaN5IG9GnKrCUfspYHi7R/ySa hZjfMGEoJHusvuwrFq1x42MkLhaO X-Received: by 2002:a63:d547:: with SMTP id v7mr5018726pgi.413.1590702784169; Thu, 28 May 2020 14:53:04 -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.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 14:53:03 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v3 2/2] avrcp: Don't attempt to load settings if on volume changed is supported Date: Thu, 28 May 2020 14:53:00 -0700 Message-Id: <20200528215300.225894-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200528215300.225894-1-luiz.dentz@gmail.com> References: <20200528215300.225894-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..8b3debe46 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 == (1 << 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