Re: [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid

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

 



Hi Bluez maintainers,

Could you take another look at this patch?

Thanks,
Archie

On Tue, 1 Sep 2020 at 12:00, Archie Pusaka <apusaka@xxxxxxxxxx> wrote:
>
> From: Archie Pusaka <apusaka@xxxxxxxxxxxx>
>
> Adding a check inside media_transport_update_volume to prevent
> the volume being updated with an invalid value.
> ---
>
> Changes in v2:
> * Move the check from media.c:set_configuration
>
>  profiles/audio/transport.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
> index a2c4f7dfb..dd1c553a2 100644
> --- a/profiles/audio/transport.c
> +++ b/profiles/audio/transport.c
> @@ -941,6 +941,9 @@ void media_transport_update_volume(struct media_transport *transport,
>  {
>         struct a2dp_transport *a2dp = transport->data;
>
> +       if (volume < 0)
> +               return;
> +
>         /* Check if volume really changed */
>         if (a2dp->volume == volume)
>                 return;
> --
> 2.28.0.402.g5ffc5be6b7-goog
>



[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