Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp843409ybt; Fri, 10 Jul 2020 14:00:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzRLlcsCkAnGJzdBwXuSjE5WsRW6sceOYU+0mVV+tA986fMfqx61mvVTuFBe3y3b48V/nH X-Received: by 2002:a50:fc97:: with SMTP id f23mr69093622edq.255.1594414809355; Fri, 10 Jul 2020 14:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594414809; cv=none; d=google.com; s=arc-20160816; b=EU0IvEcYMe0mhqXMID0MnyMY/qh8w+zuGQaK9VDaIBvIBb+s6/4kakhYwt/b8uzhq2 LXo9js0soFxdeNNNz78Z2OOCB9bMj3h1nYxRm7F45Gc21azWW+/4VmzVQU8/NO+nKSRQ JL0Jq+y+pdKi9snjIicfIUXgalfqUy3gfeakyILsJ4Vc3HXJR3CQ0H7M5EKng1RJOvIY PXspoCXgF6pqHWazYNxYd+LWNKEDhaKYAGLIF6f1CRrTST/Nfeq1wtF1q3dbKcWekrvK UQUluv5wPYVSc7PNANjMxaT9KuFl0qzRzygfoGiqaNcKhrK2LpXRMPkwqHQC1XpSP6Re g/Pg== 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=u1/JtT6kLeY1DxICnY5yfjydt1+DeA48Qpq7XZ7cwH8=; b=zYPB53Wzg+VJ92fZ2JgWhpR6H4y3s4hunOpUPEp/V/+GrMPU+aqS6UVJutxXQAJ577 xVHVh7SNnfmS6DaI8P0ksfcmyudq3asqwTAF1n9PkzX4etvNARES/VMP7VFdlEwlALb4 WVGeA0ZJS+iF+RPIrbzXq2I1v4jxBSO9BejT7VRV2yvQypxSz2t6yTvJNx7nOYhD6W8s KZDfWJDtr++js72rToJlGu1EMpUbZF+BApRePazpCpHWvKrOV/3LEqPAb/eQ3Ra0H/Bt VoAccKzLMrbtsftx6/otFYOYOwWC3dA3oCPPOZI9OvDykSNv2pYIvo552JOTTV9SgEqn QzEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e+mY1V5S; 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 t24si4814596eds.158.2020.07.10.13.59.24; Fri, 10 Jul 2020 14:00:09 -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=e+mY1V5S; 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 S1726162AbgGJU7I (ORCPT + 99 others); Fri, 10 Jul 2020 16:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgGJU7H (ORCPT ); Fri, 10 Jul 2020 16:59:07 -0400 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B51C0C08C5DC for ; Fri, 10 Jul 2020 13:59:07 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id x2so1249098oog.5 for ; Fri, 10 Jul 2020 13:59:07 -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=u1/JtT6kLeY1DxICnY5yfjydt1+DeA48Qpq7XZ7cwH8=; b=e+mY1V5SRk9jMxgAuxR1ALEBIWQCS2dKQYBgbzIqvUh3h2zTic3F2cIbvxKr4mzosI 5UPqZl2xD8ssNZhFK6PdZlYDulUHtPJVKjAZ6mykphqnz6iipFPPwrNrc/pytPBF0N9h zQuwp0tO+8aKUu4ZZedN1a8nmsa+/rIGkpGOmLwk/md6a7NKc/5I0fC3mxwTLWHF3IHT 9PALA49UcuC8WfMPwlZPXx1SUQd2yFyVSh1hUo8M4RO3CeTidjyKlILx3TrtOXUtYsQu as/8zvUYe9JUegOk9xxc7nbWObKl5PxYecpezS/D/15m2SvU0SqOy3teDEjYIIF5r2fX PhLA== 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=u1/JtT6kLeY1DxICnY5yfjydt1+DeA48Qpq7XZ7cwH8=; b=l5e1ev5Kd8xi1gok/ZWboGTG/YRrKkdONErY3EGxyomXLb++XkcuBH+TyMWTcSLUBd yKIu74pPNELSIH2oDMzWv24o4pl+JFxyWow5t1d+ooqAx6StxguT/gA7EsZXclIGAvZH lJvhOpAXERhRRYssYBVFnp/nQ3HlnFyy4Svn9Xp0KYYuoutmCAlZK/g7nC31xaN0vJ76 rR8xea0SQCb9KMRh49vZfIltckp7On+3ceyr10H9hJCvNmnbQVrc0daXJje3BpCOVr4w Dp17drQS3hdwKZQxvUGOS9QvZ+WSqKfHO0Uali+MTD/aXx/C/FO0zvwtIBuVnSXeH9lb P8+g== X-Gm-Message-State: AOAM531R8AxDcMnnOB02cEpNXmMLeIejDpZj+qWZUYiXiB3ZI0DdIqwc hr+hdrbMwe1tpb8OhGGh13mgLtwXbKsiEFFXnns= X-Received: by 2002:a4a:a21d:: with SMTP id m29mr10096110ool.17.1594414747083; Fri, 10 Jul 2020 13:59:07 -0700 (PDT) MIME-Version: 1.0 References: <20200709090631.Bluez.v1.1.I6aa22c6e425e5b19c321c0768f50ca3fc2c090da@changeid> In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 10 Jul 2020 13:58:55 -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 On Fri, Jul 10, 2020 at 1:48 PM Yu Liu wrote: > > Sorry, which patch? From Archie, subject: [Bluez PATCH v1 2/2] audio/transport: store volume for initialization > On Fri, Jul 10, 2020 at 1:35 PM Luiz Augusto von Dentz wrote: >> >> 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 -- Luiz Augusto von Dentz