Re: [Bluez PATCH v1] audio/media - Fix volume sync between media and transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Jul 9, 2020 at 9:10 AM Yu Liu <yudiliu@xxxxxxxxxx> wrote:
>
> From: Hsin-Yu Chao <hychao@xxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxx
> Reviewed-by: hychao@xxxxxxxxxxxx
>
> ---
>
> 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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux