Re: [PATCH BlueZ] audio/transport: Emit Volume changed if endpoint is source

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

 



Hi Feryllt,

On Wed, Mar 31, 2021 at 4:40 AM Feryllt Pryderi <feryllt@xxxxxxxxx> wrote:
>
> Change set_volume to send a Volume PropertyChanged signal also if
> transport->sink_watch is set (and not only if source_watch is set).
>
> This fixes volume changes signals not being sent for devices like speakers and
> headphone adapters with volume control (like Bose Soundlink Revolve or Fiio BTR5).
> ---
>  profiles/audio/transport.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
> index 8248014ae..26aa237a3 100644
> --- a/profiles/audio/transport.c
> +++ b/profiles/audio/transport.c
> @@ -662,6 +662,7 @@ static void set_volume(const GDBusPropertyTable *property,
>      a2dp->volume = volume;
>
>      notify = transport->source_watch ? true : false;
> +    notify = notify || (transport->sink_watch ? true : false);

Id replace the following like with:

  if (transport->source_watch || transport->sink_watch)

>      if (notify)
>          g_dbus_emit_property_changed(btd_get_dbus_connection(),
>                          transport->path,
> --
> 2.31.0
>


-- 
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