Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp830790ybt; Fri, 10 Jul 2020 13:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTbuRAAmAko/WcDs2ORweHNYEdrwA8EDy8uLVhLoFv3FE8FmQod2beicgR7H8QJJS2VDdJ X-Received: by 2002:a50:e1c5:: with SMTP id m5mr79297192edl.47.1594413354610; Fri, 10 Jul 2020 13:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594413354; cv=none; d=google.com; s=arc-20160816; b=r7cO2rBKTApTNH4+PhrwV3uAJsGHwAERzaHtjcY//wI8jplnJY/5pdRwi9ku4jxSGP h3c9voihSyfgAsnaSLB+rrA+0GR0LO11MTRNKMt+YqKfDe7670T/U4XJD9kWK/sKdRD0 P2JeJt6yB3xag8/UKSI6Zxe/WN4TX8iIWflpUe/3w9LNIE8X9I66SLUsEn4FyuRp/kWm +eHjuIDDvY0YFT2dnnDVFSKLZgDSYODoFE+a2zTrb2UUY7NPBMnQNsuEV3lLabeqL7+z MRbBlDFEV7szffEBgMSoiQ8wWJfHnN8QjDNQ7y7H4wMG9kb6IJ39UDPlC52XU+2Fv8jM 4xLg== 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=4rTNzcMkZJncAMvaHB7Lfn854pyoDmxRixBWBSIhfgI=; b=qSh1Rc4129FjXf+xA167cIIg0mJFF9Fnc/B+cQjl/WT1BX9KGhQZJRD4abhbvpFbV7 Ij6Qn+iaDfzNiEhA7FNvzpxkbzPhKtP9NdyHviDvSzIz6S/jP13xknL3ktqlzwcBew+W 2An9GHiN8/E/PQKe6UPNR47Q/ybuh2JaHiaqja/JuikO5hNoN8BpMOSYldpfd6Lh73HN UxCDdl64MT8szBUE1naCWBqMbdZUKkYlFpUoKvoEJ/zqQ3F1mUbxLOKJVakK76YuIt2f a0exjdT3btGkhn9LFJdj8Nrvk68Gj4Q02LzHnIaO29jr2e45V5OvhIGCOTcZ1FguCFzJ Ms8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nH3uQQIg; 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 f5si4630732edt.71.2020.07.10.13.35.28; Fri, 10 Jul 2020 13:35: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=nH3uQQIg; 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 S1727038AbgGJUfY (ORCPT + 99 others); Fri, 10 Jul 2020 16:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgGJUfY (ORCPT ); Fri, 10 Jul 2020 16:35:24 -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 6CB37C08C5DC for ; Fri, 10 Jul 2020 13:35:24 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id 12so5852580oir.4 for ; Fri, 10 Jul 2020 13:35:24 -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=4rTNzcMkZJncAMvaHB7Lfn854pyoDmxRixBWBSIhfgI=; b=nH3uQQIgRl8BJOB1JmvfzBYe2itQSvKYw9MxwKIkyLHMU6htIhdTLAp0Tc1Vtv8swB QL20Od7WB1ceqIA3K2LXOCtCe6xA7CA99IjJ11+sGKTJ1Ycix1KadoI6/ZWhR1Rm4giJ ovn9KitsVJ/vRpI/iwtw8qXbsmiMKkhl+zBsBgnicARuv//mpeND5q6xSqdNEU4paQDC 5lfjP7NY1a7TX43r8sfgvmnd9VuBDsvDfWU7R3hVHmZhPTSGvd96jXJoOGzuu4lGeXG/ 1bz3OkqeZjMmhq9dbwFLDXbabQx5WiVd5alQdmXGt1X/IaWg5e5wq2Vo4ugONaMGCLyl 1zdg== 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=4rTNzcMkZJncAMvaHB7Lfn854pyoDmxRixBWBSIhfgI=; b=czL+cKNX+Vyfkbkg2kyog60lcOCBYaThwVsf0EmfhKlR3VtaNvm3i+lvRTBFeRgCUR rE05apc1/Nxdot3kzRl0KBk8b0E5TAm9xcBPGI168Ri3YkdJT8AZK5+icIYVh8kjdG00 jIjM6KZRyrbf3N+VUVvrDEti99gZ2kLNmw9W1Cf1I38U+lCWUhG2ZCgLV+3N8hqiZM2W 1oOEu8I05G774fFQ/VU0zSZLwwEpo7RCprqKkpv19qncaRgeh9gIySGl4URfm0FLJAnz SwF/jgxK0qafZu35590OUoM+p3ZPDPwixNrxppKgfGpYU48SEgh/e9uXaI/mz2DafXUM 4mWg== X-Gm-Message-State: AOAM531ET6yevy/mO4JeZZ7eEmT6s2ZHDMoe6gNnD1ezF7c7ynmA+wMh HcMYT6xgRPYpDxiwAeOmlE8Q353rTSVnCfxKZnDHTqDX X-Received: by 2002:aca:4a04:: with SMTP id x4mr5294868oia.152.1594413323851; Fri, 10 Jul 2020 13:35:23 -0700 (PDT) MIME-Version: 1.0 References: <20200709090631.Bluez.v1.1.I6aa22c6e425e5b19c321c0768f50ca3fc2c090da@changeid> In-Reply-To: <20200709090631.Bluez.v1.1.I6aa22c6e425e5b19c321c0768f50ca3fc2c090da@changeid> From: Luiz Augusto von Dentz Date: Fri, 10 Jul 2020 13:35:12 -0700 Message-ID: Subject: Re: [Bluez PATCH v1] audio/media - Fix volume sync between media and transport To: Yu Liu Cc: "linux-bluetooth@vger.kernel.org" , Hsin-Yu Chao , Sonny Sasaka 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 Hi, On Thu, Jul 9, 2020 at 9:10 AM Yu Liu wrote: > > From: Hsin-Yu Chao > > A volume value is cached on the global media player object. And a > check was used to NOT update volume to each transport if this > value doesn't change. That is causing problem at disconnect then > reconnect when the new constructed transport never receive update > about the last used volume value. I think this might be related to the other bug we have where the transport is created after the fetch of the volume so the volume we have stored in mp->volume is never updated in the transport, see my comments on the other patch. > Reviewed-by: sonnysasaka@chromium.org > Reviewed-by: hychao@chromium.org > > --- > > Changes in v1: > - Initial change > > profiles/audio/media.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/profiles/audio/media.c b/profiles/audio/media.c > index 993ecb3b3..92e363de9 100644 > --- a/profiles/audio/media.c > +++ b/profiles/audio/media.c > @@ -1204,9 +1204,6 @@ static void set_volume(uint8_t volume, struct btd_device *dev, void *user_data) > struct media_player *mp = user_data; > GSList *l; > > - if (mp->volume == volume) > - return; > - > mp->volume = volume; > > for (l = mp->adapter->endpoints; l; l = l->next) { > -- > 2.27.0.383.g050319c2ae-goog > -- Luiz Augusto von Dentz